Jump to content

SanAndreaP

Forge Modder
  • Posts

    1689
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SanAndreaP

  1. No. Entities are registered always within the EntityList. The registerModEntity just ignores the IDtoClassMapping and the classToIDMapping. Natural spawns always grab the entities from the class supplied by the EntityRegistry.addSpawn method.
  2. or make a multiblock structure... That could be a little bit difficult, because how do you pause/stop the smelting progress if a block is broken? You would have to constantly check if all blocks are still in place... And what would you do if a block is brocken? pause the process/drop all items/... The block in the center can do all the processing. When a block outside is right-clicked, then give the GUI the position of the center block. When a block is broken, break all other blocks and the Drops will be given from the centered block. It's not that hard.
  3. or make a multiblock structure...
  4. Don't do stuff like this: public static Item dogHelmet = new DogArmor(dogArmor, helmetID, 0); Items / Blocks shouldn't be initialized during class variable declaration. Rather initialize them in your preInit method (before the GameRegistry stuff)
  5. Can I see that code of your event? (also where you register it)
  6. Try to place your _at.cfg within the FORGE_GRADLE_FOLDER/build/unpacked/src/main/resources/ directory and run the commands again. EDIT: The Wiki clearly states below the 1.7.2 section:
  7. 1. player.getHeldItem() can return null so check for that or it will crash there, too! 2. There's no dataWatcher object with ID 19 within the EntityPlayer. What are you trying to check exactly?
  8. Type "javac -version" (w/o qotes) into your command line and check if it's showing you sth. like "java 1.7"
  9. So you have a custom block, which should behave like a ladder? For that you don't need to access anything, just override the isLadder method mentioning in the code you've shown within your block class and return true. I have done that, it does not work. prop.comment = "Set this to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false"; When I read this, I see I need to set it to true in order for a block ladder to work. Edit: Wow I did not even see this comment. my bad! Ah. I see.... so wait. Changing forge.cfg will affect all mods someone is running, not just my mod, yes? Yes. EDIT: I highly doubt your approach will have any success either. since it just looks for a broader bounding box (you could actually copy the check for yourself and implement it somehow in your isLadder method)
  10. You run the gradle setup, right? Eclipse left sidebar (Package Explorer) -> Referenced Libraries -> forge-whatever.jar -> source files In 1.6.4?? I'm workin on 1.6.4 well, which Forge version do you use?
  11. You run the gradle setup, right? Eclipse left sidebar (Package Explorer) -> Referenced Libraries -> forge-whatever.jar -> source files
  12. No, because neither soil block which already exists are overriding the method, which is called by the BlockFlower under the canBlockStay method. Also the pre-existing canSustainPlant method within the Block class only checksfor certain blocks (like grass, sand, tilledField, soulSand, etc.) or a BlockFlower which returns true within its canThisPlantGrowOnThisBlockID method.
  13. So you have a custom block, which should behave like a ladder? For that you don't need to access anything, just override the isLadder method mentioning in the code you've shown within your block class and return true.
  14. You mean with "holding in your hand" that the item is held by the player / held by a mob? If so, the EntityItem is not responsible for this
  15. I don't know about you, but I tested that for my custom EntityItem (put a println inside the onUpdate method and let it print out if the world is remote) and the console got spammed with both, true and false lines 2014-04-10 18:07:22 [information] [sTDOUT] true 2014-04-10 18:07:22 [information] [sTDOUT] true 2014-04-10 18:07:22 [information] [sTDOUT] false 2014-04-10 18:07:22 [information] [sTDOUT] true 2014-04-10 18:07:22 [information] [sTDOUT] false 2014-04-10 18:07:22 [information] [sTDOUT] true 2014-04-10 18:07:22 [information] [sTDOUT] false ... and so on How do you spawn / register your EntityItems? I register them the way all other regular entities are registered (w/o the renderer) Here, have a look: EntityItem class https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/entity/item/EntityItemTantal.java Entity Registry class https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/registry/ModEntityRegistry.java#L56 Event class (where it gets spawned) https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/registry/event/EntityJoinWorldEventInst.java
  16. 1. Loader.isModLoaded(MODID) - where MODID is the mod-ID of the mod you search for, e.g. Loader.isModLoaded("RedPowerWorld") 2. GameRegistry.findItem(modId, name) - where modId is the above-mentioned one, and name is the registered name of the mod item (the second parameter in GameRegistry.registerItem) The second returns null if it can't find the item, so you could skip the first check if the mod is loaded.
  17. Actually there is: BlockSapling extends BlockFlower, which checks for the correct soil within the canBlockStay method. There's a piece where it checks if the block below can sustain the plant by calling canSustainPlant on the soil block. To make it easier: override canSustainPlant and return true in your block class
  18. where do you register your block? It sounds like you do it on Init (FMLInitializationEvent) and if you do, move that registration stuff into the PreInit (FMLPreInitializationEvent)
  19. Crash report / logs? Also make sure you call the spawnParticle method client-side only
  20. Minecraft.getMinecraft().thePlayer This code will CERTAINLY crash on a server, also you have a player argument supplied in your method (so does onItemRightClick suggested by coolAlias), use that.
  21. Glad I could help. By the way, I'm currently refractoring the mod, so there's a cleaned up version here: https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/item/ItemNiobArmor.java#L29-L39
  22. Try to supply next to the Xmx argument the Xms like: -Xms2G -Xmx2G and make sure both have the same value. Tell us if that helps.
  23. There is a method called onItemUse(stack, player, world, x, y, z, side, offsetX, offsetY, offsetZ) Override it and do your stuff in there
  24. The future way of doing things is a .lang file for your mod: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/resources/assets/enderstuffp/lang/en_US.lang
  25. Create a new class which extends ItemArmor, override the method and put your code in there. Example: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/sanandreasp/mods/EnderStuffPlus/item/ItemNiobArmor.java#L26-L36
×
×
  • Create New...

Important Information

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