Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. Lets be honest this will be a lot more work, but it is totally doable. I dont know how to use that annotation stuff so maybe jerry can explain more there. What you could do would be create to different workspaces (server / client) and work independant. On the client side do only client stuff (rendering /networking / blocks / items) and on the server side do all the server stuff (most of the event handling/ networking / blocks / items) It is just REALLY important that when you register your items / blocks / whatever via GameRegistry.register...() that you use the same names ( if im not mistaken)
  2. you will need a taglist to save an inventory. otherwise the last item saved will overwrite all others @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); NBTTagList list = compound.getTagList("items", 10); for(int i=0; i<list.tagCount(); i++) { NBTTagCompound nbt = list.getCompoundTagAt(i); byte slot = nbt.getByte("slot"); ItemStack stack = ItemStack.loadItemStackFromNBT(nbt); inventory.setInventorySlotContents(slot, stack); } } @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); NBTTagList list = new NBTTagList(); for(int i=0; i<inventory.getSizeInventory(); i++) { ItemStack stack = inventory.getStackInSlot(i); if(stack==null) continue; NBTTagCompound nbt = new NBTTagCompound(); nbt.setByte("slot", (byte) i); stack.writeToNBT(nbt); list.appendTag(nbt); } compound.setTag("items", list); }
  3. wasnt the flagg for blocks dropping..?
  4. why would you create your own effect if you cant use vanillas? simply make some simple if checks to find out if the effect is alive for nuf seconds to heal and then reapply it..
  5. why do you want to separate? its a fkn whole ton of extra work to do, but yes it is possible
  6. Im not sure if I get ur quesiton right. Forge already ensures that clients can only join if they got the exact same version (of course u need to change the version of the mod when making a new release)
  7. how bout u show some code? start with the entitythrowable
  8. AlchemicalWizardry is broken. You probably got a wrong version that did not got obfuscated
  9. yes because normal blocks cant tick
  10. /** * Called from the Chunk when this is first added to the world. Override instead of adding * if (firstTick) stuff in update. Happens after validate and after it has been placed into the Chunk tileEntity * map. */ Best.comment.ever.
  11. Always Choonster beeing the mvp :b thank you sir!
  12. Hey everyone, I am coding a freezer for food (in my mod food can decay) My problem right now is when the freezer gets unloaded (playerr moves away from it) time keeps passing in the world. So when the freezer reloads I need to check how much time has passed, decrement the amount of coolant and if there is not enough coolant reduce the durability of the food. I need the actual world time to check that and wanted to access the worldObj in readFromNBT, but im getting a NPE. I know I can acess an worldObj via MinecraftServer but I feel like this is a dirty way and im asking for the better one. Any help is appreciated Greetz Fail
  13. wrong forum sir. this is for modders searching for help with coding
  14. I think what you are looking for is ISmartItemModel
  15. you should learn java and what It means to create a class that extends something
  16. are you registering the gui handler?
  17. you knpow that FMLProxyPacket is a default forge class, right?
  18. its way better to clean ur code FIRST and then extend the functionality. otherway you will just mess up
  19. Alright I feel totally retarded to ask this. I am triing to spawn blocks of falling sand, but for some reason they are appear for a second and disappear right away. this is how I spawn the block int x = world.rand.nextInt(sizeX); int z = world.rand.nextInt(sizeZ); EntityFallingBlock block = new EntityFallingBlock(world, anchor.getX()+x, anchor.getY()+18, anchor.getZ()+5, Blocks.sand.getDefaultState()); world.spawnEntityInWorld(block); (It gets called on server side every 5 ticks if some conditions are true)
  20. Show us ur code?
  21. if you want to know how to use events. GOOGLE it
  22. you need to use a tickhandler
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.