mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-10-30 06:10:51 +01:00
More cleaning up
This commit is contained in:
parent
6774b08ac5
commit
268cf651d0
9 changed files with 0 additions and 917 deletions
|
@ -1,189 +0,0 @@
|
|||
// TODO: [port][note] no longer used
|
||||
///*
|
||||
// * This file ("BlockGiantChest.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
//import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
//import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
//import net.minecraft.block.Block;
|
||||
//import net.minecraft.block.SoundType;
|
||||
//import net.minecraft.block.material.Material;
|
||||
//import net.minecraft.client.util.ITooltipFlag;
|
||||
//import net.minecraft.entity.EntityLivingBase;
|
||||
//import net.minecraft.entity.player.PlayerEntity;
|
||||
//import net.minecraft.item.EnumRarity;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.nbt.CompoundNBT;
|
||||
//import net.minecraft.nbt.ListNBT;
|
||||
//import net.minecraft.tileentity.TileEntity;
|
||||
//import net.minecraft.util.Hand;
|
||||
//import net.minecraft.util.NonNullList;
|
||||
//import net.minecraft.util.math.BlockPos;
|
||||
//import net.minecraft.util.text.TextFormatting;
|
||||
//import net.minecraft.world.IBlockAccess;
|
||||
//import net.minecraft.world.World;
|
||||
//import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//public class BlockGiantChest extends BlockContainerBase {
|
||||
//
|
||||
// public final int type;
|
||||
//
|
||||
// public BlockGiantChest(String name, int type) {
|
||||
// super(Material.WOOD, name);
|
||||
// this.type = type;
|
||||
//
|
||||
// this.setHarvestLevel("axe", 0);
|
||||
// this.setHardness(0.5F);
|
||||
// this.setResistance(15.0F);
|
||||
// this.setSoundType(SoundType.WOOD);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public TileEntity createNewTileEntity(IBlockReader worldIn) {
|
||||
// switch (this.type) {
|
||||
// case 1:
|
||||
// return new TileEntityGiantChestMedium();
|
||||
// case 2:
|
||||
// return new TileEntityGiantChestLarge();
|
||||
// default:
|
||||
// return new TileEntityGiantChest();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isFullCube(BlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOpaqueCube(BlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||
// if (!world.isRemote) {
|
||||
// TileEntityGiantChest chest = (TileEntityGiantChest) world.getTileEntity(pos);
|
||||
// if (chest != null) {
|
||||
// chest.fillWithLoot(player);
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public EnumRarity getRarity(ItemStack stack) {
|
||||
// return EnumRarity.EPIC;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, EntityLivingBase entity, ItemStack stack) {
|
||||
// if (stack.getTagCompound() != null) {
|
||||
// TileEntity tile = world.getTileEntity(pos);
|
||||
// if (tile instanceof TileEntityGiantChest) {
|
||||
// ListNBT list = stack.getTagCompound().getList("Items", 10);
|
||||
// IItemHandlerModifiable inv = ((TileEntityGiantChest) tile).inv;
|
||||
//
|
||||
// for (int i = 0; i < list.size(); i++) {
|
||||
// CompoundNBT compound = list.getCompound(i);
|
||||
// if (compound != null && compound.hasKey("id")) {
|
||||
// inv.setStackInSlot(i, new ItemStack(list.getCompound(i)));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// super.onBlockPlacedBy(world, pos, state, entity, stack);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, BlockState state, int fortune) {
|
||||
// super.getDrops(drops, world, pos, state, fortune);
|
||||
// TileEntity tile = world.getTileEntity(pos);
|
||||
// if (tile instanceof TileEntityGiantChest) {
|
||||
// ItemStackHandlerAA slots = ((TileEntityGiantChest) tile).inv;
|
||||
// int place = ItemUtil.getPlaceAt(slots.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
||||
// if (place >= 0) {
|
||||
// ListNBT list = new ListNBT();
|
||||
// for (int i = 0; i < slots.getSlots(); i++) {
|
||||
// //Destroy the keeper
|
||||
// if (i != place) {
|
||||
// CompoundNBT compound = new CompoundNBT();
|
||||
// if (StackUtil.isValid(slots.getStackInSlot(i))) {
|
||||
// slots.getStackInSlot(i).writeToNBT(compound);
|
||||
// }
|
||||
// list.appendTag(compound);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (list.size() > 0) {
|
||||
// ItemStack stackInQuestion = drops.get(0);
|
||||
// if (StackUtil.isValid(stackInQuestion)) {
|
||||
// if (stackInQuestion.getTagCompound() == null) {
|
||||
// stackInQuestion.setTagCompound(new CompoundNBT());
|
||||
// }
|
||||
// stackInQuestion.getTagCompound().setTag("Items", list);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean shouldDropInventory(World world, BlockPos pos) {
|
||||
// TileEntity tile = world.getTileEntity(pos);
|
||||
// return !(tile instanceof TileEntityGiantChest) || !ItemUtil.contains(((TileEntityGiantChest) tile).inv.getItems(), new ItemStack(InitItems.itemCrateKeeper), false);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected ItemBlockBase getItemBlock() {
|
||||
// return new TheItemBlock(this);
|
||||
// }
|
||||
//
|
||||
// public static class TheItemBlock extends ItemBlockBase {
|
||||
//
|
||||
// public TheItemBlock(Block block) {
|
||||
// super(block);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced) {
|
||||
// int type = this.block instanceof BlockGiantChest
|
||||
// ? ((BlockGiantChest) this.block).type
|
||||
// : -1;
|
||||
// if (type == 2) {
|
||||
// tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container.actuallyadditions.giantChestLarge.desc"));
|
||||
// } else if (type == 0) {
|
||||
// tooltip.add(TextFormatting.ITALIC + StringUtil.localize("container.actuallyadditions.giantChest.desc"));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public CompoundNBT getNBTShareTag(ItemStack stack) {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//}
|
|
@ -1,99 +0,0 @@
|
|||
// TODO: [port][note] no longer used
|
||||
///*
|
||||
// * This file ("ContainerGiantChest.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
//import invtweaks.api.container.ChestContainer;
|
||||
//import net.minecraft.entity.player.PlayerEntity;
|
||||
//import net.minecraft.entity.player.PlayerInventory;
|
||||
//import net.minecraft.inventory.container.Container;
|
||||
//import net.minecraft.inventory.container.Slot;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//
|
||||
//@ChestContainer(rowSize = 13, isLargeChest = true)
|
||||
//public class ContainerGiantChest extends Container {
|
||||
//
|
||||
// public final TileEntityGiantChest tileChest;
|
||||
//
|
||||
// public ContainerGiantChest(PlayerInventory inventory, TileEntityBase tile, int page) {
|
||||
// this.tileChest = (TileEntityGiantChest) tile;
|
||||
//
|
||||
// for (int i = 0; i < 9; i++) {
|
||||
// for (int j = 0; j < 13; j++) {
|
||||
// this.addSlot(new SlotItemHandlerUnconditioned(this.tileChest.inv, 9 * 13 * page + j + i * 13, 5 + j * 18, 5 + i * 18));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (int i = 0; i < 3; i++) {
|
||||
// for (int j = 0; j < 9; j++) {
|
||||
// this.addSlot(new Slot(inventory, j + i * 9 + 9, 33 + 8 + j * 18, 172 + 4 + i * 18));
|
||||
// }
|
||||
// }
|
||||
// for (int i = 0; i < 9; i++) {
|
||||
// this.addSlot(new Slot(inventory, i, 33 + 8 + i * 18, 172 + 62));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
// int inventoryStart = 117;
|
||||
// int inventoryEnd = inventoryStart + 26;
|
||||
// int hotbarStart = inventoryEnd + 1;
|
||||
// int hotbarEnd = hotbarStart + 8;
|
||||
//
|
||||
// Slot theSlot = this.inventorySlots.get(slot);
|
||||
//
|
||||
// if (theSlot != null && theSlot.getHasStack()) {
|
||||
// ItemStack newStack = theSlot.getStack();
|
||||
// ItemStack currentStack = newStack.copy();
|
||||
//
|
||||
// //Other Slots in Inventory excluded
|
||||
// if (slot >= inventoryStart) {
|
||||
// //Shift from Inventory
|
||||
// if (!this.mergeItemStack(newStack, 0, 117, false)) {
|
||||
// //
|
||||
// if (slot >= inventoryStart && slot <= inventoryEnd) {
|
||||
// if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// }
|
||||
// } else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
//
|
||||
// if (!StackUtil.isValid(newStack)) {
|
||||
// theSlot.putStack(StackUtil.getEmpty());
|
||||
// } else {
|
||||
// theSlot.onSlotChanged();
|
||||
// }
|
||||
//
|
||||
// if (newStack.getCount() == currentStack.getCount()) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// theSlot.onTake(player, newStack);
|
||||
//
|
||||
// return currentStack;
|
||||
// }
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canInteractWith(PlayerEntity player) {
|
||||
// return this.tileChest.canPlayerUse(player);
|
||||
// }
|
||||
//}
|
|
@ -1,98 +0,0 @@
|
|||
// TODO: [port][note] no longer needed
|
||||
///*
|
||||
// * This file ("ContainerRepairer.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
//import net.minecraft.entity.player.PlayerEntity;
|
||||
//import net.minecraft.entity.player.PlayerInventory;
|
||||
//import net.minecraft.inventory.container.Container;
|
||||
//import net.minecraft.inventory.container.Slot;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//
|
||||
//public class ContainerRepairer extends Container {
|
||||
//
|
||||
// private final TileEntityItemRepairer tileRepairer;
|
||||
//
|
||||
// public ContainerRepairer(PlayerInventory inventory, TileEntityBase tile) {
|
||||
// this.tileRepairer = (TileEntityItemRepairer) tile;
|
||||
//
|
||||
// this.addSlot(new SlotItemHandlerUnconditioned(this.tileRepairer.inv, TileEntityItemRepairer.SLOT_INPUT, 47, 53));
|
||||
// this.addSlot(new SlotOutput(this.tileRepairer.inv, TileEntityItemRepairer.SLOT_OUTPUT, 109, 53));
|
||||
//
|
||||
// for (int i = 0; i < 3; i++) {
|
||||
// for (int j = 0; j < 9; j++) {
|
||||
// this.addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
// }
|
||||
// }
|
||||
// for (int i = 0; i < 9; i++) {
|
||||
// this.addSlot(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
// int inventoryStart = 2;
|
||||
// int inventoryEnd = inventoryStart + 26;
|
||||
// int hotbarStart = inventoryEnd + 1;
|
||||
// int hotbarEnd = hotbarStart + 8;
|
||||
//
|
||||
// Slot theSlot = this.inventorySlots.get(slot);
|
||||
//
|
||||
// if (theSlot != null && theSlot.getHasStack()) {
|
||||
// ItemStack newStack = theSlot.getStack();
|
||||
// ItemStack currentStack = newStack.copy();
|
||||
//
|
||||
// //Other Slots in Inventory excluded
|
||||
// if (slot >= inventoryStart) {
|
||||
// //Shift from Inventory
|
||||
// if (TileEntityItemRepairer.canBeRepaired(newStack)) {
|
||||
// if (!this.mergeItemStack(newStack, TileEntityItemRepairer.SLOT_INPUT, TileEntityItemRepairer.SLOT_INPUT + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// }
|
||||
// //
|
||||
//
|
||||
// else if (slot >= inventoryStart && slot <= inventoryEnd) {
|
||||
// if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// } else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// } else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
//
|
||||
// if (!StackUtil.isValid(newStack)) {
|
||||
// theSlot.putStack(StackUtil.getEmpty());
|
||||
// } else {
|
||||
// theSlot.onSlotChanged();
|
||||
// }
|
||||
//
|
||||
// if (newStack.getCount() == currentStack.getCount()) {
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
// theSlot.onTake(player, newStack);
|
||||
//
|
||||
// return currentStack;
|
||||
// }
|
||||
// return StackUtil.getEmpty();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canInteractWith(PlayerEntity player) {
|
||||
// return this.tileRepairer.canPlayerUse(player);
|
||||
// }
|
||||
//}
|
|
@ -1,29 +0,0 @@
|
|||
// TODO: [port][note] no longer needed
|
||||
///*
|
||||
// * This file ("ContainerSmileyCloud.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory;
|
||||
//
|
||||
//import net.minecraft.entity.player.PlayerEntity;
|
||||
//import net.minecraft.inventory.container.Container;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//
|
||||
//public class ContainerSmileyCloud extends Container {
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
|
||||
// return ItemStack.EMPTY;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canInteractWith(PlayerEntity player) {
|
||||
// return true;
|
||||
// }
|
||||
//}
|
|
@ -1,79 +0,0 @@
|
|||
// TODO: [port] no longer needed
|
||||
///*
|
||||
// * This file ("GuiGiantChest.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest;
|
||||
//import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
//import net.minecraft.client.gui.widget.button.Button;
|
||||
//import net.minecraft.entity.player.PlayerInventory;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraftforge.api.distmarker.Dist;
|
||||
//import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//
|
||||
//
|
||||
//public class GuiGiantChest extends GuiWtfMojang {
|
||||
//
|
||||
// private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_giant_chest");
|
||||
//
|
||||
// private final TileEntityGiantChest chest;
|
||||
// private final int page;
|
||||
//
|
||||
// public GuiGiantChest(PlayerInventory inventory, TileEntityBase tile, int page) {
|
||||
// super(new ContainerGiantChest(inventory, tile, page));
|
||||
// this.chest = (TileEntityGiantChest) tile;
|
||||
// this.page = page;
|
||||
//
|
||||
// this.xSize = 242;
|
||||
// this.ySize = 172 + 86;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void init() {
|
||||
// super.init();
|
||||
//
|
||||
// if (this.page > 0) {
|
||||
// this.addButton(new Button(this.page - 1, this.guiLeft + 13, this.guiTop + 172, 20, 20, "<"));
|
||||
// }
|
||||
//
|
||||
// if (this.page == 0 && this.chest instanceof TileEntityGiantChestMedium || this.page <= 1 && this.chest instanceof TileEntityGiantChestLarge) {
|
||||
// this.addButton(new Button(this.page + 1, this.guiLeft + 209, this.guiTop + 172, 20, 20, ">"));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void actionPerformed(Button button) throws IOException {
|
||||
// if (button.id >= 0 && button.id < 3) {
|
||||
// PacketHandlerHelper.sendButtonPacket(this.chest, button.id);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
// AssetUtil.displayNameString(this.font, this.xSize, -10, this.chest);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
// RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
// this.getMinecraft().getTextureManager().bindTexture(RES_LOC);
|
||||
// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 242, 190);
|
||||
// this.getMinecraft().getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
// guiGraphics.blit(matrices, this.guiLeft + 33, this.guiTop + 172, 0, 0, 176, 86);
|
||||
// }
|
||||
//}
|
|
@ -1,72 +0,0 @@
|
|||
// TODO: [port][note] no longer needed
|
||||
///*
|
||||
// * This file ("GuiRepairer.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
||||
//
|
||||
//import com.mojang.blaze3d.platform.GlStateManager;
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.ContainerRepairer;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
//import net.minecraft.entity.player.PlayerInventory;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraftforge.api.distmarker.Dist;
|
||||
//import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
//
|
||||
//
|
||||
//
|
||||
//public class GuiRepairer extends GuiWtfMojang {
|
||||
//
|
||||
// private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_repairer");
|
||||
// private final TileEntityItemRepairer tileRepairer;
|
||||
// private EnergyDisplay energy;
|
||||
//
|
||||
// public GuiRepairer(PlayerInventory inventory, TileEntityBase tile) {
|
||||
// super(new ContainerRepairer(inventory, tile));
|
||||
// this.tileRepairer = (TileEntityItemRepairer) tile;
|
||||
// this.xSize = 176;
|
||||
// this.ySize = 93 + 86;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void init() {
|
||||
// super.init();
|
||||
// this.energy = new EnergyDisplay(this.guiLeft + 27, this.guiTop + 5, this.tileRepairer.storage);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void render(int x, int y, float f) {
|
||||
// super.render(x, y, f);
|
||||
// this.energy.drawOverlay(x, y);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
// AssetUtil.displayNameString(this.font, this.xSize, -10, this.tileRepairer);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
// RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//
|
||||
// this.getMinecraft().getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
// guiGraphics.blit(matrices, this.guiLeft, this.guiTop + 93, 0, 0, 176, 86);
|
||||
//
|
||||
// this.getMinecraft().getTextureManager().bindTexture(RES_LOC);
|
||||
// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 176, 93);
|
||||
//
|
||||
// if (TileEntityItemRepairer.canBeRepaired(this.tileRepairer.inv.getStackInSlot(TileEntityItemRepairer.SLOT_INPUT))) {
|
||||
// int i = this.tileRepairer.getItemDamageToScale(22);
|
||||
// guiGraphics.blit(matrices, this.guiLeft + 73, this.guiTop + 52, 176, 28, i, 16);
|
||||
// }
|
||||
//
|
||||
// this.energy.draw();
|
||||
// }
|
||||
//}
|
|
@ -1,127 +0,0 @@
|
|||
// TODO: [port][note] no longer needed
|
||||
///*
|
||||
// * This file ("GuiSmileyCloud.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.inventory.gui;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
//import de.ellpeck.actuallyadditions.mod.inventory.ContainerSmileyCloud;
|
||||
//import de.ellpeck.actuallyadditions.mod.network.packet.PacketClientToServer;
|
||||
//import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||
//import net.minecraft.nbt.CompoundNBT;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraft.util.text.TextFormatting;
|
||||
//import net.minecraft.world.World;
|
||||
//import net.minecraftforge.api.distmarker.Dist;
|
||||
//import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
//import org.lwjgl.input.Keyboard;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//
|
||||
//
|
||||
//public class GuiSmileyCloud extends GuiWtfMojang {
|
||||
//
|
||||
// private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_smiley_cloud");
|
||||
//
|
||||
// private final int x;
|
||||
// private final int y;
|
||||
// private final int z;
|
||||
// private final World world;
|
||||
// private final TileEntitySmileyCloud cloud;
|
||||
// private TextFieldWidget nameField;
|
||||
//
|
||||
// public GuiSmileyCloud(TileEntityBase tile, int x, int y, int z, World world) {
|
||||
// super(new ContainerSmileyCloud());
|
||||
// this.cloud = (TileEntitySmileyCloud) tile;
|
||||
// this.x = x;
|
||||
// this.y = y;
|
||||
// this.z = z;
|
||||
// this.world = world;
|
||||
// this.xSize = 124;
|
||||
// this.ySize = 20;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void init() {
|
||||
// super.init();
|
||||
//
|
||||
// this.nameField = new TextFieldWidget(4000, this.font, this.guiLeft + 5, this.guiTop + 6, 114, 8);
|
||||
// this.nameField.setMaxStringLength(20);
|
||||
// this.nameField.setEnableBackgroundDrawing(false);
|
||||
// this.nameField.setFocused(true);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerForegroundLayer(int x, int y) {
|
||||
// String name = this.cloud.name == null || this.cloud.name.isEmpty()
|
||||
// ? ""
|
||||
// : TextFormatting.GOLD + this.cloud.name + TextFormatting.RESET + " " + StringUtil.localize("info.actuallyadditions.gui.the") + " ";
|
||||
// String localizedName = name + StringUtil.localize("container.actuallyadditions.cloud.name");
|
||||
// this.font.drawString(localizedName, this.xSize / 2 - this.font.getStringWidth(localizedName) / 2, -10, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
||||
// RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//
|
||||
// this.getMinecraft().getTextureManager().bindTexture(RES_LOC);
|
||||
// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||
//
|
||||
// this.nameField.drawTextBox();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void mouseClicked(int par1, int par2, int par3) throws IOException {
|
||||
// this.nameField.mouseClicked(par1, par2, par3);
|
||||
// super.mouseClicked(par1, par2, par3);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void keyTyped(char theChar, int key) throws IOException {
|
||||
// if (key != 1 && this.nameField.isFocused()) {
|
||||
// if (key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER) {
|
||||
// this.setVariable(this.nameField);
|
||||
// } else {
|
||||
// this.nameField.textboxKeyTyped(theChar, key);
|
||||
// }
|
||||
// } else {
|
||||
// super.keyTyped(theChar, key);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void updateScreen() {
|
||||
// super.updateScreen();
|
||||
// this.nameField.updateCursorCounter();
|
||||
// }
|
||||
//
|
||||
// public void setVariable(TextFieldWidget field) {
|
||||
// this.sendPacket(field.getText(), 0);
|
||||
// field.setText("");
|
||||
// }
|
||||
//
|
||||
// private void sendPacket(String text, int textID) {
|
||||
// CompoundNBT compound = new CompoundNBT();
|
||||
// compound.putInt("X", this.x);
|
||||
// compound.putInt("Y", this.y);
|
||||
// compound.putInt("Z", this.z);
|
||||
// compound.putInt("WorldID", this.world.provider.getDimension());
|
||||
// compound.putInt("PlayerID", Minecraft.getInstance().player.getEntityId());
|
||||
// compound.putInt("TextID", textID);
|
||||
// compound.setString("Text", text);
|
||||
// PacketDistributor.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_STRING_TO_TILE_HANDLER));
|
||||
// }
|
||||
//}
|
|
@ -1,82 +0,0 @@
|
|||
///*
|
||||
// * This file ("ItemCrystalShard.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.items;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
//import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal;
|
||||
//import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
//import net.minecraft.client.renderer.color.IItemColor;
|
||||
//import net.minecraft.creativetab.CreativeTabs;
|
||||
//import net.minecraft.item.EnumRarity;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.util.NonNullList;
|
||||
//import net.minecraftforge.common.IRarity;
|
||||
//
|
||||
//
|
||||
//public class ItemCrystalShard extends ItemBase implements IColorProvidingItem {
|
||||
//
|
||||
// public ItemCrystalShard() {
|
||||
// super(name);
|
||||
// this.setHasSubtypes(true);
|
||||
// this.setMaxDamage(0);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getMetadata(int damage) {
|
||||
// return damage;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getDescriptionId(ItemStack stack) {
|
||||
// return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length
|
||||
// ? StringUtil.BUGGED_ITEM_NAME
|
||||
// : this.getDescriptionId() + "_" + BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].name;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IRarity getForgeRarity(ItemStack stack) {
|
||||
// return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length
|
||||
// ? EnumRarity.COMMON
|
||||
// : BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].rarity;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
//
|
||||
// public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
// if (this.isInCreativeTab(tab)) {
|
||||
// for (int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++) {
|
||||
// list.add(new ItemStack(this, 1, j));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void registerRendering() {
|
||||
// for (int i = 0; i < BlockCrystal.ALL_CRYSTALS.length; i++) {
|
||||
// ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
//
|
||||
// public IItemColor getItemColor() {
|
||||
// return (stack, tintIndex) -> {
|
||||
// int damage = stack.getItemDamage();
|
||||
// if (damage >= 0 && damage < BlockCrystal.ALL_CRYSTALS.length) {
|
||||
// return BlockCrystal.ALL_CRYSTALS[damage].clusterColor;
|
||||
// } else {
|
||||
// return 0;
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//}
|
|
@ -1,142 +0,0 @@
|
|||
// TODO: [port] REMOVE THIS CLASS, NO longer needed
|
||||
///*
|
||||
// * This file ("ItemSpawnerChanger.java") is part of the Actually Additions mod for Minecraft.
|
||||
// * It is created and owned by Ellpeck and distributed
|
||||
// * under the Actually Additions License to be found at
|
||||
// * http://ellpeck.de/actaddlicense
|
||||
// * View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
// *
|
||||
// * © 2015-2017 Ellpeck
|
||||
// */
|
||||
//
|
||||
//package de.ellpeck.actuallyadditions.mod.items;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
//import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
|
||||
//import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
//import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
//import net.minecraft.block.BlockState;
|
||||
//import net.minecraft.client.util.ITooltipFlag;
|
||||
//import net.minecraft.entity.EntityList;
|
||||
//import net.minecraft.entity.EntityLivingBase;
|
||||
//import net.minecraft.entity.player.PlayerEntity;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.nbt.CompoundNBT;
|
||||
//import net.minecraft.tileentity.MobSpawnerBaseLogic;
|
||||
//import net.minecraft.tileentity.TileEntity;
|
||||
//import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
//import net.minecraft.util.Direction;
|
||||
//import net.minecraft.util.EnumActionResult;
|
||||
//import net.minecraft.util.Hand;
|
||||
//import net.minecraft.util.ResourceLocation;
|
||||
//import net.minecraft.util.math.BlockPos;
|
||||
//import net.minecraft.util.text.TextFormatting;
|
||||
//import net.minecraft.world.World;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//public class ItemSpawnerChanger extends ItemBase {
|
||||
//
|
||||
// public ItemSpawnerChanger() {
|
||||
// super();
|
||||
// this.setMaxStackSize(1);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public EnumActionResult onItemUse(PlayerEntity player, World world, BlockPos pos, Hand hand, Direction facing, float hitX, float hitY, float hitZ) {
|
||||
// if (!world.isRemote) {
|
||||
// ItemStack stack = player.getHeldItemMainhand();
|
||||
// if (player.canPlayerEdit(pos.offset(facing), facing, stack)) {
|
||||
// TileEntity tile = world.getTileEntity(pos);
|
||||
// if (tile instanceof TileEntityMobSpawner) {
|
||||
// String entity = this.getStoredEntity(stack);
|
||||
// if (entity != null) {
|
||||
// MobSpawnerBaseLogic logic = ((TileEntityMobSpawner) tile).getSpawnerBaseLogic();
|
||||
//
|
||||
// //This is a hacky way to remove the spawn potentials that make the spawner reset from time to time
|
||||
// //Don't judge, there isn't a method for it and it's better than Reflection hackiness
|
||||
// CompoundNBT compound = new CompoundNBT();
|
||||
// logic.writeToNBT(compound);
|
||||
// compound.removeTag("SpawnPotentials");
|
||||
// compound.removeTag("SpawnData");
|
||||
// logic.readFromNBT(compound);
|
||||
//
|
||||
// logic.setEntityId(ResourceLocation.tryParse(entity));
|
||||
//
|
||||
// tile.markDirty();
|
||||
//
|
||||
// BlockState state = world.getBlockState(pos);
|
||||
// world.notifyBlockUpdate(pos, state, state, 3);
|
||||
//
|
||||
// ItemPhantomConnector.clearStorage(stack, "Entity");
|
||||
//
|
||||
// if (!player.isCreative()) {
|
||||
// player.setHeldItem(hand, StackUtil.shrink(stack, 1));
|
||||
// }
|
||||
//
|
||||
// return EnumActionResult.SUCCESS;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return EnumActionResult.FAIL;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean itemInteractionForEntity(ItemStack aStack, PlayerEntity player, EntityLivingBase entity, Hand hand) {
|
||||
// if (!player.world.isRemote) {
|
||||
// ItemStack stack = player.getHeldItemMainhand();
|
||||
// if (this.getStoredEntity(stack) == null) {
|
||||
// if (this.storeClickedEntity(stack, entity)) {
|
||||
// entity.setDead();
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// private boolean storeClickedEntity(ItemStack stack, EntityLivingBase entity) {
|
||||
// if (!stack.hasTagCompound()) {
|
||||
// stack.setTagCompound(new CompoundNBT());
|
||||
// }
|
||||
//
|
||||
// if (!(entity instanceof PlayerEntity) && entity.isNonBoss()) {
|
||||
// ResourceLocation entityLoc = EntityList.getKey(entity.getClass());
|
||||
// if (entityLoc != null) {
|
||||
// String entityName = entityLoc.toString();
|
||||
// if (entityName != null && !entityName.isEmpty()) {
|
||||
// for (String name : ConfigStringListValues.SPAWNER_CHANGER_BLACKLIST.getValue()) {
|
||||
// if (entityName.equals(name)) {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// stack.getTagCompound().setString("Entity", entityName);
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// private String getStoredEntity(ItemStack stack) {
|
||||
// if (stack.hasTagCompound()) {
|
||||
// String entity = stack.getTagCompound().getString("Entity");
|
||||
// if (entity != null && !entity.isEmpty()) {
|
||||
// return entity;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced) {
|
||||
// String entity = this.getStoredEntity(stack);
|
||||
// if (entity != null) {
|
||||
// list.add("Entity: " + entity);
|
||||
// list.add(TextFormatting.ITALIC + StringUtil.localize("tooltip.actuallyadditions.clearStorage.desc"));
|
||||
// }
|
||||
// }
|
||||
//}
|
Loading…
Reference in a new issue