rename TileLegacyMachineBase to TileMachineBase

This commit is contained in:
modmuss50 2018-09-17 07:31:41 +01:00
parent 714ddd075b
commit f6d5d88a4b
32 changed files with 80 additions and 82 deletions

View file

@ -32,7 +32,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.Range; import org.apache.commons.lang3.Range;
import org.apache.commons.lang3.tuple.MutableTriple; import org.apache.commons.lang3.tuple.MutableTriple;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import techreborn.client.container.IRightClickHandler; import techreborn.client.container.IRightClickHandler;
@ -56,11 +56,11 @@ public class BuiltContainer extends Container {
private List<Consumer<InventoryCrafting>> craftEvents; private List<Consumer<InventoryCrafting>> craftEvents;
private Integer[] integerParts; private Integer[] integerParts;
private final TileLegacyMachineBase tile; private final TileMachineBase tile;
public BuiltContainer(final String name, final Predicate<EntityPlayer> canInteract, public BuiltContainer(final String name, final Predicate<EntityPlayer> canInteract,
final List<Range<Integer>> playerSlotRange, final List<Range<Integer>> playerSlotRange,
final List<Range<Integer>> tileSlotRange, TileLegacyMachineBase tile) { final List<Range<Integer>> tileSlotRange, TileMachineBase tile) {
this.name = name; this.name = name;
this.canInteract = canInteract; this.canInteract = canInteract;

View file

@ -30,7 +30,7 @@ import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import org.apache.commons.lang3.Range; import org.apache.commons.lang3.Range;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -76,7 +76,7 @@ public class ContainerBuilder {
return new ContainerPlayerInventoryBuilder(this, player); return new ContainerPlayerInventoryBuilder(this, player);
} }
public ContainerTileInventoryBuilder tile(final TileLegacyMachineBase tile) { public ContainerTileInventoryBuilder tile(final TileMachineBase tile) {
return new ContainerTileInventoryBuilder(this, tile); return new ContainerTileInventoryBuilder(this, tile);
} }
@ -88,7 +88,7 @@ public class ContainerBuilder {
this.tileInventoryRanges.add(range); this.tileInventoryRanges.add(range);
} }
public BuiltContainer create(final TileLegacyMachineBase tile) { public BuiltContainer create(final TileMachineBase tile) {
final BuiltContainer built = new BuiltContainer(this.name, this.canInteract, final BuiltContainer built = new BuiltContainer(this.name, this.canInteract,
this.playerInventoryRanges, this.playerInventoryRanges,
this.tileInventoryRanges, tile); this.tileInventoryRanges, tile);

View file

@ -38,7 +38,7 @@ import reborncore.client.gui.slots.BaseSlot;
import reborncore.client.gui.slots.SlotFake; import reborncore.client.gui.slots.SlotFake;
import reborncore.client.gui.slots.SlotOutput; import reborncore.client.gui.slots.SlotOutput;
import reborncore.common.powerSystem.TilePowerAcceptor; import reborncore.common.powerSystem.TilePowerAcceptor;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.client.container.builder.slot.FilteredSlot; import techreborn.client.container.builder.slot.FilteredSlot;
import techreborn.client.container.builder.slot.FurnaceFuelSlot; import techreborn.client.container.builder.slot.FurnaceFuelSlot;
@ -51,11 +51,11 @@ import java.util.function.Predicate;
public class ContainerTileInventoryBuilder { public class ContainerTileInventoryBuilder {
private final TileLegacyMachineBase tile; private final TileMachineBase tile;
private final ContainerBuilder parent; private final ContainerBuilder parent;
private final int rangeStart; private final int rangeStart;
ContainerTileInventoryBuilder(final ContainerBuilder parent, final TileLegacyMachineBase tile) { ContainerTileInventoryBuilder(final ContainerBuilder parent, final TileMachineBase tile) {
this.tile = tile; this.tile = tile;
this.parent = parent; this.parent = parent;
this.rangeStart = parent.slots.size(); this.rangeStart = parent.slots.size();

View file

@ -36,7 +36,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import reborncore.api.tile.IUpgradeable; import reborncore.api.tile.IUpgradeable;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.client.container.builder.BuiltContainer; import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.gui.slot.GuiFluidConfiguration; import techreborn.client.gui.slot.GuiFluidConfiguration;
import techreborn.client.gui.slot.GuiSlotConfiguration; import techreborn.client.gui.slot.GuiSlotConfiguration;
@ -318,8 +318,8 @@ public class GuiBase extends GuiContainer {
return super.isPointInRegion(rectX, rectY, rectWidth, rectHeight, pointX, pointY); return super.isPointInRegion(rectX, rectY, rectWidth, rectHeight, pointX, pointY);
} }
public TileLegacyMachineBase getMachine(){ public TileMachineBase getMachine(){
return (TileLegacyMachineBase) tile; return (TileMachineBase) tile;
} }

View file

@ -29,7 +29,7 @@ import net.minecraft.client.Minecraft;
import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
import techreborn.client.gui.slot.elements.ConfigFluidElement; import techreborn.client.gui.slot.elements.ConfigFluidElement;
import techreborn.client.gui.slot.elements.ElementBase; import techreborn.client.gui.slot.elements.ElementBase;
@ -138,15 +138,15 @@ public class GuiFluidConfiguration {
} }
@Nullable @Nullable
private static TileLegacyMachineBase getMachine() { private static TileMachineBase getMachine() {
if (!(Minecraft.getMinecraft().currentScreen instanceof GuiBase)) { if (!(Minecraft.getMinecraft().currentScreen instanceof GuiBase)) {
return null; return null;
} }
GuiBase base = (GuiBase) Minecraft.getMinecraft().currentScreen; GuiBase base = (GuiBase) Minecraft.getMinecraft().currentScreen;
if (!(base.tile instanceof TileLegacyMachineBase)) { if (!(base.tile instanceof TileMachineBase)) {
return null; return null;
} }
TileLegacyMachineBase machineBase = (TileLegacyMachineBase) base.tile; TileMachineBase machineBase = (TileMachineBase) base.tile;
return machineBase; return machineBase;
} }

View file

@ -32,14 +32,13 @@ import net.minecraft.inventory.Slot;
import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.SlotItemHandler; import net.minecraftforge.items.SlotItemHandler;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import reborncore.client.gui.GuiUtil; import reborncore.client.gui.GuiUtil;
import reborncore.common.network.NetworkManager; import reborncore.common.network.NetworkManager;
import reborncore.common.network.packet.PacketConfigSave; import reborncore.common.network.packet.PacketConfigSave;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.client.container.builder.BuiltContainer; import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
import techreborn.client.gui.slot.elements.ConfigSlotElement; import techreborn.client.gui.slot.elements.ConfigSlotElement;
@ -127,7 +126,7 @@ public class GuiSlotConfiguration {
} }
public static void copyToClipboard(){ public static void copyToClipboard(){
TileLegacyMachineBase machine = getMachine(); TileMachineBase machine = getMachine();
if(machine == null || machine.slotConfiguration == null){ if(machine == null || machine.slotConfiguration == null){
return; return;
} }
@ -137,7 +136,7 @@ public class GuiSlotConfiguration {
} }
public static void pasteFromClipboard(){ public static void pasteFromClipboard(){
TileLegacyMachineBase machine = getMachine(); TileMachineBase machine = getMachine();
if(machine == null || machine.slotConfiguration == null){ if(machine == null || machine.slotConfiguration == null){
return; return;
} }
@ -152,15 +151,15 @@ public class GuiSlotConfiguration {
} }
@Nullable @Nullable
private static TileLegacyMachineBase getMachine(){ private static TileMachineBase getMachine(){
if(!(Minecraft.getMinecraft().currentScreen instanceof GuiBase)){ if(!(Minecraft.getMinecraft().currentScreen instanceof GuiBase)){
return null; return null;
} }
GuiBase base = (GuiBase) Minecraft.getMinecraft().currentScreen; GuiBase base = (GuiBase) Minecraft.getMinecraft().currentScreen;
if(!(base.tile instanceof TileLegacyMachineBase)){ if(!(base.tile instanceof TileMachineBase)){
return null; return null;
} }
TileLegacyMachineBase machineBase = (TileLegacyMachineBase) base.tile; TileMachineBase machineBase = (TileMachineBase) base.tile;
return machineBase; return machineBase;
} }

View file

@ -24,7 +24,7 @@
package techreborn.client.gui.slot.elements; package techreborn.client.gui.slot.elements;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
import java.util.function.Predicate; import java.util.function.Predicate;
@ -32,12 +32,12 @@ import java.util.function.Predicate;
public class CheckBoxElement extends ElementBase { public class CheckBoxElement extends ElementBase {
public String label, type; public String label, type;
public int labelColor, slotID; public int labelColor, slotID;
public TileLegacyMachineBase machineBase; public TileMachineBase machineBase;
Predicate<CheckBoxElement> ticked; Predicate<CheckBoxElement> ticked;
private Sprite.CheckBox checkBoxSprite; private Sprite.CheckBox checkBoxSprite;
public CheckBoxElement(String label, int labelColor, int x, int y, String type, int slotID, Sprite.CheckBox checkBoxSprite, TileLegacyMachineBase machineBase, Predicate<CheckBoxElement> ticked) { public CheckBoxElement(String label, int labelColor, int x, int y, String type, int slotID, Sprite.CheckBox checkBoxSprite, TileMachineBase machineBase, Predicate<CheckBoxElement> ticked) {
super(x, y, checkBoxSprite.getNormal()); super(x, y, checkBoxSprite.getNormal());
this.checkBoxSprite = checkBoxSprite; this.checkBoxSprite = checkBoxSprite;
this.type = type; this.type = type;

View file

@ -31,7 +31,7 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import reborncore.client.gui.guibuilder.GuiBuilder; import reborncore.client.gui.guibuilder.GuiBuilder;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
@ -110,7 +110,7 @@ public class ElementBase {
return container; return container;
} }
public void adjustDimensions(TileLegacyMachineBase provider) { public void adjustDimensions(TileMachineBase provider) {
if (container.offsetSprites != null) { if (container.offsetSprites != null) {
for (OffsetSprite offsetSprite : container.offsetSprites) { for (OffsetSprite offsetSprite : container.offsetSprites) {
if (offsetSprite.getSprite().getSprite(provider).width + offsetSprite.getOffsetX(provider) > this.width) { if (offsetSprite.getSprite().getSprite(provider).width + offsetSprite.getOffsetX(provider) > this.width) {
@ -175,12 +175,12 @@ public class ElementBase {
return this; return this;
} }
public int getWidth(TileLegacyMachineBase provider) { public int getWidth(TileMachineBase provider) {
adjustDimensions(provider); adjustDimensions(provider);
return width; return width;
} }
public int getHeight(TileLegacyMachineBase provider) { public int getHeight(TileMachineBase provider) {
adjustDimensions(provider); adjustDimensions(provider);
return height; return height;
} }
@ -218,28 +218,28 @@ public class ElementBase {
return this; return this;
} }
public boolean onHover(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onHover(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
for (ElementBase.Action action : hoverActions) { for (ElementBase.Action action : hoverActions) {
action.execute(this, gui, provider, mouseX, mouseY); action.execute(this, gui, provider, mouseX, mouseY);
} }
return !hoverActions.isEmpty(); return !hoverActions.isEmpty();
} }
public boolean onDrag(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onDrag(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
for (ElementBase.Action action : dragActions) { for (ElementBase.Action action : dragActions) {
action.execute(this, gui, provider, mouseX, mouseY); action.execute(this, gui, provider, mouseX, mouseY);
} }
return !dragActions.isEmpty(); return !dragActions.isEmpty();
} }
public boolean onStartPress(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onStartPress(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
for (ElementBase.Action action : startPressActions) { for (ElementBase.Action action : startPressActions) {
action.execute(this, gui, provider, mouseX, mouseY); action.execute(this, gui, provider, mouseX, mouseY);
} }
return !startPressActions.isEmpty(); return !startPressActions.isEmpty();
} }
public boolean onRelease(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onRelease(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
for (ElementBase.Action action : releaseActions) { for (ElementBase.Action action : releaseActions) {
if(action.execute(this, gui, provider, mouseX, mouseY)){ if(action.execute(this, gui, provider, mouseX, mouseY)){
return true; return true;
@ -254,7 +254,7 @@ public class ElementBase {
} }
public interface Action { public interface Action {
boolean execute(ElementBase element, GuiBase gui, TileLegacyMachineBase provider, int mouseX, int mouseY); boolean execute(ElementBase element, GuiBase gui, TileMachineBase provider, int mouseX, int mouseY);
} }
public interface UpdateAction { public interface UpdateAction {

View file

@ -39,7 +39,7 @@ import reborncore.common.network.NetworkManager;
import reborncore.common.network.packet.PacketFluidConfigSave; import reborncore.common.network.packet.PacketFluidConfigSave;
import reborncore.common.network.packet.PacketFluidIOSave; import reborncore.common.network.packet.PacketFluidIOSave;
import reborncore.common.tile.FluidConfiguration; import reborncore.common.tile.FluidConfiguration;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.MachineFacing; import reborncore.common.util.MachineFacing;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
@ -61,7 +61,7 @@ public class FluidConfigPopupElement extends ElementBase {
drawDefaultBackground(gui, adjustX(gui, getX() - 8), adjustY(gui, getY() - 7), 84, 105 + (filter ? 15 : 0)); drawDefaultBackground(gui, adjustX(gui, getX() - 8), adjustY(gui, getY() - 7), 84, 105 + (filter ? 15 : 0));
super.draw(gui); super.draw(gui);
TileLegacyMachineBase machine = ((TileLegacyMachineBase) gui.tile); TileMachineBase machine = ((TileMachineBase) gui.tile);
IBlockAccess blockAccess = machine.getWorld(); IBlockAccess blockAccess = machine.getWorld();
BlockPos pos = machine.getPos(); BlockPos pos = machine.getPos();
IBlockState state = blockAccess.getBlockState(pos); IBlockState state = blockAccess.getBlockState(pos);
@ -85,7 +85,7 @@ public class FluidConfigPopupElement extends ElementBase {
} }
@Override @Override
public boolean onRelease(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onRelease(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
if (isInBox(23, 4, 16, 16, mouseX, mouseY, gui)) { if (isInBox(23, 4, 16, 16, mouseX, mouseY, gui)) {
cyleConfig(MachineFacing.UP.getFacing(provider), gui); cyleConfig(MachineFacing.UP.getFacing(provider), gui);
} else if (isInBox(23, 23, 16, 16, mouseX, mouseY, gui)) { } else if (isInBox(23, 23, 16, 16, mouseX, mouseY, gui)) {
@ -130,13 +130,13 @@ public class FluidConfigPopupElement extends ElementBase {
} }
@Override @Override
public boolean onHover(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onHover(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
lastMousex = mouseX; lastMousex = mouseX;
lastMousey = mouseY; lastMousey = mouseY;
return super.onHover(provider, gui, mouseX, mouseY); return super.onHover(provider, gui, mouseX, mouseY);
} }
private void drawSateColor(TileLegacyMachineBase machineBase, EnumFacing side, int inx, int iny, GuiBase gui) { private void drawSateColor(TileMachineBase machineBase, EnumFacing side, int inx, int iny, GuiBase gui) {
iny += 4; iny += 4;
int sx = inx + getX() + gui.guiLeft; int sx = inx + getX() + gui.guiLeft;
int sy = iny + getY() + gui.guiTop; int sy = iny + getY() + gui.guiTop;

View file

@ -24,8 +24,8 @@
package techreborn.client.gui.slot.elements; package techreborn.client.gui.slot.elements;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
public interface ISprite { public interface ISprite {
Sprite getSprite(TileLegacyMachineBase provider); Sprite getSprite(TileMachineBase provider);
} }

View file

@ -24,7 +24,7 @@
package techreborn.client.gui.slot.elements; package techreborn.client.gui.slot.elements;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
public class OffsetSprite { public class OffsetSprite {
public ISprite sprite; public ISprite sprite;
@ -41,7 +41,7 @@ public class OffsetSprite {
this.sprite = sprite; this.sprite = sprite;
} }
public OffsetSprite(Sprite sprite, TileLegacyMachineBase provider) { public OffsetSprite(Sprite sprite, TileMachineBase provider) {
this.sprite = sprite; this.sprite = sprite;
} }
@ -49,7 +49,7 @@ public class OffsetSprite {
return sprite; return sprite;
} }
public int getOffsetX(TileLegacyMachineBase provider) { public int getOffsetX(TileMachineBase provider) {
return offsetX + sprite.getSprite(provider).offsetX; return offsetX + sprite.getSprite(provider).offsetX;
} }
@ -58,7 +58,7 @@ public class OffsetSprite {
return this; return this;
} }
public int getOffsetY(TileLegacyMachineBase provider) { public int getOffsetY(TileMachineBase provider) {
return offsetY + sprite.getSprite(provider).offsetY; return offsetY + sprite.getSprite(provider).offsetY;
} }

View file

@ -39,7 +39,7 @@ import reborncore.common.network.NetworkManager;
import reborncore.common.network.packet.PacketIOSave; import reborncore.common.network.packet.PacketIOSave;
import reborncore.common.network.packet.PacketSlotSave; import reborncore.common.network.packet.PacketSlotSave;
import reborncore.common.tile.SlotConfiguration; import reborncore.common.tile.SlotConfiguration;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.MachineFacing; import reborncore.common.util.MachineFacing;
import techreborn.client.gui.GuiBase; import techreborn.client.gui.GuiBase;
@ -63,7 +63,7 @@ public class SlotConfigPopupElement extends ElementBase {
drawDefaultBackground(gui, adjustX(gui, getX() -8), adjustY(gui, getY() - 7), 84, 105 + (filter ? 15 : 0)); drawDefaultBackground(gui, adjustX(gui, getX() -8), adjustY(gui, getY() - 7), 84, 105 + (filter ? 15 : 0));
super.draw(gui); super.draw(gui);
TileLegacyMachineBase machine = ((TileLegacyMachineBase) gui.tile); TileMachineBase machine = ((TileMachineBase) gui.tile);
IBlockAccess blockAccess = machine.getWorld(); IBlockAccess blockAccess = machine.getWorld();
BlockPos pos = machine.getPos(); BlockPos pos = machine.getPos();
IBlockState state = blockAccess.getBlockState(pos); IBlockState state = blockAccess.getBlockState(pos);
@ -88,7 +88,7 @@ public class SlotConfigPopupElement extends ElementBase {
} }
@Override @Override
public boolean onRelease(TileLegacyMachineBase provider, GuiBase gui, int mouseX, int mouseY) { public boolean onRelease(TileMachineBase provider, GuiBase gui, int mouseX, int mouseY) {
if(isInBox(23 , 4, 16, 16, mouseX, mouseY, gui)){ if(isInBox(23 , 4, 16, 16, mouseX, mouseY, gui)){
cyleSlotConfig(MachineFacing.UP.getFacing(provider), gui); cyleSlotConfig(MachineFacing.UP.getFacing(provider), gui);
} else if(isInBox(23 , 23, 16, 16, mouseX, mouseY, gui)){ } else if(isInBox(23 , 23, 16, 16, mouseX, mouseY, gui)){
@ -135,7 +135,7 @@ public class SlotConfigPopupElement extends ElementBase {
NetworkManager.sendToServer(packetSlotSave); NetworkManager.sendToServer(packetSlotSave);
} }
private void drawSlotSateColor(TileLegacyMachineBase machineBase, EnumFacing side, int slotID, int inx, int iny, GuiBase gui){ private void drawSlotSateColor(TileMachineBase machineBase, EnumFacing side, int slotID, int inx, int iny, GuiBase gui){
iny += 4; iny += 4;
int sx = inx + getX() + gui.guiLeft; int sx = inx + getX() + gui.guiLeft;
int sy = iny + getY() + gui.guiTop; int sy = iny + getY() + gui.guiTop;

View file

@ -28,7 +28,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
public class Sprite implements ISprite { public class Sprite implements ISprite {
public static final Sprite EMPTY = new Sprite(ElementBase.MECH_ELEMENTS, 0, 0, 0, 0); public static final Sprite EMPTY = new Sprite(ElementBase.MECH_ELEMENTS, 0, 0, 0, 0);
@ -103,7 +103,7 @@ public class Sprite implements ISprite {
} }
@Override @Override
public Sprite getSprite(TileLegacyMachineBase provider) { public Sprite getSprite(TileMachineBase provider) {
return this; return this;
} }

View file

@ -27,7 +27,7 @@ package techreborn.init;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.tiles.*; import techreborn.tiles.*;
import techreborn.tiles.cable.TileCable; import techreborn.tiles.cable.TileCable;
@ -101,7 +101,7 @@ public enum ModTileEntities {
CREATIVE_QUANTUM_CHEST(TileCreativeQuantumChest.class, "creative_quantum_chest"), CREATIVE_QUANTUM_CHEST(TileCreativeQuantumChest.class, "creative_quantum_chest"),
WATER_MILL(TileWaterMill.class, "water_mill"), WATER_MILL(TileWaterMill.class, "water_mill"),
WIND_MILL(TileWindMill.class, "wind_mill"), WIND_MILL(TileWindMill.class, "wind_mill"),
MACHINE_BASE(TileLegacyMachineBase.class, "machine_base"), MACHINE_BASE(TileMachineBase.class, "machine_base"),
RECYCLER(TileRecycler.class, "recycler"), RECYCLER(TileRecycler.class, "recycler"),
LOW_VOLTAGE_SU(TileLowVoltageSU.class, "low_voltage_su"), LOW_VOLTAGE_SU(TileLowVoltageSU.class, "low_voltage_su"),
MEDIUM_VOLTAGE_SU(TileMediumVoltageSU.class, "medium_voltage_su"), MEDIUM_VOLTAGE_SU(TileMediumVoltageSU.class, "medium_voltage_su"),

View file

@ -28,8 +28,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import reborncore.api.tile.IUpgrade; import reborncore.api.tile.IUpgrade;
import reborncore.common.recipes.IUpgradeHandler; import reborncore.common.recipes.IUpgradeHandler;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.utils.InitUtils;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -48,7 +47,7 @@ public class ItemUpgrade extends Item implements IUpgrade {
@Override @Override
public void process( public void process(
@Nonnull @Nonnull
TileLegacyMachineBase tile, TileMachineBase tile,
@Nullable @Nullable
IUpgradeHandler handler, IUpgradeHandler handler,
@Nonnull @Nonnull

View file

@ -105,7 +105,7 @@ public class TileChargeOMat extends TilePowerAcceptor
return maxInput; return maxInput;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public boolean canBeUpgraded() { public boolean canBeUpgraded() {
return false; return false;

View file

@ -189,7 +189,7 @@ public class TileMatterFabricator extends TilePowerAcceptor
return maxInput; return maxInput;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public boolean canBeUpgraded() { public boolean canBeUpgraded() {
return false; return false;

View file

@ -34,7 +34,7 @@ import reborncore.api.IToolDrop;
import reborncore.api.tile.ItemHandlerProvider; import reborncore.api.tile.ItemHandlerProvider;
import reborncore.common.registration.RebornRegister; import reborncore.common.registration.RebornRegister;
import reborncore.common.registration.impl.ConfigRegistry; import reborncore.common.registration.impl.ConfigRegistry;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.FluidUtils; import reborncore.common.util.FluidUtils;
import reborncore.common.util.Inventory; import reborncore.common.util.Inventory;
import reborncore.common.util.Tank; import reborncore.common.util.Tank;
@ -48,7 +48,7 @@ import javax.annotation.Nullable;
import java.util.List; import java.util.List;
@RebornRegister(modID = TechReborn.MOD_ID) @RebornRegister(modID = TechReborn.MOD_ID)
public class TileQuantumTank extends TileLegacyMachineBase public class TileQuantumTank extends TileMachineBase
implements ItemHandlerProvider, IToolDrop, IListInfoProvider, IContainerProvider { implements ItemHandlerProvider, IToolDrop, IListInfoProvider, IContainerProvider {
@ConfigRegistry(config = "machines", category = "quantum_tank", key = "QuantumTankMaxStorage", comment = "Maximum amount of millibuckets a Quantum Tank can store") @ConfigRegistry(config = "machines", category = "quantum_tank", key = "QuantumTankMaxStorage", comment = "Maximum amount of millibuckets a Quantum Tank can store")
@ -75,7 +75,7 @@ public class TileQuantumTank extends TileLegacyMachineBase
return dropStack; return dropStack;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void update() { public void update() {
super.update(); super.update();

View file

@ -35,7 +35,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
import reborncore.api.IListInfoProvider; import reborncore.api.IListInfoProvider;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.api.tile.ItemHandlerProvider; import reborncore.api.tile.ItemHandlerProvider;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.Inventory; import reborncore.common.util.Inventory;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -43,7 +43,7 @@ import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class TileTechStorageBase extends TileLegacyMachineBase public class TileTechStorageBase extends TileMachineBase
implements ItemHandlerProvider, IToolDrop, IListInfoProvider { implements ItemHandlerProvider, IToolDrop, IListInfoProvider {
public final int maxCapacity; public final int maxCapacity;
@ -126,7 +126,7 @@ public class TileTechStorageBase extends TileLegacyMachineBase
return stacks; return stacks;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void update() { public void update() {
super.update(); super.update();

View file

@ -344,7 +344,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor
return tagCompound; return tagCompound;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void onLoad() { public void onLoad() {
super.onLoad(); super.onLoad();

View file

@ -37,7 +37,7 @@ import reborncore.api.recipe.RecipeHandler;
import reborncore.api.tile.ItemHandlerProvider; import reborncore.api.tile.ItemHandlerProvider;
import reborncore.common.recipes.RecipeTranslator; import reborncore.common.recipes.RecipeTranslator;
import reborncore.common.registration.RebornRegister; import reborncore.common.registration.RebornRegister;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.Inventory; import reborncore.common.util.Inventory;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import techreborn.TechReborn; import techreborn.TechReborn;
@ -49,7 +49,7 @@ import techreborn.client.container.builder.ContainerBuilder;
import techreborn.init.ModBlocks; import techreborn.init.ModBlocks;
@RebornRegister(modID = TechReborn.MOD_ID) @RebornRegister(modID = TechReborn.MOD_ID)
public class TileIronAlloyFurnace extends TileLegacyMachineBase public class TileIronAlloyFurnace extends TileMachineBase
implements IToolDrop, ItemHandlerProvider, IContainerProvider { implements IToolDrop, ItemHandlerProvider, IContainerProvider {
public int tickTime; public int tickTime;

View file

@ -31,7 +31,7 @@ import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityFurnace;
import reborncore.api.tile.ItemHandlerProvider; import reborncore.api.tile.ItemHandlerProvider;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.IInventoryAccess; import reborncore.common.util.IInventoryAccess;
import reborncore.common.util.Inventory; import reborncore.common.util.Inventory;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -39,7 +39,7 @@ import techreborn.client.container.IContainerProvider;
import techreborn.client.container.builder.BuiltContainer; import techreborn.client.container.builder.BuiltContainer;
import techreborn.client.container.builder.ContainerBuilder; import techreborn.client.container.builder.ContainerBuilder;
public class TileIronFurnace extends TileLegacyMachineBase public class TileIronFurnace extends TileMachineBase
implements ItemHandlerProvider, IContainerProvider { implements ItemHandlerProvider, IContainerProvider {
public int tickTime; public int tickTime;

View file

@ -132,7 +132,7 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine
}; };
} }
// TileLegacyMachineBase // TileMachineBase
@Nullable @Nullable
@Override @Override
public Tank getTank() { public Tank getTank() {

View file

@ -139,7 +139,7 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC
} }
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void onDataPacket(final NetworkManager net, final SPacketUpdateTileEntity packet) { public void onDataPacket(final NetworkManager net, final SPacketUpdateTileEntity packet) {
world.markBlockRangeForRenderUpdate(pos.getX(), pos.getY(), pos.getZ(), pos.getX(), pos.getY(), pos.getZ()); world.markBlockRangeForRenderUpdate(pos.getX(), pos.getY(), pos.getZ(), pos.getX(), pos.getY(), pos.getZ());

View file

@ -137,7 +137,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
return tagCompound; return tagCompound;
} }
// TileLegacyMachineBase // TileMachineBase
@Nullable @Nullable
@Override @Override
public Tank getTank() { public Tank getTank() {

View file

@ -128,7 +128,7 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai
return tagCompound; return tagCompound;
} }
// TileLegacyMachineBase // TileMachineBase
@Nullable @Nullable
@Override @Override
public Tank getTank() { public Tank getTank() {

View file

@ -391,7 +391,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
super.readFromNBT(tag); super.readFromNBT(tag);
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public boolean canBeUpgraded() { public boolean canBeUpgraded() {
return false; return false;

View file

@ -179,7 +179,7 @@ public class TileRecycler extends TilePowerAcceptor
return maxInput; return maxInput;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public boolean canBeUpgraded() { public boolean canBeUpgraded() {
return true; return true;

View file

@ -53,7 +53,7 @@ public class TileScrapboxinator extends TileGenericMachine implements IContainer
this.crafter = new ScrapboxRecipeCrafter(this, this.inventory, inputs, outputs); this.crafter = new ScrapboxRecipeCrafter(this, this.inventory, inputs, outputs);
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public boolean canBeUpgraded() { public boolean canBeUpgraded() {
return false; return false;

View file

@ -113,7 +113,7 @@ public class TileEnergyStorage extends TilePowerAcceptor
return tier; return tier;
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void setFacing(EnumFacing enumFacing) { public void setFacing(EnumFacing enumFacing) {
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockEnergyStorage.FACING, enumFacing)); world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockEnergyStorage.FACING, enumFacing));

View file

@ -30,10 +30,10 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.common.tile.TileLegacyMachineBase; import reborncore.common.tile.TileMachineBase;
import techreborn.init.ModBlocks; import techreborn.init.ModBlocks;
public class TileLSUStorage extends TileLegacyMachineBase public class TileLSUStorage extends TileMachineBase
implements IToolDrop { implements IToolDrop {
public LesuNetwork network; public LesuNetwork network;
@ -77,7 +77,7 @@ public class TileLSUStorage extends TileLegacyMachineBase
findAndJoinNetwork(world, pos.getX(), pos.getY(), pos.getZ()); findAndJoinNetwork(world, pos.getX(), pos.getY(), pos.getZ());
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public void update() { public void update() {
super.update(); super.update();

View file

@ -122,7 +122,7 @@ public class TileTransformer extends TilePowerAcceptor
//Nope //Nope
} }
// TileLegacyMachineBase // TileMachineBase
@Override @Override
public EnumFacing getFacingEnum() { public EnumFacing getFacingEnum() {
Block block = world.getBlockState(pos).getBlock(); Block block = world.getBlockState(pos).getBlock();