Everything posted by Failender
-
How to set + get the slot in players inventory that the current ItemStack is in?
public void onUpdate(ItemStack itemstack, World worldIn, Entity entity, int itemSlot, boolean isSelected)
-
How to set + get the slot in players inventory that the current ItemStack is in?
you dont need to search for the item, you get it passed as argument (int itemSlot)
-
How to set + get the slot in players inventory that the current ItemStack is in?
player.mainInventory.setStackInSlot(randomIndex, itemstack); player.mainInventory.setStackInSlot(itemSlot, null);
-
How to set + get the slot in players inventory that the current ItemStack is in?
while(true) int randomIndex=random.nextInt(maxIndex); if(inv.getSlot(randomIndex)==null) placeItemHereAndSetOtherOneNull(); //TODO: prevent infinite loop
-
How to set + get the slot in players inventory that the current ItemStack is in?
You mean "rethink your life!" Oh Ernio..
-
How to set + get the slot in players inventory that the current ItemStack is in?
if the new item is in a different slot simply set the old one to null
-
How to set + get the slot in players inventory that the current ItemStack is in?
EntityPlayer player= (EntityPlayer) entity; if(entity instanceof EntityPlayer) Rethink this code please.
-
How to set + get the slot in players inventory that the current ItemStack is in?
specify your question please sir
-
[1.8] Adding armor inventory to custom inventory
why do you want to have a custom inventory if you want to use the default vanilla? Instead of using ur own inventory just use the vanilla one (in case u are using a gui)
-
How to set + get the slot in players inventory that the current ItemStack is in?
set the old slot where the itemstack was to null/replace it with the new one. java garbage collection will do the rest
-
How to set + get the slot in players inventory that the current ItemStack is in?
The first argument of setInventorySlotContents is the index, not the stacksize.
-
onBlockActivated Help
if(held == new ItemStack(Items.bone)){ ItemStack out = new ItemStack(Items.iron_ingot); EntityItem entity = new EntityItem(world, player.posX, player.posY, player.posZ, out); world.spawnEntityInWorld(entity); } Im not sure what you are triing to do there. if(held.getItem()==Items.bone);
-
[1.8]Tiny Explosions
only create the explosion on server side (!if(world.isRemote))
-
Help!
No. Dont use event.getSide() , that is stuff proxies are made for.
-
[1.7.10] WHY IS MY ai not working??
you should consider fixxing those 200 other errors u got in ur log first..
-
[1.7.10] WHY IS MY ai not working??
fix ur code?
-
[1.7.10] WHY IS MY ai not working??
jesus christ what is up with that error log? try some basic debugging. u got a NPE in ur shouldExecute method, either theEntity or theEntity.getAttackTarget() is null
-
Kill entity from one side?
normally a check !world.isRemote will work . depends on where u call it
-
[1.7.10] Including a jar inside of my mod
even winrar can edit jar files sir..
-
[1.7.10] Including a jar inside of my mod
you want a hacky way? decompile it , add it to your workspace and compile ur mod with the library inside. i bet there are better ways
-
Kill entity from one side?
you only need to kill the entity on server side, client sid will get informed
-
[1.7.10] [Solved] Packet/keybinding issue
okay, I guess that is the better solution :b
-
[1.7.10] [Solved] Packet/keybinding issue
Create a new project, gradlew setupDecomp.. And setup eclipse after that copy ur source folder into the new project
-
[1.8] [SOLVED] remove vanilla recipes
just google "minecraft remove recipe" there is everything you need
-
[1.7.10] need some help with BlockBreakEvent and harvesting blocks
that is correct.
IPS spam blocked by CleanTalk.