Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

rafferty.smith@hotmail.com

Members
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rafferty.smith@hotmail.com

  • Rank
    Tree Puncher
  1. It is a tile entity block, the list will max out at 9 slots, so there will be 9 block models (a bit like a composter)
  2. I want to change the .json model of my block depending on the size of my list and I saw something called BlockStates that might be able to do that. How do i use BlockStates to change it? Help is appriciated!
  3. It is intentinal that its only 0-9. System.out is just for testing purposes. Ill watch some videos on OOP. Thanks
  4. Im not an expert in NonNullLists but im not sure why doesnt work. Any help is appriciated
  5. private ItemStackHandler getHandler() { if (handler == null) { handler = new ItemStackHandler(1) { @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { if (getStackInSlot(1) == new ItemStack (Items.MILK_BUCKET)) { return ItemStack.EMPTY; } return super.extractItem(slot, amount, simulate); } }; } return
  6. Ive tried doing that but it isnt working, i could jsut be doing it wrong
  7. Ok, how do i use the extractItem to only be able to extract a certain item then
  8. So my code so far is this public class MixingBowlBlockTileEntity extends LockableLootTileEntity { private NonNullList<ItemStack> bowlContents = NonNullList.withSize(12, ItemStack.EMPTY); PlayerEntity player; public MixingBowlBlockTileEntity(TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); } public MixingBowlBlockTileEntity() { this(TileEntityTypesInit.MIXING_BOWL.get()); } public CompoundNBT write(CompoundNBT compound) { super.write(compound); if (!this.checkLootAndWrite(compound)) {
  9. I wnat to check if players inventory is full but the only thing i found is playerIn.inventory.getFirstEmptyStack() returns -1 if inventory is full but im not sure that works. What is the way you would actually do that?
  10. I cant figure out how to calll it in this case as it is inside of createHandler()
  11. Now that works for only accepting certain items but how do i add an item to that inventory in the onblockactivated method in my block class?
  12. ive done that atm but it only works with hoppers idk what in that adds the item to the inventory tho. What is the method or line of code that adds the item to an "inventory"
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.