API compiles
This commit is contained in:
@@ -27,9 +27,9 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.InputEvent;
|
||||
@@ -74,7 +74,7 @@ public class ClientHelper extends ServerHelper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindTileEntitySpecialRenderer(final Class<? extends TileEntity> tile, final AEBaseBlock blk) {
|
||||
public void bindTileEntitySpecialRenderer(final Class<? extends BlockEntity> tile, final AEBaseBlock blk) {
|
||||
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class ClientHelper extends ServerHelper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public RayTraceResult getRTR() {
|
||||
public HitResult getRTR() {
|
||||
return Minecraft.getInstance().objectMouseOver;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Locale;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -36,7 +36,7 @@ import appeng.core.localization.ButtonToolTips;
|
||||
|
||||
public abstract class AEBaseMEScreen<T extends AEBaseContainer> extends AEBaseScreen<T> {
|
||||
|
||||
public AEBaseMEScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public AEBaseMEScreen(T container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ import net.minecraft.inventory.container.ClickType;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
@@ -100,7 +100,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
private Slot bl_clicked;
|
||||
protected final List<CustomSlotWidget> guiSlots = new ArrayList<>();
|
||||
|
||||
public AEBaseScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public AEBaseScreen(T container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
}
|
||||
|
||||
public void bindTexture(final String base, final String file) {
|
||||
final ResourceLocation loc = new ResourceLocation(base, "textures/" + file);
|
||||
final Identifier loc = new Identifier(base, "textures/" + file);
|
||||
getMinecraft().getTextureManager().bindTexture(loc);
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
final Fluid fluid = fs.getFluid();
|
||||
FluidAttributes fluidAttributes = fluid.getAttributes();
|
||||
bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||
ResourceLocation fluidStillTexture = fluidAttributes.getStillTexture(fs.getFluidStack());
|
||||
Identifier fluidStillTexture = fluidAttributes.getStillTexture(fs.getFluidStack());
|
||||
final TextureAtlasSprite sprite = getMinecraft()
|
||||
.getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(fluidStillTexture);
|
||||
|
||||
@@ -762,11 +762,11 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
}
|
||||
|
||||
public void bindTexture(final String file) {
|
||||
final ResourceLocation loc = new ResourceLocation(AppEng.MOD_ID, "textures/" + file);
|
||||
final Identifier loc = new Identifier(AppEng.MOD_ID, "textures/" + file);
|
||||
getMinecraft().getTextureManager().bindTexture(loc);
|
||||
}
|
||||
|
||||
public void bindTexture(final ResourceLocation loc) {
|
||||
public void bindTexture(final Identifier loc) {
|
||||
getMinecraft().getTextureManager().bindTexture(loc);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import javax.annotation.Nonnull;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraftforge.items.SlotItemHandler;
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ class Size1Slot extends SlotItemHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public boolean isEnabled() {
|
||||
return this.delegate.isEnabled();
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.CopyMode;
|
||||
@@ -43,7 +43,7 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
|
||||
private ToggleButton copyMode;
|
||||
|
||||
public CellWorkbenchScreen(CellWorkbenchContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
|
||||
this.copyMode.setState(this.container.getCopyMode() == CopyMode.CLEAR_ON_REMOVE);
|
||||
|
||||
boolean hasFuzzy = false;
|
||||
final IItemHandler inv = this.container.getCellUpgradeInventory();
|
||||
final ItemTransferable inv = this.container.getCellUpgradeInventory();
|
||||
for (int x = 0; x < inv.getSlots(); x++) {
|
||||
final ItemStack is = inv.getStackInSlot(x);
|
||||
if (!is.isEmpty() && is.getItem() instanceof IUpgradeModule) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -32,7 +32,7 @@ import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class ChestScreen extends AEBaseScreen<ChestContainer> {
|
||||
|
||||
public ChestScreen(ChestContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public ChestScreen(ChestContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.config.CondenserOutput;
|
||||
@@ -36,7 +36,7 @@ public class CondenserScreen extends AEBaseScreen<CondenserContainer> {
|
||||
|
||||
private SettingToggleButton<CondenserOutput> mode;
|
||||
|
||||
public CondenserScreen(CondenserContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CondenserScreen(CondenserContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 197;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -39,7 +39,7 @@ public class CraftAmountScreen extends AEBaseScreen<CraftAmountContainer> {
|
||||
|
||||
private Button next;
|
||||
|
||||
public CraftAmountScreen(CraftAmountContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftAmountScreen(CraftAmountContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -64,7 +64,7 @@ public class CraftConfirmScreen extends AEBaseScreen<CraftConfirmContainer> {
|
||||
private Button selectCPU;
|
||||
private int tooltip = -1;
|
||||
|
||||
public CraftConfirmScreen(CraftConfirmContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftConfirmScreen(CraftConfirmContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
this.xSize = 238;
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.apache.commons.lang3.time.DurationFormatUtils;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -90,7 +90,7 @@ public class CraftingCPUScreen<T extends CraftingCPUContainer> extends AEBaseScr
|
||||
private Button cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
public CraftingCPUScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftingCPUScreen(T container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = GUI_HEIGHT;
|
||||
this.xSize = GUI_WIDTH;
|
||||
|
||||
@@ -24,7 +24,7 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.container.implementations.CraftingStatusContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
@@ -38,7 +38,7 @@ public class CraftingStatusScreen extends CraftingCPUScreen<CraftingStatusContai
|
||||
private Button selectCPU;
|
||||
|
||||
public CraftingStatusScreen(CraftingStatusContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
@@ -33,7 +33,7 @@ import appeng.helpers.InventoryAction;
|
||||
|
||||
public class CraftingTermScreen extends MEMonitorableScreen<CraftingTermContainer> {
|
||||
|
||||
public CraftingTermScreen(CraftingTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftingTermScreen(CraftingTermContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setReservedSpace(73);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -32,7 +32,7 @@ import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class DriveScreen extends AEBaseScreen<DriveContainer> {
|
||||
|
||||
public DriveScreen(DriveContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public DriveScreen(DriveContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 199;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -38,7 +38,7 @@ public class FormationPlaneScreen extends UpgradeableScreen<FormationPlaneContai
|
||||
private SettingToggleButton<YesNo> placeMode;
|
||||
|
||||
public FormationPlaneScreen(FormationPlaneContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -28,7 +28,7 @@ import appeng.core.localization.GuiText;
|
||||
|
||||
public class GrinderScreen extends AEBaseScreen<GrinderContainer> {
|
||||
|
||||
public GrinderScreen(GrinderContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public GrinderScreen(GrinderContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 176;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FullnessMode;
|
||||
@@ -37,7 +37,7 @@ public class IOPortScreen extends UpgradeableScreen<IOPortContainer> {
|
||||
private SettingToggleButton<FullnessMode> fullMode;
|
||||
private SettingToggleButton<OperationMode> operationMode;
|
||||
|
||||
public IOPortScreen(IOPortContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public IOPortScreen(IOPortContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -32,7 +32,7 @@ public class InscriberScreen extends AEBaseScreen<InscriberContainer> {
|
||||
|
||||
private ProgressBar pb;
|
||||
|
||||
public InscriberScreen(InscriberContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public InscriberScreen(InscriberContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 176;
|
||||
this.xSize = this.hasToolbox() ? 246 : 211;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
@@ -39,7 +39,7 @@ public class InterfaceScreen extends UpgradeableScreen<InterfaceContainer> {
|
||||
private SettingToggleButton<YesNo> blockMode;
|
||||
private ToggleButton interfaceMode;
|
||||
|
||||
public InterfaceScreen(InterfaceContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public InterfaceScreen(InterfaceContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 211;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -68,7 +68,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
|
||||
private AETextField searchField;
|
||||
|
||||
public InterfaceTerminalScreen(InterfaceTerminalContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
@@ -217,7 +217,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
|
||||
try {
|
||||
final long id = Long.parseLong(key.substring(1), Character.MAX_RADIX);
|
||||
final CompoundTag invData = in.getCompound(key);
|
||||
ITextComponent un = ITextComponent.Serializer.fromJson(invData.getString("un"));
|
||||
Text un = Text.Serializer.fromJson(invData.getString("un"));
|
||||
final ClientDCInternalInv current = this.getById(id, invData.getLong("sortBy"), un);
|
||||
|
||||
for (int x = 0; x < current.getInventory().getSlots(); x++) {
|
||||
@@ -367,7 +367,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
|
||||
return this.names.size() + this.byId.size();
|
||||
}
|
||||
|
||||
private ClientDCInternalInv getById(final long id, final long sortBy, final ITextComponent name) {
|
||||
private ClientDCInternalInv getById(final long id, final long sortBy, final Text name) {
|
||||
ClientDCInternalInv o = this.byId.get(id);
|
||||
|
||||
if (o == null) {
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.LevelType;
|
||||
@@ -54,7 +54,7 @@ public class LevelEmitterScreen extends UpgradeableScreen<LevelEmitterContainer>
|
||||
private SettingToggleButton<LevelType> levelMode;
|
||||
private SettingToggleButton<YesNo> craftingMode;
|
||||
|
||||
public LevelEmitterScreen(LevelEmitterContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public LevelEmitterScreen(LevelEmitterContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
@@ -87,7 +87,7 @@ public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBas
|
||||
private int currentMouseX = 0;
|
||||
private int currentMouseY = 0;
|
||||
|
||||
public MEMonitorableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public MEMonitorableScreen(T container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.container.implementations.MEPortableCellContainer;
|
||||
|
||||
public class MEPortableCellScreen extends MEMonitorableScreen<MEPortableCellContainer> {
|
||||
|
||||
public MEPortableCellScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -34,7 +34,7 @@ public class MolecularAssemblerScreen extends UpgradeableScreen<MolecularAssembl
|
||||
private ProgressBar pb;
|
||||
|
||||
public MolecularAssemblerScreen(MolecularAssemblerContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 197;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.config.SortDir;
|
||||
@@ -49,7 +49,7 @@ public class NetworkStatusScreen extends AEBaseScreen<NetworkStatusContainer> im
|
||||
private int tooltip = -1;
|
||||
|
||||
public NetworkStatusScreen(NetworkStatusContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -33,7 +33,7 @@ public class NetworkToolScreen extends AEBaseScreen<NetworkToolContainer> {
|
||||
|
||||
private ToggleButton tFacades;
|
||||
|
||||
public NetworkToolScreen(NetworkToolContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public NetworkToolScreen(NetworkToolContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
@@ -48,7 +48,7 @@ public class PatternTermScreen extends MEMonitorableScreen<PatternTermContainer>
|
||||
private ActionButton substitutionsEnabledBtn;
|
||||
private ActionButton substitutionsDisabledBtn;
|
||||
|
||||
public PatternTermScreen(PatternTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public PatternTermScreen(PatternTermContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setReservedSpace(81);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.NumberBox;
|
||||
@@ -37,7 +37,7 @@ public class PriorityScreen extends AEBaseScreen<PriorityContainer> {
|
||||
|
||||
private NumberBox priority;
|
||||
|
||||
public PriorityScreen(PriorityContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public PriorityScreen(PriorityContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubScreen(this, container.getPriorityHost());
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -28,7 +28,7 @@ import appeng.core.localization.GuiText;
|
||||
|
||||
public class QNBScreen extends AEBaseScreen<QNBContainer> {
|
||||
|
||||
public QNBScreen(QNBContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public QNBScreen(QNBContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.lwjgl.glfw.GLFW;
|
||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.ActionKey;
|
||||
@@ -38,7 +38,7 @@ public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
|
||||
|
||||
private TextFieldWidget name;
|
||||
|
||||
public QuartzKnifeScreen(QuartzKnifeContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public QuartzKnifeScreen(QuartzKnifeContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 184;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.SortOrder;
|
||||
@@ -38,7 +38,7 @@ public class SecurityStationScreen extends MEMonitorableScreen<SecurityStationCo
|
||||
private ToggleButton security;
|
||||
|
||||
public SecurityStationScreen(SecurityStationContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setCustomSortOrder(false);
|
||||
this.setReservedSpace(33);
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -30,9 +30,9 @@ import appeng.core.localization.GuiText;
|
||||
|
||||
public class SkyChestScreen extends AEBaseScreen<SkyChestContainer> {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(AppEng.MOD_ID, "textures/guis/skychest.png");
|
||||
private static final Identifier TEXTURE = new Identifier(AppEng.MOD_ID, "textures/guis/skychest.png");
|
||||
|
||||
public SkyChestScreen(SkyChestContainer container, PlayerInventory playerInv, ITextComponent title) {
|
||||
public SkyChestScreen(SkyChestContainer container, PlayerInventory playerInv, Text title) {
|
||||
super(container, playerInv, title);
|
||||
this.ySize = 195;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -31,7 +31,7 @@ import appeng.util.Platform;
|
||||
public class SpatialIOPortScreen extends AEBaseScreen<SpatialIOPortContainer> {
|
||||
|
||||
public SpatialIOPortScreen(SpatialIOPortContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 199;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
@@ -42,7 +42,7 @@ public class StorageBusScreen extends UpgradeableScreen<StorageBusContainer> {
|
||||
private SettingToggleButton<AccessRestriction> rwMode;
|
||||
private SettingToggleButton<StorageFilter> storageFilter;
|
||||
|
||||
public StorageBusScreen(StorageBusContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public StorageBusScreen(StorageBusContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -47,7 +47,7 @@ public class UpgradeableScreen<T extends UpgradeableContainer> extends AEBaseScr
|
||||
protected SettingToggleButton<YesNo> craftMode;
|
||||
protected SettingToggleButton<SchedulingMode> schedulingMode;
|
||||
|
||||
public UpgradeableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public UpgradeableScreen(T container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.cvb = container;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -36,7 +36,7 @@ public class VibrationChamberScreen extends AEBaseScreen<VibrationChamberContain
|
||||
private ProgressBar pb;
|
||||
|
||||
public VibrationChamberScreen(VibrationChamberContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
@@ -30,7 +30,7 @@ import appeng.util.Platform;
|
||||
|
||||
public class WirelessScreen extends AEBaseScreen<WirelessContainer> {
|
||||
|
||||
public WirelessScreen(WirelessContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public WirelessScreen(WirelessContainer container, PlayerInventory playerInventory, Text title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.client.gui.implementations;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.container.implementations.MEPortableCellContainer;
|
||||
|
||||
@@ -27,7 +27,7 @@ import appeng.container.implementations.MEPortableCellContainer;
|
||||
public class WirelessTermScreen extends MEMonitorableScreen<MEPortableCellContainer> {
|
||||
|
||||
public WirelessTermScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
Text title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
public abstract class IconButton extends Button implements ITooltip {
|
||||
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
|
||||
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
|
||||
"textures/guis/states.png");
|
||||
|
||||
private boolean halfSize = false;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.gui.widgets;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
@@ -29,7 +29,7 @@ import appeng.core.localization.GuiText;
|
||||
public class ProgressBar extends Widget implements ITooltip {
|
||||
|
||||
private final IProgressProvider source;
|
||||
private final ResourceLocation texture;
|
||||
private final Identifier texture;
|
||||
private final int fill_u;
|
||||
private final int fill_v;
|
||||
private final Direction layout;
|
||||
@@ -45,7 +45,7 @@ public class ProgressBar extends Widget implements ITooltip {
|
||||
final int u, final int y, final int width, final int height, final Direction dir, final String title) {
|
||||
super(posX, posY, width, height, "");
|
||||
this.source = source;
|
||||
this.texture = new ResourceLocation("appliedenergistics2", "textures/" + texture);
|
||||
this.texture = new Identifier("appliedenergistics2", "textures/" + texture);
|
||||
this.fill_u = u;
|
||||
this.fill_v = y;
|
||||
this.layout = dir;
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.CondenserOutput;
|
||||
@@ -234,7 +234,7 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
|
||||
}
|
||||
|
||||
private static void registerApp(final int iconIndex, final Settings setting, final Enum<?> val,
|
||||
final ButtonToolTips title, final ITextComponent hint) {
|
||||
final ButtonToolTips title, final Text hint) {
|
||||
final ButtonAppearance a = new ButtonAppearance();
|
||||
a.displayName = title.getTranslationKey();
|
||||
a.displayValue = hint;
|
||||
@@ -279,8 +279,8 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
ITextComponent displayName = null;
|
||||
ITextComponent displayValue = null;
|
||||
Text displayName = null;
|
||||
Text displayValue = null;
|
||||
|
||||
if (this.buttonSetting != null && this.currentValue != null) {
|
||||
final ButtonAppearance buttonAppearance = appearances
|
||||
@@ -355,7 +355,7 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
|
||||
|
||||
private static class ButtonAppearance {
|
||||
public int index;
|
||||
public ITextComponent displayName;
|
||||
public ITextComponent displayValue;
|
||||
public Text displayName;
|
||||
public Text displayValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class TabButton extends Button implements ITooltip {
|
||||
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
|
||||
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
|
||||
"textures/guis/states.png");
|
||||
private final ItemRenderer itemRenderer;
|
||||
private int hideEdge = 0;
|
||||
|
||||
@@ -25,11 +25,11 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
public class ToggleButton extends Button implements ITooltip {
|
||||
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
|
||||
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
|
||||
"textures/guis/states.png");
|
||||
private static final Pattern PATTERN_NEW_LINE = Pattern.compile("\\n", Pattern.LITERAL);
|
||||
private final int iconIdxOn;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.me;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv> {
|
||||
private final long id;
|
||||
private final long sortBy;
|
||||
|
||||
public ClientDCInternalInv(final int size, final long id, final long sortBy, final ITextComponent name) {
|
||||
public ClientDCInternalInv(final int size, final long id, final long sortBy, final Text name) {
|
||||
this.inventory = new AppEngInternalInventory(null, size);
|
||||
this.searchName = name.getString().toLowerCase();
|
||||
this.formattedName = name.getFormattedText();
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -117,9 +117,9 @@ public class FluidRepo {
|
||||
}
|
||||
|
||||
if (terminalSearchToolTips && notDone && !searchMod) {
|
||||
final List<ITextComponent> tooltip = Platform.getTooltip(fs);
|
||||
final List<Text> tooltip = Platform.getTooltip(fs);
|
||||
|
||||
for (final ITextComponent line : tooltip) {
|
||||
for (final Text line : tooltip) {
|
||||
if (m.matcher(line.getString()).find()) {
|
||||
foundMatchingFluidStack = true;
|
||||
break;
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
@@ -155,9 +155,9 @@ public class ItemRepo {
|
||||
}
|
||||
|
||||
if (terminalSearchToolTips && notDone && !searchMod) {
|
||||
final List<ITextComponent> tooltip = Platform.getTooltip(is);
|
||||
final List<Text> tooltip = Platform.getTooltip(is);
|
||||
|
||||
for (final ITextComponent line : tooltip) {
|
||||
for (final Text line : tooltip) {
|
||||
if (m.matcher(line.getString()).find()) {
|
||||
foundMatchingItemStack = true;
|
||||
notDone = false;
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.client.render;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.renderer.color.IBlockColor;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ILightReader;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ColorableTileBlockColor implements IBlockColor {
|
||||
AEColor color = AEColor.TRANSPARENT; // Default to a neutral color
|
||||
|
||||
if (worldIn != null && pos != null) {
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
BlockEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof IColorableTile) {
|
||||
color = ((IColorableTile) te).getColor();
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@ import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import javax.annotation.Nullable;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
|
||||
@@ -25,25 +25,25 @@ import java.util.function.Function;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.TransformationMatrix;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.ItemLayerModel;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import appeng.fluids.items.FluidDummyItem;
|
||||
|
||||
@@ -94,13 +94,13 @@ public class DummyFluidDispatcherBakedModel extends DelegateBakedModel {
|
||||
|
||||
FluidDummyItem itemFacade = (FluidDummyItem) stack.getItem();
|
||||
|
||||
FluidStack fluidStack = itemFacade.getFluidStack(stack);
|
||||
FluidVolume fluidStack = itemFacade.getFluidStack(stack);
|
||||
if (fluidStack.isEmpty()) {
|
||||
fluidStack = new FluidStack(Fluids.WATER, FluidAttributes.BUCKET_VOLUME);
|
||||
fluidStack = new FluidVolume(Fluids.WATER, FluidAttributes.BUCKET_VOLUME);
|
||||
}
|
||||
|
||||
FluidAttributes attributes = fluidStack.getFluid().getAttributes();
|
||||
ResourceLocation stillTexture = attributes.getStillTexture(fluidStack);
|
||||
Identifier stillTexture = attributes.getStillTexture(fluidStack);
|
||||
Material stillMaterial = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, stillTexture);
|
||||
TextureAtlasSprite sprite = DummyFluidDispatcherBakedModel.this.bakedTextureGetter.apply(stillMaterial);
|
||||
if (sprite == null) {
|
||||
|
||||
@@ -25,14 +25,14 @@ import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -44,13 +44,13 @@ import appeng.core.AppEng;
|
||||
*/
|
||||
public class DummyFluidItemModel implements IModelGeometry<DummyFluidItemModel> {
|
||||
// We use this to get the default item transforms and make our lives easier
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID,
|
||||
private static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID,
|
||||
"item/dummy_fluid_item_base");
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
IBakedModel bakedBaseModel = bakery.getBakedModel(MODEL_BASE, modelTransform, spriteGetter);
|
||||
|
||||
return new DummyFluidDispatcherBakedModel(bakedBaseModel, spriteGetter);
|
||||
@@ -58,7 +58,7 @@ public class DummyFluidItemModel implements IModelGeometry<DummyFluidItemModel>
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.client.render;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.*;
|
||||
import net.minecraft.client.render.model.*;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -40,12 +40,12 @@ import appeng.core.AppEng;
|
||||
public class FacadeItemModel implements IModelGeometry<FacadeItemModel> {
|
||||
|
||||
// We use this to get the default item transforms and make our lives easier
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID, "item/facade_base");
|
||||
private static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/facade_base");
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
IBakedModel bakedBaseModel = bakery.getBakedModel(MODEL_BASE, modelTransform, spriteGetter);
|
||||
FacadeBuilder facadeBuilder = new FacadeBuilder();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class FacadeItemModel implements IModelGeometry<FacadeItemModel> {
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return modelGetter.apply(MODEL_BASE).getTextures(modelGetter, missingTextureErrors);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
package appeng.client.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.Quaternion;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.client.render;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.render;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.TransformationMatrix;
|
||||
import net.minecraft.client.renderer.Vector3f;
|
||||
@@ -75,7 +75,7 @@ public class StackSizeRenderer {
|
||||
final int X = (int) ((xPos + offset + 16.0f - fontRenderer.getStringWidth(text) * scaleFactor)
|
||||
* inverseScaleFactor);
|
||||
final int Y = (int) ((yPos + offset + 16.0f - 7.0f * scaleFactor) * inverseScaleFactor);
|
||||
IRenderTypeBuffer.Impl buffer = IRenderTypeBuffer.getImpl(Tessellator.getInstance().getBuffer());
|
||||
VertexConsumerProvider.Impl buffer = VertexConsumerProvider.getImpl(Tessellator.getInstance().getBuffer());
|
||||
fontRenderer.renderString(text, X, Y, 16777215, true, tm.getMatrix(), buffer, false, 0, 15728880);
|
||||
buffer.finish();
|
||||
RenderSystem.enableBlend();
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package appeng.client.render;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.Vector3f;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.Direction;
|
||||
@@ -81,8 +81,8 @@ public class TesrRenderHelper {
|
||||
/**
|
||||
* Render an item in 2D.
|
||||
*/
|
||||
public static void renderItem2d(MatrixStack matrixStack, IRenderTypeBuffer buffers, ItemStack itemStack,
|
||||
float scale, int combinedLightIn, int combinedOverlayIn) {
|
||||
public static void renderItem2d(MatrixStack matrixStack, VertexConsumerProvider buffers, ItemStack itemStack,
|
||||
float scale, int combinedLightIn, int combinedOverlayIn) {
|
||||
if (!itemStack.isEmpty()) {
|
||||
matrixStack.push();
|
||||
// Push it out of the block face a bit to avoid z-fighting
|
||||
@@ -110,7 +110,7 @@ public class TesrRenderHelper {
|
||||
* @param combinedLightIn
|
||||
* @param combinedOverlayIn
|
||||
*/
|
||||
public static void renderItem2dWithAmount(MatrixStack matrixStack, IRenderTypeBuffer buffers,
|
||||
public static void renderItem2dWithAmount(MatrixStack matrixStack, VertexConsumerProvider buffers,
|
||||
IAEItemStack itemStack, float itemScale, float spacing, int combinedLightIn, int combinedOverlayIn) {
|
||||
final ItemStack renderStack = itemStack.asItemStackRepresentation();
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -100,7 +100,7 @@ class CableBuilder {
|
||||
}
|
||||
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, textureFolder + color.name().toLowerCase()));
|
||||
new Identifier(AppEng.MOD_ID, textureFolder + color.name().toLowerCase()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,14 +32,14 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.MissingTextureSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
@@ -56,12 +56,12 @@ public class CableBusBakedModel implements IBakedModel {
|
||||
|
||||
private final FacadeBuilder facadeBuilder;
|
||||
|
||||
private final Map<ResourceLocation, IBakedModel> partModels;
|
||||
private final Map<Identifier, IBakedModel> partModels;
|
||||
|
||||
private final TextureAtlasSprite particleTexture;
|
||||
|
||||
CableBusBakedModel(CableBuilder cableBuilder, FacadeBuilder facadeBuilder,
|
||||
Map<ResourceLocation, IBakedModel> partModels, TextureAtlasSprite particleTexture) {
|
||||
Map<Identifier, IBakedModel> partModels, TextureAtlasSprite particleTexture) {
|
||||
this.cableBuilder = cableBuilder;
|
||||
this.facadeBuilder = facadeBuilder;
|
||||
this.partModels = partModels;
|
||||
@@ -111,7 +111,7 @@ public class CableBusBakedModel implements IBakedModel {
|
||||
partModelData = EmptyModelData.INSTANCE;
|
||||
}
|
||||
|
||||
for (ResourceLocation model : partModel.getModels()) {
|
||||
for (Identifier model : partModel.getModels()) {
|
||||
IBakedModel bakedModel = this.partModels.get(model);
|
||||
|
||||
if (bakedModel == null) {
|
||||
@@ -281,7 +281,7 @@ public class CableBusBakedModel implements IBakedModel {
|
||||
for (Direction side : renderState.getAttachments().keySet()) {
|
||||
IPartModel partModel = renderState.getAttachments().get(side);
|
||||
|
||||
for (ResourceLocation model : partModel.getModels()) {
|
||||
for (Identifier model : partModel.getModels()) {
|
||||
IBakedModel bakedModel = this.partModels.get(model);
|
||||
|
||||
if (bakedModel == null) {
|
||||
|
||||
@@ -4,12 +4,12 @@ import net.minecraft.client.particle.IParticleRenderType;
|
||||
import net.minecraft.client.particle.SpriteTexturedParticle;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
// Derived from Vanilla's BreakingParticle, but allows
|
||||
// a texture to be specified directly rather than via an itemstack
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class CableBusBreakingParticle extends SpriteTexturedParticle {
|
||||
|
||||
private final float field_217571_C;
|
||||
|
||||
@@ -27,14 +27,14 @@ import java.util.function.Function;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -56,8 +56,8 @@ public class CableBusModel implements IModelGeometry<CableBusModel> {
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
Map<ResourceLocation, IBakedModel> partModels = this.loadPartModels(bakery, spriteGetter, modelTransform);
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
Map<Identifier, IBakedModel> partModels = this.loadPartModels(bakery, spriteGetter, modelTransform);
|
||||
|
||||
CableBuilder cableBuilder = new CableBuilder(spriteGetter);
|
||||
FacadeBuilder facadeBuilder = new FacadeBuilder();
|
||||
@@ -72,15 +72,15 @@ public class CableBusModel implements IModelGeometry<CableBusModel> {
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.unmodifiableList(CableBuilder.getTextures());
|
||||
}
|
||||
|
||||
private Map<ResourceLocation, IBakedModel> loadPartModels(ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetterIn, IModelTransform transformIn) {
|
||||
ImmutableMap.Builder<ResourceLocation, IBakedModel> result = ImmutableMap.builder();
|
||||
private Map<Identifier, IBakedModel> loadPartModels(ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetterIn, IModelTransform transformIn) {
|
||||
ImmutableMap.Builder<Identifier, IBakedModel> result = ImmutableMap.builder();
|
||||
|
||||
for (ResourceLocation location : this.partModels.getModels()) {
|
||||
for (Identifier location : this.partModels.getModels()) {
|
||||
IBakedModel bakedModel = bakery.getBakedModel(location, transformIn, spriteGetterIn);
|
||||
if (bakedModel == null) {
|
||||
AELog.warn("Failed to bake part model {}", location);
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
@@ -87,7 +87,7 @@ public class CableBusRenderState {
|
||||
// cut out holes for the parts. This
|
||||
// list is only populated if there are
|
||||
// facades on this cable bus
|
||||
private List<AxisAlignedBB> boundingBoxes = new ArrayList<>();
|
||||
private List<Box> boundingBoxes = new ArrayList<>();
|
||||
|
||||
// Additional model data passed to the part models
|
||||
private EnumMap<Direction, IModelData> partModelData = new EnumMap<>(Direction.class);
|
||||
@@ -168,7 +168,7 @@ public class CableBusRenderState {
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
public List<AxisAlignedBB> getBoundingBoxes() {
|
||||
public List<Box> getBoundingBoxes() {
|
||||
return this.boundingBoxes;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -74,7 +74,7 @@ public enum CableCoreType {
|
||||
|
||||
public Material getTexture(AEColor color) {
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase()));
|
||||
new Identifier(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.client.renderer.Vector4f;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.client.render.cablebus;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.fluid.IFluidState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ILightReader;
|
||||
@@ -51,7 +51,7 @@ public class FacadeBlockAccess implements ILightReader {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity getTileEntity(BlockPos pos) {
|
||||
public BlockEntity getTileEntity(BlockPos pos) {
|
||||
return this.world.getTileEntity(pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@ import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.RenderTypeLookup;
|
||||
import net.minecraft.client.renderer.color.BlockColors;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Direction.Axis;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ILightReader;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
@@ -72,21 +72,21 @@ public class FacadeBuilder {
|
||||
public static final double THICK_THICKNESS = 2D / 16D;
|
||||
public static final double THIN_THICKNESS = 1D / 16D;
|
||||
|
||||
public static final AxisAlignedBB[] THICK_FACADE_BOXES = new AxisAlignedBB[] {
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, THICK_THICKNESS, 1.0),
|
||||
new AxisAlignedBB(0.0, 1.0 - THICK_THICKNESS, 0.0, 1.0, 1.0, 1.0),
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 1.0, THICK_THICKNESS),
|
||||
new AxisAlignedBB(0.0, 0.0, 1.0 - THICK_THICKNESS, 1.0, 1.0, 1.0),
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, THICK_THICKNESS, 1.0, 1.0),
|
||||
new AxisAlignedBB(1.0 - THICK_THICKNESS, 0.0, 0.0, 1.0, 1.0, 1.0) };
|
||||
public static final Box[] THICK_FACADE_BOXES = new Box[] {
|
||||
new Box(0.0, 0.0, 0.0, 1.0, THICK_THICKNESS, 1.0),
|
||||
new Box(0.0, 1.0 - THICK_THICKNESS, 0.0, 1.0, 1.0, 1.0),
|
||||
new Box(0.0, 0.0, 0.0, 1.0, 1.0, THICK_THICKNESS),
|
||||
new Box(0.0, 0.0, 1.0 - THICK_THICKNESS, 1.0, 1.0, 1.0),
|
||||
new Box(0.0, 0.0, 0.0, THICK_THICKNESS, 1.0, 1.0),
|
||||
new Box(1.0 - THICK_THICKNESS, 0.0, 0.0, 1.0, 1.0, 1.0) };
|
||||
|
||||
public static final AxisAlignedBB[] THIN_FACADE_BOXES = new AxisAlignedBB[] {
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, THIN_THICKNESS, 1.0),
|
||||
new AxisAlignedBB(0.0, 1.0 - THIN_THICKNESS, 0.0, 1.0, 1.0, 1.0),
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 1.0, THIN_THICKNESS),
|
||||
new AxisAlignedBB(0.0, 0.0, 1.0 - THIN_THICKNESS, 1.0, 1.0, 1.0),
|
||||
new AxisAlignedBB(0.0, 0.0, 0.0, THIN_THICKNESS, 1.0, 1.0),
|
||||
new AxisAlignedBB(1.0 - THIN_THICKNESS, 0.0, 0.0, 1.0, 1.0, 1.0) };
|
||||
public static final Box[] THIN_FACADE_BOXES = new Box[] {
|
||||
new Box(0.0, 0.0, 0.0, 1.0, THIN_THICKNESS, 1.0),
|
||||
new Box(0.0, 1.0 - THIN_THICKNESS, 0.0, 1.0, 1.0, 1.0),
|
||||
new Box(0.0, 0.0, 0.0, 1.0, 1.0, THIN_THICKNESS),
|
||||
new Box(0.0, 0.0, 1.0 - THIN_THICKNESS, 1.0, 1.0, 1.0),
|
||||
new Box(0.0, 0.0, 0.0, THIN_THICKNESS, 1.0, 1.0),
|
||||
new Box(1.0 - THIN_THICKNESS, 0.0, 0.0, 1.0, 1.0, 1.0) };
|
||||
|
||||
private final ThreadLocal<BakedPipeline> pipelines = ThreadLocal.withInitial(() -> BakedPipeline.builder()
|
||||
// Clamper is responsible for clamping the vertex to the bounds specified.
|
||||
@@ -105,12 +105,12 @@ public class FacadeBuilder {
|
||||
private final ThreadLocal<Quad> collectors = ThreadLocal.withInitial(Quad::new);
|
||||
|
||||
public void buildFacadeQuads(RenderType layer, CableBusRenderState renderState, Random rand, List<BakedQuad> quads,
|
||||
Function<ResourceLocation, IBakedModel> modelLookup) {
|
||||
Function<Identifier, IBakedModel> modelLookup) {
|
||||
BakedPipeline pipeline = this.pipelines.get();
|
||||
Quad collectorQuad = this.collectors.get();
|
||||
boolean transparent = AEApi.instance().partHelper().getCableRenderMode().transparentFacades;
|
||||
Map<Direction, FacadeRenderState> facadeStates = renderState.getFacades();
|
||||
List<AxisAlignedBB> partBoxes = renderState.getBoundingBoxes();
|
||||
List<Box> partBoxes = renderState.getBoundingBoxes();
|
||||
Set<Direction> sidesWithParts = renderState.getAttachments().keySet();
|
||||
ILightReader parentWorld = renderState.getWorld();
|
||||
BlockPos pos = renderState.getPos();
|
||||
@@ -123,7 +123,7 @@ public class FacadeBuilder {
|
||||
FacadeRenderState facadeRenderState = entry.getValue();
|
||||
boolean renderStilt = !sidesWithParts.contains(side);
|
||||
if (layer == RenderType.getCutout() && renderStilt) {
|
||||
for (ResourceLocation part : CableAnchorPart.FACADE_MODELS.getModels()) {
|
||||
for (Identifier part : CableAnchorPart.FACADE_MODELS.getModels()) {
|
||||
IBakedModel partModel = modelLookup.apply(part);
|
||||
QuadRotator rotator = new QuadRotator();
|
||||
quads.addAll(rotator.rotateQuads(gatherQuads(partModel, null, rand, EmptyModelData.INSTANCE), side,
|
||||
@@ -143,8 +143,8 @@ public class FacadeBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB fullBounds = thinFacades ? THIN_FACADE_BOXES[sideIndex] : THICK_FACADE_BOXES[sideIndex];
|
||||
AxisAlignedBB facadeBox = fullBounds;
|
||||
Box fullBounds = thinFacades ? THIN_FACADE_BOXES[sideIndex] : THICK_FACADE_BOXES[sideIndex];
|
||||
Box facadeBox = fullBounds;
|
||||
// If we are a transparent facade, we need to modify out BB.
|
||||
if (facadeRenderState.isTransparent()) {
|
||||
double offset = thinFacades ? THIN_THICKNESS : THICK_THICKNESS;
|
||||
@@ -188,7 +188,7 @@ public class FacadeBuilder {
|
||||
}
|
||||
|
||||
AEAxisAlignedBB cutOutBox = getCutOutBox(facadeBox, partBoxes);
|
||||
List<AxisAlignedBB> holeStrips = getBoxes(facadeBox, cutOutBox, side.getAxis());
|
||||
List<Box> holeStrips = getBoxes(facadeBox, cutOutBox, side.getAxis());
|
||||
ILightReader facadeAccess = new FacadeBlockAccess(parentWorld, pos, side, blockState);
|
||||
|
||||
BlockRendererDispatcher dispatcher = Minecraft.getInstance().getBlockRendererDispatcher();
|
||||
@@ -253,9 +253,9 @@ public class FacadeBuilder {
|
||||
CachedFormat format = CachedFormat.lookup(DefaultVertexFormats.BLOCK);
|
||||
// If this quad has a tint index, setup the tinter.
|
||||
if (quad.hasTintIndex()) {
|
||||
tinter.setTint(blockColors.getColor(blockState, facadeAccess, pos, quad.getTintIndex()));
|
||||
tinter.setTint(blockColors.getColor(blockState, facadeAccess, pos, quad.getColorIndex()));
|
||||
}
|
||||
for (AxisAlignedBB box : holeStrips) {
|
||||
for (Box box : holeStrips) {
|
||||
// setup the clamper for this box
|
||||
clamper.setClampBounds(box);
|
||||
// Reset the pipeline, clears all enabled/disabled states.
|
||||
@@ -307,7 +307,7 @@ public class FacadeBuilder {
|
||||
collectorQuad.reset(format);
|
||||
// If we have a tint index, setup the tinter and enable it.
|
||||
if (quad.hasTintIndex()) {
|
||||
tinter.setTint(Minecraft.getInstance().getItemColors().getColor(textureItem, quad.getTintIndex()));
|
||||
tinter.setTint(Minecraft.getInstance().getItemColors().getColor(textureItem, quad.getColorIndex()));
|
||||
pipeline.enableElement("tinter");
|
||||
}
|
||||
// Disable elements we don't need for items.
|
||||
@@ -343,9 +343,9 @@ public class FacadeBuilder {
|
||||
* box. This AABB will need to be "cut out" when the facade is rendered.
|
||||
*/
|
||||
@Nullable
|
||||
private static AEAxisAlignedBB getCutOutBox(AxisAlignedBB facadeBox, List<AxisAlignedBB> partBoxes) {
|
||||
private static AEAxisAlignedBB getCutOutBox(Box facadeBox, List<Box> partBoxes) {
|
||||
AEAxisAlignedBB b = null;
|
||||
for (AxisAlignedBB bb : partBoxes) {
|
||||
for (Box bb : partBoxes) {
|
||||
if (bb.intersects(facadeBox)) {
|
||||
if (b == null) {
|
||||
b = AEAxisAlignedBB.fromBounds(bb);
|
||||
@@ -372,34 +372,34 @@ public class FacadeBuilder {
|
||||
*
|
||||
* @return The box segments.
|
||||
*/
|
||||
private static List<AxisAlignedBB> getBoxes(AxisAlignedBB fb, AEAxisAlignedBB hole, Axis axis) {
|
||||
private static List<Box> getBoxes(Box fb, AEAxisAlignedBB hole, Axis axis) {
|
||||
if (hole == null) {
|
||||
return Collections.singletonList(fb);
|
||||
}
|
||||
List<AxisAlignedBB> boxes = new ArrayList<>();
|
||||
List<Box> boxes = new ArrayList<>();
|
||||
switch (axis) {
|
||||
case Y:
|
||||
boxes.add(new AxisAlignedBB(fb.minX, fb.minY, fb.minZ, hole.minX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new AxisAlignedBB(hole.maxX, fb.minY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, fb.minY, fb.minZ, hole.minX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new Box(hole.maxX, fb.minY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
|
||||
boxes.add(new AxisAlignedBB(hole.minX, fb.minY, fb.minZ, hole.maxX, fb.maxY, hole.minZ));
|
||||
boxes.add(new AxisAlignedBB(hole.minX, fb.minY, hole.maxZ, hole.maxX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new Box(hole.minX, fb.minY, fb.minZ, hole.maxX, fb.maxY, hole.minZ));
|
||||
boxes.add(new Box(hole.minX, fb.minY, hole.maxZ, hole.maxX, fb.maxY, fb.maxZ));
|
||||
|
||||
break;
|
||||
case Z:
|
||||
boxes.add(new AxisAlignedBB(fb.minX, fb.minY, fb.minZ, fb.maxX, hole.minY, fb.maxZ));
|
||||
boxes.add(new AxisAlignedBB(fb.minX, hole.maxY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, fb.minY, fb.minZ, fb.maxX, hole.minY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, hole.maxY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
|
||||
boxes.add(new AxisAlignedBB(fb.minX, hole.minY, fb.minZ, hole.minX, hole.maxY, fb.maxZ));
|
||||
boxes.add(new AxisAlignedBB(hole.maxX, hole.minY, fb.minZ, fb.maxX, hole.maxY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, hole.minY, fb.minZ, hole.minX, hole.maxY, fb.maxZ));
|
||||
boxes.add(new Box(hole.maxX, hole.minY, fb.minZ, fb.maxX, hole.maxY, fb.maxZ));
|
||||
|
||||
break;
|
||||
case X:
|
||||
boxes.add(new AxisAlignedBB(fb.minX, fb.minY, fb.minZ, fb.maxX, hole.minY, fb.maxZ));
|
||||
boxes.add(new AxisAlignedBB(fb.minX, hole.maxY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, fb.minY, fb.minZ, fb.maxX, hole.minY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, hole.maxY, fb.minZ, fb.maxX, fb.maxY, fb.maxZ));
|
||||
|
||||
boxes.add(new AxisAlignedBB(fb.minX, hole.minY, fb.minZ, fb.maxX, hole.maxY, hole.minZ));
|
||||
boxes.add(new AxisAlignedBB(fb.minX, hole.minY, hole.maxZ, fb.maxX, hole.maxY, fb.maxZ));
|
||||
boxes.add(new Box(fb.minX, hole.minY, fb.minZ, fb.maxX, hole.maxY, hole.minZ));
|
||||
boxes.add(new Box(fb.minX, hole.minY, hole.maxZ, fb.maxX, hole.maxY, fb.maxZ));
|
||||
break;
|
||||
default:
|
||||
// should never happen.
|
||||
@@ -413,11 +413,11 @@ public class FacadeBuilder {
|
||||
* Determines if any of the part's bounding boxes intersects with the outside 2
|
||||
* voxel wide layer. If so, we should use thinner facades (1 voxel deep).
|
||||
*/
|
||||
private static boolean isUseThinFacades(List<AxisAlignedBB> partBoxes) {
|
||||
private static boolean isUseThinFacades(List<Box> partBoxes) {
|
||||
final double min = 2.0 / 16.0;
|
||||
final double max = 14.0 / 16.0;
|
||||
|
||||
for (AxisAlignedBB bb : partBoxes) {
|
||||
for (Box bb : partBoxes) {
|
||||
int o = 0;
|
||||
o += bb.maxX > max ? 1 : 0;
|
||||
o += bb.maxY > max ? 1 : 0;
|
||||
|
||||
@@ -10,8 +10,8 @@ import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.IDynamicBakedModel;
|
||||
|
||||
@@ -7,15 +7,15 @@ import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -23,12 +23,12 @@ import appeng.core.AppEng;
|
||||
|
||||
public class P2PTunnelFrequencyModel implements IModelGeometry<P2PTunnelFrequencyModel> {
|
||||
private static final Material TEXTURE = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/p2p_tunnel_frequency"));
|
||||
new Identifier(AppEng.MOD_ID, "parts/p2p_tunnel_frequency"));
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
try {
|
||||
final TextureAtlasSprite texture = spriteGetter.apply(TEXTURE);
|
||||
return new P2PTunnelFrequencyBakedModel(texture);
|
||||
@@ -39,7 +39,7 @@ public class P2PTunnelFrequencyModel implements IModelGeometry<P2PTunnelFrequenc
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.singleton(TEXTURE);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.Vector3f;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ package appeng.client.render.cablebus;
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Function;
|
||||
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@@ -34,16 +34,16 @@ import appeng.core.AppEng;
|
||||
public class SmartCableTextures {
|
||||
|
||||
public static final Material[] SMART_CHANNELS_TEXTURES = Arrays
|
||||
.stream(new ResourceLocation[] { new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_00"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_01"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_02"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_03"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_04"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_10"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_11"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_12"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_13"), //
|
||||
new ResourceLocation(AppEng.MOD_ID, "parts/cable/smart/channels_14")//
|
||||
.stream(new Identifier[] { new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_00"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_01"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_02"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_03"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_04"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_10"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_11"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_12"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_13"), //
|
||||
new Identifier(AppEng.MOD_ID, "parts/cable/smart/channels_14")//
|
||||
}).map(e -> new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, e)).toArray(Material[]::new);
|
||||
|
||||
// Textures used to display channels on smart cables. There's two sets of 5
|
||||
|
||||
@@ -28,8 +28,8 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.IDynamicBakedModel;
|
||||
|
||||
@@ -25,15 +25,15 @@ import java.util.function.Function;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -68,7 +68,7 @@ class CraftingCubeModel implements IModelGeometry<CraftingCubeModel> {
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return ImmutableList.of(RING_CORNER, RING_SIDE_HOR, RING_SIDE_VER, UNIT_BASE, LIGHT_BASE, ACCELERATOR_LIGHT,
|
||||
STORAGE_1K_LIGHT, STORAGE_4K_LIGHT, STORAGE_16K_LIGHT, STORAGE_64K_LIGHT, MONITOR_BASE,
|
||||
MONITOR_LIGHT_DARK, MONITOR_LIGHT_MEDIUM, MONITOR_LIGHT_BRIGHT);
|
||||
@@ -77,7 +77,7 @@ class CraftingCubeModel implements IModelGeometry<CraftingCubeModel> {
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
// Retrieve our textures and pass them on to the baked model
|
||||
TextureAtlasSprite ringCorner = spriteGetter.apply(RING_CORNER);
|
||||
TextureAtlasSprite ringSideHor = spriteGetter.apply(RING_SIDE_HOR);
|
||||
@@ -122,6 +122,6 @@ class CraftingCubeModel implements IModelGeometry<CraftingCubeModel> {
|
||||
|
||||
private static Material texture(String name) {
|
||||
return new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "block/crafting/" + name));
|
||||
new Identifier(AppEng.MOD_ID, "block/crafting/" + name));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
import appeng.bootstrap.IBlockRendering;
|
||||
@@ -31,7 +31,7 @@ import appeng.bootstrap.IItemRendering;
|
||||
*/
|
||||
public class CraftingCubeRendering extends BlockRenderingCustomizer {
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
|
||||
rendering.renderType(RenderType.getCutout());
|
||||
// Disable auto-rotation
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.render.TesrRenderHelper;
|
||||
@@ -34,7 +34,7 @@ import appeng.tile.crafting.CraftingMonitorTileEntity;
|
||||
/**
|
||||
* Renders the item currently being crafted
|
||||
*/
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class CraftingMonitorTESR extends TileEntityRenderer<CraftingMonitorTileEntity> {
|
||||
|
||||
public CraftingMonitorTESR(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
@@ -43,7 +43,7 @@ public class CraftingMonitorTESR extends TileEntityRenderer<CraftingMonitorTileE
|
||||
|
||||
@Override
|
||||
public void render(CraftingMonitorTileEntity te, float partialTicks, MatrixStack matrixStack,
|
||||
IRenderTypeBuffer buffers, int combinedLight, int combinedOverlay) {
|
||||
VertexConsumerProvider buffers, int combinedLight, int combinedOverlay) {
|
||||
|
||||
Direction facing = te.getForward();
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ package appeng.client.render.crafting;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.renderer.TransformationMatrix;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -6,14 +6,14 @@ import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -22,22 +22,22 @@ import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
*/
|
||||
public class EncodedPatternModel implements IModelGeometry<EncodedPatternModel> {
|
||||
|
||||
private final ResourceLocation baseModel;
|
||||
private final Identifier baseModel;
|
||||
|
||||
public EncodedPatternModel(ResourceLocation baseModel) {
|
||||
public EncodedPatternModel(Identifier baseModel) {
|
||||
this.baseModel = baseModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return modelGetter.apply(baseModel).getTextures(modelGetter, missingTextureErrors);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
IBakedModel baseModel = bakery.getBakedModel(this.baseModel, modelTransform, spriteGetter);
|
||||
return new EncodedPatternBakedModel(baseModel);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModelLoader;
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ public class EncodedPatternModelLoader implements IModelLoader<EncodedPatternMod
|
||||
@Override
|
||||
public EncodedPatternModel read(JsonDeserializationContext deserializationContext, JsonObject modelContents) {
|
||||
modelContents.remove("loader"); // Avoid recursion
|
||||
ResourceLocation baseModel = new ResourceLocation(JSONUtils.getString(modelContents, "baseModel"));
|
||||
Identifier baseModel = new Identifier(JSONUtils.getString(modelContents, "baseModel"));
|
||||
return new EncodedPatternModel(baseModel);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
@@ -25,12 +26,9 @@ import net.minecraft.client.particle.RedstoneParticle;
|
||||
import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.particles.RedstoneParticleData;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class ChargedOreFX extends RedstoneParticle {
|
||||
|
||||
private static final RedstoneParticleData PARTICLE_DATA = new RedstoneParticleData(0.21f, 0.61f, 1.0f, 1.0f);
|
||||
@@ -51,7 +49,7 @@ public class ChargedOreFX extends RedstoneParticle {
|
||||
return j1 << 20 | j1 << 4;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.client.render.effects;
|
||||
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
import net.minecraft.client.particle.IParticleRenderType;
|
||||
@@ -31,12 +32,9 @@ import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class CraftingFx extends SpriteTexturedParticle {
|
||||
|
||||
// Offset relative to center of block, is the starting point of the particle
|
||||
@@ -127,7 +125,7 @@ public class CraftingFx extends SpriteTexturedParticle {
|
||||
}
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -20,16 +20,14 @@ package appeng.client.render.effects;
|
||||
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class EnergyFx extends SpriteTexturedParticle {
|
||||
|
||||
private final int startBlkX;
|
||||
@@ -98,7 +96,7 @@ public class EnergyFx extends SpriteTexturedParticle {
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<EnergyParticleData> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Locale;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.particles.IParticleData;
|
||||
import net.minecraft.particles.ParticleType;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class EnergyParticleData implements IParticleData {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnergyParticleData read(ParticleType<EnergyParticleData> particleTypeIn, PacketBuffer buffer) {
|
||||
public EnergyParticleData read(ParticleType<EnergyParticleData> particleTypeIn, PacketByteBuf buffer) {
|
||||
boolean forItem = buffer.readBoolean();
|
||||
AEPartLocation direction = AEPartLocation.values()[buffer.readByte()];
|
||||
return new EnergyParticleData(forItem, direction);
|
||||
@@ -67,7 +67,7 @@ public class EnergyParticleData implements IParticleData {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer) {
|
||||
public void write(PacketByteBuf buffer) {
|
||||
buffer.writeBoolean(forItem);
|
||||
buffer.writeByte((byte) direction.ordinal());
|
||||
}
|
||||
|
||||
@@ -20,17 +20,15 @@ package appeng.client.render.effects;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.particle.SpriteTexturedParticle;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.EnvType;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class LightningArcFX extends LightningFX {
|
||||
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
@@ -68,7 +66,7 @@ public class LightningArcFX extends LightningFX {
|
||||
}
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<LightningArcParticleData> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Locale;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.particles.IParticleData;
|
||||
import net.minecraft.particles.ParticleType;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -37,7 +37,7 @@ public class LightningArcParticleData implements IParticleData {
|
||||
|
||||
@Override
|
||||
public LightningArcParticleData read(ParticleType<LightningArcParticleData> particleTypeIn,
|
||||
PacketBuffer buffer) {
|
||||
PacketByteBuf buffer) {
|
||||
float x = buffer.readFloat();
|
||||
float y = buffer.readFloat();
|
||||
float z = buffer.readFloat();
|
||||
@@ -51,7 +51,7 @@ public class LightningArcParticleData implements IParticleData {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer) {
|
||||
public void write(PacketByteBuf buffer) {
|
||||
buffer.writeFloat((float) target.x);
|
||||
buffer.writeFloat((float) target.y);
|
||||
buffer.writeFloat((float) target.z);
|
||||
|
||||
@@ -22,6 +22,8 @@ import java.util.Random;
|
||||
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
@@ -34,12 +36,8 @@ import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class LightningFX extends SpriteTexturedParticle {
|
||||
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
@@ -246,7 +244,7 @@ public class LightningFX extends SpriteTexturedParticle {
|
||||
return this.precomputedSteps;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -18,14 +18,13 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.minecraft.client.particle.*;
|
||||
import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.core.AppEng;
|
||||
|
||||
public class MatterCannonFX extends SpriteTexturedParticle {
|
||||
|
||||
@@ -73,7 +72,7 @@ public class MatterCannonFX extends SpriteTexturedParticle {
|
||||
this.particleAlpha *= 0.59f;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
package appeng.client.render.effects;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.particle.IAnimatedSprite;
|
||||
import net.minecraft.client.particle.IParticleFactory;
|
||||
import net.minecraft.client.particle.IParticleRenderType;
|
||||
@@ -25,12 +27,8 @@ import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.particle.SpriteTexturedParticle;
|
||||
import net.minecraft.particles.BasicParticleType;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.core.AppEng;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class VibrantFX extends SpriteTexturedParticle {
|
||||
|
||||
public VibrantFX(final World par1World, final double x, final double y, final double z, final double par8,
|
||||
@@ -81,7 +79,7 @@ public class VibrantFX extends SpriteTexturedParticle {
|
||||
this.maxAge--;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static class Factory implements IParticleFactory<BasicParticleType> {
|
||||
private final IAnimatedSprite spriteSet;
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.Vector4f;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
@@ -106,7 +106,7 @@ public class AutoRotatingBakedModel implements IBakedModel {
|
||||
// the normal back to a byte-based format, which then re-applies Forge's own bug
|
||||
// when piping it
|
||||
// to the AO lighter, thus fixing our problem.
|
||||
BakedQuad packedQuad = new BakedQuad(unpackedQuad.getVertexData(), quad.getTintIndex(),
|
||||
BakedQuad packedQuad = new BakedQuad(unpackedQuad.getVertexData(), quad.getColorIndex(),
|
||||
unpackedQuad.getFace(), quad.func_187508_a(), quad.shouldApplyDiffuseLighting());
|
||||
rotated.add(packedQuad);
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -9,15 +9,15 @@ import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -29,13 +29,13 @@ import appeng.core.AppEng;
|
||||
*/
|
||||
public class BiometricCardModel implements IModelGeometry<BiometricCardModel> {
|
||||
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID, "item/biometric_card_base");
|
||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/biometric_card_base");
|
||||
private static final Material TEXTURE = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "item/biometric_card_hash"));
|
||||
new Identifier(AppEng.MOD_ID, "item/biometric_card_hash"));
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.singleton(TEXTURE);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class BiometricCardModel implements IModelGeometry<BiometricCardModel> {
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform transformIn,
|
||||
ItemOverrideList overrides, ResourceLocation locationIn) {
|
||||
ItemOverrideList overrides, Identifier locationIn) {
|
||||
TextureAtlasSprite texture = spriteGetter.apply(TEXTURE);
|
||||
|
||||
IBakedModel baseModel = bakery.getBakedModel(MODEL_BASE, transformIn, spriteGetter);
|
||||
|
||||
@@ -7,14 +7,14 @@ import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.PerspectiveMapWrapper;
|
||||
|
||||
@@ -7,15 +7,15 @@ import java.util.function.Function;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -27,26 +27,26 @@ import appeng.core.AppEng;
|
||||
*/
|
||||
public class ColorApplicatorModel implements IModelGeometry<ColorApplicatorModel> {
|
||||
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID,
|
||||
private static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID,
|
||||
"item/color_applicator_colored");
|
||||
|
||||
private static final Material TEXTURE_DARK = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "item/color_applicator_tip_dark"));
|
||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_dark"));
|
||||
private static final Material TEXTURE_MEDIUM = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "item/color_applicator_tip_medium"));
|
||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_medium"));
|
||||
private static final Material TEXTURE_BRIGHT = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "item/color_applicator_tip_bright"));
|
||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_bright"));
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Arrays.asList(TEXTURE_DARK, TEXTURE_MEDIUM, TEXTURE_DARK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
IBakedModel baseModel = bakery.getBakedModel(MODEL_BASE, modelTransform, spriteGetter);
|
||||
|
||||
TextureAtlasSprite texDark = spriteGetter.apply(TEXTURE_DARK);
|
||||
|
||||
@@ -28,8 +28,8 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
|
||||
@@ -29,14 +29,14 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -44,21 +44,21 @@ import appeng.block.storage.DriveSlotCellType;
|
||||
|
||||
public class DriveModel implements IModelGeometry<DriveModel> {
|
||||
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(
|
||||
private static final Identifier MODEL_BASE = new Identifier(
|
||||
"appliedenergistics2:block/drive/drive_base");
|
||||
|
||||
private static final Map<DriveSlotCellType, ResourceLocation> MODELS_CELLS = ImmutableMap.of(
|
||||
DriveSlotCellType.EMPTY, new ResourceLocation("appliedenergistics2:block/drive/drive_cell_empty"),
|
||||
DriveSlotCellType.ITEM, new ResourceLocation("appliedenergistics2:block/drive/drive_cell_items"),
|
||||
DriveSlotCellType.FLUID, new ResourceLocation("appliedenergistics2:block/drive/drive_cell_fluids"));
|
||||
private static final Map<DriveSlotCellType, Identifier> MODELS_CELLS = ImmutableMap.of(
|
||||
DriveSlotCellType.EMPTY, new Identifier("appliedenergistics2:block/drive/drive_cell_empty"),
|
||||
DriveSlotCellType.ITEM, new Identifier("appliedenergistics2:block/drive/drive_cell_items"),
|
||||
DriveSlotCellType.FLUID, new Identifier("appliedenergistics2:block/drive/drive_cell_fluids"));
|
||||
|
||||
public static final Set<ResourceLocation> DEPENDENCIES = ImmutableSet.<ResourceLocation>builder()
|
||||
public static final Set<Identifier> DEPENDENCIES = ImmutableSet.<Identifier>builder()
|
||||
.addAll(MODELS_CELLS.values()).add(MODEL_BASE).build();
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
EnumMap<DriveSlotCellType, IBakedModel> cellModels = new EnumMap<>(DriveSlotCellType.class);
|
||||
|
||||
// Load the base model and the model for each cell state.
|
||||
@@ -73,7 +73,7 @@ public class DriveModel implements IModelGeometry<DriveModel> {
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,15 +32,15 @@ import javax.annotation.Nullable;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormatElement;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -65,13 +65,13 @@ class GlassBakedModel implements IDynamicBakedModel {
|
||||
|
||||
// Alternating textures based on position
|
||||
static final Material TEXTURE_A = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation("appliedenergistics2:block/glass/quartz_glass_a"));
|
||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_a"));
|
||||
static final Material TEXTURE_B = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation("appliedenergistics2:block/glass/quartz_glass_b"));
|
||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_b"));
|
||||
static final Material TEXTURE_C = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation("appliedenergistics2:block/glass/quartz_glass_c"));
|
||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_c"));
|
||||
static final Material TEXTURE_D = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation("appliedenergistics2:block/glass/quartz_glass_d"));
|
||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_d"));
|
||||
|
||||
// Frame texture
|
||||
static final Material[] TEXTURES_FRAME = generateTexturesFrame();
|
||||
@@ -79,7 +79,7 @@ class GlassBakedModel implements IDynamicBakedModel {
|
||||
// Generates the required textures for the frame
|
||||
private static Material[] generateTexturesFrame() {
|
||||
return IntStream.range(1, 16).mapToObj(Integer::toBinaryString).map(s -> Strings.padStart(s, 4, '0'))
|
||||
.map(s -> new ResourceLocation("appliedenergistics2:block/glass/quartz_glass_frame" + s))
|
||||
.map(s -> new Identifier("appliedenergistics2:block/glass/quartz_glass_frame" + s))
|
||||
.map(rl -> new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, rl)).toArray(Material[]::new);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@ import java.util.function.Function;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -44,13 +44,13 @@ public class GlassModel implements IModelGeometry<GlassModel> {
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
return new GlassBakedModel(spriteGetter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return ImmutableSet
|
||||
.<Material>builder().add(GlassBakedModel.TEXTURE_A, GlassBakedModel.TEXTURE_B,
|
||||
GlassBakedModel.TEXTURE_C, GlassBakedModel.TEXTURE_D)
|
||||
|
||||
@@ -11,13 +11,13 @@ import javax.annotation.Nullable;
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -9,15 +9,15 @@ import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -29,13 +29,13 @@ import appeng.core.AppEng;
|
||||
*/
|
||||
public class MemoryCardModel implements IModelGeometry<MemoryCardModel> {
|
||||
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation(AppEng.MOD_ID, "item/memory_card_base");
|
||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/memory_card_base");
|
||||
private static final Material TEXTURE = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE,
|
||||
new ResourceLocation(AppEng.MOD_ID, "item/memory_card_hash"));
|
||||
new Identifier(AppEng.MOD_ID, "item/memory_card_hash"));
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.singleton(TEXTURE);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class MemoryCardModel implements IModelGeometry<MemoryCardModel> {
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
TextureAtlasSprite texture = spriteGetter.apply(TEXTURE);
|
||||
|
||||
IBakedModel baseModel = bakery.getBakedModel(MODEL_BASE, modelTransform, spriteGetter);
|
||||
|
||||
@@ -28,10 +28,10 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||
import net.minecraft.client.renderer.Matrix4f;
|
||||
import net.minecraft.client.renderer.Quaternion;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
@@ -27,14 +27,14 @@ import java.util.function.Function;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
|
||||
@@ -44,18 +44,18 @@ import net.minecraftforge.client.model.geometry.IModelGeometry;
|
||||
*/
|
||||
public class SkyCompassModel implements IModelGeometry<SkyCompassModel> {
|
||||
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation(
|
||||
private static final Identifier MODEL_BASE = new Identifier(
|
||||
"appliedenergistics2:block/sky_compass_base");
|
||||
|
||||
private static final ResourceLocation MODEL_POINTER = new ResourceLocation(
|
||||
private static final Identifier MODEL_POINTER = new Identifier(
|
||||
"appliedenergistics2:block/sky_compass_pointer");
|
||||
|
||||
public static final List<ResourceLocation> DEPENDENCIES = ImmutableList.of(MODEL_BASE, MODEL_POINTER);
|
||||
public static final List<Identifier> DEPENDENCIES = ImmutableList.of(MODEL_BASE, MODEL_POINTER);
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
IBakedModel baseModel = bakery.getBakedModel(MODEL_BASE, modelTransform, spriteGetter);
|
||||
IBakedModel pointerModel = bakery.getBakedModel(MODEL_POINTER, modelTransform, spriteGetter);
|
||||
return new SkyCompassBakedModel(baseModel, pointerModel);
|
||||
@@ -63,7 +63,7 @@ public class SkyCompassModel implements IModelGeometry<SkyCompassModel> {
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
Function<Identifier, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,32 +31,32 @@ import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.TransformationMatrix;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.BlockFaceUV;
|
||||
import net.minecraft.client.renderer.model.BlockModel;
|
||||
import net.minecraft.client.renderer.model.BlockPart;
|
||||
import net.minecraft.client.renderer.model.BlockPartFace;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.model.IModelTransform;
|
||||
import net.minecraft.client.renderer.model.IUnbakedModel;
|
||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.model.ItemOverride;
|
||||
import net.minecraft.client.renderer.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.model.ItemTransformVec3f;
|
||||
import net.minecraft.client.renderer.model.Material;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.render.model.BakedQuad;
|
||||
import net.minecraft.client.render.model.BlockFaceUV;
|
||||
import net.minecraft.client.render.model.BlockModel;
|
||||
import net.minecraft.client.render.model.BlockPart;
|
||||
import net.minecraft.client.render.model.BlockPartFace;
|
||||
import net.minecraft.client.render.model.IBakedModel;
|
||||
import net.minecraft.client.render.model.IModelTransform;
|
||||
import net.minecraft.client.render.model.IUnbakedModel;
|
||||
import net.minecraft.client.render.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.render.model.ItemOverride;
|
||||
import net.minecraft.client.render.model.ItemOverrideList;
|
||||
import net.minecraft.client.render.model.ItemTransformVec3f;
|
||||
import net.minecraft.client.render.model.Material;
|
||||
import net.minecraft.client.render.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.resources.IResourceManager;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModelBuilder;
|
||||
import net.minecraftforge.client.model.IModelConfiguration;
|
||||
import net.minecraftforge.client.model.IModelLoader;
|
||||
@@ -144,7 +144,7 @@ public class UVLModelLoader implements IModelLoader<UVLModelLoader.UVLModelWrapp
|
||||
@Override
|
||||
public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery,
|
||||
Function<Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform,
|
||||
ItemOverrideList overrides, ResourceLocation modelLocation) {
|
||||
ItemOverrideList overrides, Identifier modelLocation) {
|
||||
TextureAtlasSprite particle = spriteGetter.apply(owner.resolveTexture("particle"));
|
||||
|
||||
IModelBuilder<?> builder = IModelBuilder.of(owner, overrides, particle);
|
||||
@@ -192,7 +192,7 @@ public class UVLModelLoader implements IModelLoader<UVLModelLoader.UVLModelWrapp
|
||||
trans.setTransform(identity.getLast());
|
||||
trans.setParent(builder);
|
||||
quad.pipe(trans);
|
||||
builder.setQuadTint(quad.getTintIndex());
|
||||
builder.setQuadTint(quad.getColorIndex());
|
||||
builder.setQuadOrientation(quad.getFace());
|
||||
builder.setApplyDiffuseLighting(false);
|
||||
return builder.build();
|
||||
@@ -200,7 +200,7 @@ public class UVLModelLoader implements IModelLoader<UVLModelLoader.UVLModelWrapp
|
||||
|
||||
@Override
|
||||
public Collection<Material> getTextures(IModelConfiguration owner,
|
||||
Function<ResourceLocation, IUnbakedModel> modelGetter,
|
||||
Function<Identifier, IUnbakedModel> modelGetter,
|
||||
Set<com.mojang.datafixers.util.Pair<String, String>> missingTextureErrors) {
|
||||
return parent.getTextures(modelGetter, missingTextureErrors);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user