Everything posted by SanAndreaP
-
[1.7.2]What is proper entity registration (conflicting tutorials confusion)?
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.
-
Setting Block bounds and collision?
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.
-
Setting Block bounds and collision?
or make a multiblock structure...
-
Armor not rendering
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)
-
[1.7.2] Data Watcher Help
Can I see that code of your event? (also where you register it)
-
[1.6.4] AccessTransformers... What am I doing wrong?
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:
-
[1.7.2] Data Watcher Help
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?
-
setupDecompWorkspace problem
Type "javac -version" (w/o qotes) into your command line and check if it's showing you sth. like "java 1.7"
-
Using config properties from ForgeModContainer
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)
-
Can't find Src Files with Eclipse!
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?
-
Can't find Src Files with Eclipse!
You run the gradle setup, right? Eclipse left sidebar (Package Explorer) -> Referenced Libraries -> forge-whatever.jar -> source files
-
Can't place saplings on custom grass?
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.
-
Using config properties from ForgeModContainer
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.
-
[Solved] [1.7.4] Item positioning and Particle Questions???~~
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
-
[Solved] [1.7.4] Item positioning and Particle Questions???~~
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
-
How drop items another mod(my mods, buildcraft, ic2 and other) ?
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.
-
Can't place saplings on custom grass?
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
-
[Resolved] [1.7.2] Block icon not being registered
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)
-
[Solved] [1.7.4] Item positioning and Particle Questions???~~
Crash report / logs? Also make sure you call the spawnParticle method client-side only
-
How to make it so my item doesn't have to click on a block to activate [1.7.2]
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.
-
Creating an ItemStack for armor texturing
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
-
Server running out of memory
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.
-
Help with right clicking on a item and activating it
There is a method called onItemUse(stack, player, world, x, y, z, side, offsetX, offsetY, offsetZ) Override it and do your stuff in there
-
[1.7.2] Lang and Assets System
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
-
Creating an ItemStack for armor texturing
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
IPS spam blocked by CleanTalk.