
endershadow
Forge Modder-
Posts
535 -
Joined
-
Last visited
Everything posted by endershadow
-
let me re-phrase what I mean by that. I need to have a way that the player's armor will get chosen based on the numbers in the returned array. I know how I will choose the armor with the equation. I just don't know how to implement it. Would I save it in NBT Data? or would I have a custom renderer?
-
I started making a system that generates a unique number based on a players username. anyone know how I can generate the armor texture and abilities based on it? I basically have 5x5x5x5x5x5x2 (31250) possibilities that can occur. anyone know how I can do it. here's the code I have for the unique ID generator. I also would prefer to have a way to get more diverse numbers than just based on the username length. https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/matt/lyoko/lib/UniqueArmorGenerator.java
-
[1.5.1]GUI: detecting certain blocks(SOLVED)
endershadow replied to rasmustof's topic in Modder Support
first I would suggest a couple of changes to your code. //checking if the placed item is "Hydrocroconyzx ingot" only retuns false if there is no item in the slot since no othere item/block is allowed in the slot public boolean CheckInventoryTrader1(ItemStack par1ItemStack) { if(par1ItemStack != null){ Item item = par1ItemStack.getItem(); if(item.equals(EsteticsPLUS.HydrocroconyxIngot)) return true; else if(item.equals(Block.sand)) return true; else if(item.equals(ITEM_OR_BLOCK_HERE)) return true; } return false; } when you compare things that have Object as a parent, you use .eqauls() to compare them. if they're primitives, then you can use ==. you should also check if the ItemStack is null before getting the item otherwise it can cause crashes. "else return false" is the same as "return false" -
Help with modding Nether Warts and Gunpowder
endershadow replied to minecraftdotjarrr's topic in Modder Support
number one red flag with modding minecraft: never modify a base class unless necessary. -
Help with modding Nether Warts and Gunpowder
endershadow replied to minecraftdotjarrr's topic in Modder Support
look at the potato and/or carrot. those are edible and plantable. -
Forge automatically assigning Block and Item ID's
endershadow replied to endershadow's topic in Suggestions
like I said, it was just a suggestion. If it's too hard to do, or would require re-writing minecraft, then the suggestion is just an idea. nothing more. so I guess this thread is done. -
Forge automatically assigning Block and Item ID's
endershadow replied to endershadow's topic in Suggestions
for modders using forge, they wouldn't have to specify an id when making the block/item because forge would automatically convert it for us. but the modloader side of things would be a bit tricky. -
Forge automatically assigning Block and Item ID's
endershadow replied to endershadow's topic in Suggestions
maybe. It was just a suggestion. -
bump
-
Forge automatically assigning Block and Item ID's
endershadow replied to endershadow's topic in Suggestions
good point. although, the client could make a seperate config for that IP and port if the config files don't match. -
[SOLVED][SLOTS][1.5.1] limitations to only accept blocks
endershadow replied to rasmustof's topic in Modder Support
If Block.blocksList[stack.getItem().itemID] is returning null, that means that the item is not a block, ergo if its not null it must be a block. Ergo allow it (return true). but your code doesnt work .... it makes it so evrything is accepted if you want it so only blocks can be placed in it, you need a custom slot. -
isn't that what I did? and you're supposed to register it twice. if you look at the mod that did it, they did it the same way I did it.
-
well, it works, but I can't change the value of the variable. Anyone know why? here's the latest commit, which is basically everything. https://github.com/code-lyoko-modding/CodeLyokoMod/commit/1a441905065cff516af494cca85aad796f16e93c
-
I'm sorry WorldsEnder, I can't figure out what your code is telling me to do. It's so confusing and error ridden. Um, someone had this same problem... half a minute... ...oh wait, they never solved it. Oh wait, that was you. Um, the code you have should work. newTag() is a static method that creates a new tag, and you don't need it. But setByte() should work just fine. Does it not save? If you set it and then read it, does it work? I've tried that, but it doesn't work.
-
How would i go about registering IAdditionalEntityData?
-
what kind of listener? this is done when the player logs in.
-
I've tried to add NBT data to the player, but to no avail. I have a method that should work (I think) but it doesn't here's my code. https://github.com/code-lyoko-modding/CodeLyokoMod/blob/master/matt/lyoko/network/PlayerTracker.java and here is what I tried before what is currently on GitHub. player.getEntityData().newTag((byte)1, "lifePoints"); player.getEntityData().setByte("lifePoints", (byte)100); I also tried player.getEntityData().newTag((byte)1, "lifePoints"); player.getEntityData().setByte("lifePoints", (byte)100); player.writeToNBT(player.getEntityData()); any help would be appreciated.
-
Never Mind. I figured out how to add an stuff to NBT, but it still doesn't show up. latest commit. https://github.com/code-lyoko-modding/CodeLyokoMod/commit/34b00755699bc74678efc74bfbfbe216f98066bb
-
now nothing appears. how to I add an NBTTagCompound to the player?
-
it always says zero. it should say 100 but it doesn't. The latest commit on the github has all the changes that were made, so here. https://github.com/code-lyoko-modding/CodeLyokoMod/commit/105e5f010864436fc397648adbeab71496e5577a
-
that's a good idea. I'll try it out and get back to you.
-
For the mod I'm making, I need to know how to save extra data to the player. Is there a way for me to do it with NBT data? I'm going to need to save 3 integers and a byte. If anyone knows how I can do this, please let me know. If I need to save it to a custom external file, how would I set up the directory for the file? I already know how to save and read from external files.
-
In the topic just before mine (which is now locked), it was suggested that block ID's are automatically set up by forge, thus making it incompatible with vanilla by extension. I thought, what if Item and Block ID's are set up so that mods can start with 0 as the first ID for Items and Blocks and continue to increase as blocks are added, but forge can automatically add them into the correct spot in the array for Items and Blocks when minecraft is loaded. I think forge could also have a configuration file that uses the mod ID to specify which order the mods are loaded in, and it automatically generates it and just appends new mods to the list as they are added. I think this might make it easier to update mod packs and such because the configs wouldn't need to be edited at all because it would be done automatically.
-
That already happens. When the player logs in, the server console lists all the mods the player has installed. it's simply a matter of finding where it does that, and then making a mod that will kick the player if certain mods are found.