General code cleanup
This commit is contained in:
parent
95b49e5e23
commit
7f8ce535a7
17 changed files with 21 additions and 58 deletions
|
@ -131,7 +131,7 @@ public class Core {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
|
public void init(FMLInitializationEvent event) {
|
||||||
// Registers Chest Loot
|
// Registers Chest Loot
|
||||||
ModLoot.init();
|
ModLoot.init();
|
||||||
MinecraftForge.EVENT_BUS.register(new ModLoot());
|
MinecraftForge.EVENT_BUS.register(new ModLoot());
|
||||||
|
@ -168,7 +168,7 @@ public class Core {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void postinit(FMLPostInitializationEvent event) throws Exception {
|
public void postinit(FMLPostInitializationEvent event) {
|
||||||
proxy.postInit(event);
|
proxy.postInit(event);
|
||||||
|
|
||||||
ModRecipes.postInit();
|
ModRecipes.postInit();
|
||||||
|
|
|
@ -45,11 +45,6 @@ public class GuiAlloyFurnace extends GuiContainer {
|
||||||
this.alloyfurnace = alloyFurnace;
|
this.alloyfurnace = alloyFurnace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initGui() {
|
|
||||||
super.initGui();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
protected void drawGuiContainerBackgroundLayer(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
|
|
|
@ -55,12 +55,6 @@ public class GuiFusionReactor extends GuiBase {
|
||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initGui() {
|
|
||||||
super.initGui();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerBackgroundLayer(final float partialTicks, final int mouseX, final int mouseY) {
|
protected void drawGuiContainerBackgroundLayer(final float partialTicks, final int mouseX, final int mouseY) {
|
||||||
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
super.drawGuiContainerBackgroundLayer(partialTicks, mouseX, mouseY);
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class GuiSlotConfiguration {
|
||||||
return machineBase;
|
return machineBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean mouseClicked(int mouseX, int mouseY, int mouseButton, GuiBase guiBase) throws IOException {
|
public static boolean mouseClicked(int mouseX, int mouseY, int mouseButton, GuiBase guiBase) {
|
||||||
if (mouseButton == 0) {
|
if (mouseButton == 0) {
|
||||||
for (ConfigSlotElement configSlotElement : getVisibleElements()) {
|
for (ConfigSlotElement configSlotElement : getVisibleElements()) {
|
||||||
for (ElementBase element : configSlotElement.elements) {
|
for (ElementBase element : configSlotElement.elements) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class ModelDynamicCell implements IModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IModel loadModel(ResourceLocation modelLocation) throws Exception {
|
public IModel loadModel(ResourceLocation modelLocation) {
|
||||||
return MODEL;
|
return MODEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class TechRebornDevCommand extends CommandBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
|
public void execute(MinecraftServer server, ICommandSender sender, String[] args) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
sender.sendMessage(new TextComponentString("You need to use arguments, see /trdev help"));
|
sender.sendMessage(new TextComponentString("You need to use arguments, see /trdev help"));
|
||||||
} else if ("help".equals(args[0])) {
|
} else if ("help".equals(args[0])) {
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class ModItems {
|
||||||
public static Item DEBUG;
|
public static Item DEBUG;
|
||||||
public static DynamicCell CELL;
|
public static DynamicCell CELL;
|
||||||
|
|
||||||
public static void init() throws InstantiationException, IllegalAccessException {
|
public static void init() {
|
||||||
GEMS = new ItemGems();
|
GEMS = new ItemGems();
|
||||||
registerItem(GEMS, "gem");
|
registerItem(GEMS, "gem");
|
||||||
INGOTS = new ItemIngots();
|
INGOTS = new ItemIngots();
|
||||||
|
|
|
@ -106,12 +106,6 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Item
|
|
||||||
@Override
|
|
||||||
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player) {
|
|
||||||
return super.onBlockStartBreak(itemstack, pos, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getDurabilityForDisplay(ItemStack stack) {
|
public double getDurabilityForDisplay(ItemStack stack) {
|
||||||
return 1 - ItemUtils.getPowerForDurabilityBar(stack);
|
return 1 - ItemUtils.getPowerForDurabilityBar(stack);
|
||||||
|
|
|
@ -47,13 +47,13 @@ public class PacketAesu implements INetworkPacket<PacketAesu> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeData(ExtendedPacketBuffer out) throws IOException {
|
public void writeData(ExtendedPacketBuffer out) {
|
||||||
out.writeBlockPos(pos);
|
out.writeBlockPos(pos);
|
||||||
out.writeInt(buttonID);
|
out.writeInt(buttonID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readData(ExtendedPacketBuffer in) throws IOException {
|
public void readData(ExtendedPacketBuffer in) {
|
||||||
this.pos = in.readBlockPos();
|
this.pos = in.readBlockPos();
|
||||||
this.buttonID = in.readInt();
|
this.buttonID = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,13 +47,13 @@ public class PacketFusionControlSize implements INetworkPacket<PacketFusionContr
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeData(ExtendedPacketBuffer buffer) throws IOException {
|
public void writeData(ExtendedPacketBuffer buffer) {
|
||||||
buffer.writeInt(sizeDelta);
|
buffer.writeInt(sizeDelta);
|
||||||
buffer.writeBlockPos(pos);
|
buffer.writeBlockPos(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readData(ExtendedPacketBuffer buffer) throws IOException {
|
public void readData(ExtendedPacketBuffer buffer) {
|
||||||
sizeDelta = buffer.readInt();
|
sizeDelta = buffer.readInt();
|
||||||
pos = buffer.readBlockPos();
|
pos = buffer.readBlockPos();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,13 +46,13 @@ public class PacketIdsu implements INetworkPacket<PacketIdsu> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeData(ExtendedPacketBuffer out) throws IOException {
|
public void writeData(ExtendedPacketBuffer out) {
|
||||||
out.writeBlockPos(pos);
|
out.writeBlockPos(pos);
|
||||||
out.writeInt(buttonID);
|
out.writeInt(buttonID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readData(ExtendedPacketBuffer in) throws IOException {
|
public void readData(ExtendedPacketBuffer in) {
|
||||||
this.pos = in.readBlockPos();
|
this.pos = in.readBlockPos();
|
||||||
buttonID = in.readInt();
|
buttonID = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,13 +47,13 @@ public class PacketRollingMachineLock implements INetworkPacket<PacketRollingMac
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeData(ExtendedPacketBuffer buffer) throws IOException {
|
public void writeData(ExtendedPacketBuffer buffer) {
|
||||||
buffer.writeBlockPos(machinePos);
|
buffer.writeBlockPos(machinePos);
|
||||||
buffer.writeBoolean(locked);
|
buffer.writeBoolean(locked);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readData(ExtendedPacketBuffer buffer) throws IOException {
|
public void readData(ExtendedPacketBuffer buffer) {
|
||||||
machinePos = buffer.readBlockPos();
|
machinePos = buffer.readBlockPos();
|
||||||
locked = buffer.readBoolean();
|
locked = buffer.readBoolean();
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,14 +58,14 @@ public class PacketSetRecipe implements INetworkPacket<PacketSetRecipe> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeData(ExtendedPacketBuffer buffer) throws IOException {
|
public void writeData(ExtendedPacketBuffer buffer) {
|
||||||
buffer.writeBlockPos(pos);
|
buffer.writeBlockPos(pos);
|
||||||
buffer.writeResourceLocation(recipe);
|
buffer.writeResourceLocation(recipe);
|
||||||
buffer.writeBoolean(custom);
|
buffer.writeBoolean(custom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readData(ExtendedPacketBuffer buffer) throws IOException {
|
public void readData(ExtendedPacketBuffer buffer) {
|
||||||
pos = buffer.readBlockPos();
|
pos = buffer.readBlockPos();
|
||||||
recipe = buffer.readResourceLocation();
|
recipe = buffer.readResourceLocation();
|
||||||
custom = buffer.readBoolean();
|
custom = buffer.readBoolean();
|
||||||
|
|
|
@ -57,27 +57,27 @@ public class TileMachineCasing extends RectangularMultiblockTileEntityBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void isGoodForFrame() throws MultiblockValidationException {
|
public void isGoodForFrame() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void isGoodForSides() throws MultiblockValidationException {
|
public void isGoodForSides() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void isGoodForTop() throws MultiblockValidationException {
|
public void isGoodForTop() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void isGoodForBottom() throws MultiblockValidationException {
|
public void isGoodForBottom() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void isGoodForInterior() throws MultiblockValidationException {
|
public void isGoodForInterior() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,6 @@ public class TileCreativeSolarPanel extends TilePowerAcceptor implements IToolDr
|
||||||
setEnergy(getMaxPower());
|
setEnergy(getMaxPower());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addInfo(final List<String> info, final boolean isRealTile) {
|
|
||||||
super.addInfo(info, isRealTile);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getBaseMaxPower() {
|
public double getBaseMaxPower() {
|
||||||
return 1_000_000;
|
return 1_000_000;
|
||||||
|
|
|
@ -127,11 +127,6 @@ public class TileSolarPanel extends TilePowerAcceptor implements IToolDrop {
|
||||||
public ItemStack getToolDrop(final EntityPlayer playerIn) {
|
public ItemStack getToolDrop(final EntityPlayer playerIn) {
|
||||||
return new ItemStack(ModBlocks.SOLAR_PANEL, 1, panel.ordinal());
|
return new ItemStack(ModBlocks.SOLAR_PANEL, 1, panel.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void rotate(Rotation rotationIn) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound tag) {
|
public void readFromNBT(NBTTagCompound tag) {
|
||||||
|
|
|
@ -294,16 +294,6 @@ public class TileRollingMachine extends TilePowerAcceptor
|
||||||
return tagCompound;
|
return tagCompound;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void invalidate() {
|
|
||||||
super.invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onChunkUnload() {
|
|
||||||
super.onChunkUnload();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Inventory getInventory() {
|
public Inventory getInventory() {
|
||||||
return inventory;
|
return inventory;
|
||||||
|
|
Loading…
Reference in a new issue