Failender
Forge Modder-
Posts
1091 -
Joined
-
Last visited
Everything posted by Failender
-
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)
-
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); }
-
[1.7.10] Regeneration Effect on Custom Armor
Failender replied to DanielDawn's topic in Modder Support
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.. -
erreur avec mes mods|error with my mods
Failender replied to ClemCa's topic in Support & Bug Reports
AlchemicalWizardry is broken. You probably got a wrong version that did not got obfuscated -
[1.7.10]How do I make a block suck in entities?
Failender replied to roket333's topic in Modder Support
yes because normal blocks cant tick -
/** * 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.
-
Always Choonster beeing the mvp :b thank you sir!
-
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
-
wrong forum sir. this is for modders searching for help with coding
-
I think what you are looking for is ISmartItemModel
-
you should learn java and what It means to create a class that extends something
-
[1.7.10] [SOLVED] Right Click Item opens a GUI problem
Failender replied to Rennancge's topic in Modder Support
are you registering the gui handler? -
you knpow that FMLProxyPacket is a default forge class, right?
-
[1.7.10] adding a potion effect before entity is killed
Failender replied to Elrol_Arrowsend's topic in Modder Support
its way better to clean ur code FIRST and then extend the functionality. otherway you will just mess up -
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)
-
Show us ur code?
-
if you want to know how to use events. GOOGLE it
-
-
-
you need to use a tickhandler