• Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • I changed TileEntity and Container class  but It still does nothing TE: package com.budrunbun.lavalamp.tileEntities; import com.budrunbun.lavalamp.containers.CheeseGeneratorContainer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TranslationTextComponent; import net.minecraftforge.items.ItemStackHandler; import javax.annotation.Nullable; public class CheeseGeneratorTE extends TileEntity implements INamedContainerProvider { private final ItemStackHandler handler = new ItemStackHandler(1) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); markDirty(); } }; public CheeseGeneratorTE() { super(ModTileEntities.CHEESE_GENERATOR_TE); } @Override public void read(CompoundNBT compound) { handler.deserializeNBT(compound.getCompound("inv")); super.read(compound); } @Override public CompoundNBT write(CompoundNBT compound) { compound.put("inv",handler.serializeNBT()); return super.write(compound); } @Override public ITextComponent getDisplayName() { return new TranslationTextComponent("cheese_generator"); } @Nullable @Override public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { return new CheeseGeneratorContainer(windowId, playerInventory); } } Container: package com.budrunbun.lavalamp.containers; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.Slot; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.SlotItemHandler; import javax.annotation.Nonnull; public class CheeseGeneratorContainer extends Container { private final ItemStackHandler handler = new ItemStackHandler(1); public CheeseGeneratorContainer(int windowId, PlayerInventory playerInventory) { super(ModContainers.CHEESE_GENERATOR_CONTAINER, windowId); this.addSlot(new SlotItemHandler(handler, 0, 12 + 4 * 18, 8 + 2 * 18)); int leftCol = (184 - 162) / 2 + 1; for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) { for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) { this.addSlot(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, 184 - (4 - playerInvRow) * 18 - 10)); } } for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) { this.addSlot(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, 184 - 24)); } } @Override public boolean canInteractWith(PlayerEntity playerIn) { return true; } }  
    • And also post your build.gradle. It can be helpful too.
    • genEclipseRuns has failed. In your project browser the libraries (minecraft, forge) are missing. Please post the cmd / ps logs. And by the way, I run genEclipseRuns first, then eclipse (but you can combine them to like this "gradlew genEclipseRuns eclipse"
    • After reading a few posts and wikis etc etc, I started with the packet thing, but when I tried to make the Message class, it appears I cant implement from IMessage. Is this a bug? or does this interface doesnt exist anymore?
  • Topics

  • Who's Online (See full list)