-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
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.
-
or make a multiblock structure...
-
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)
-
Can I see that code of your event? (also where you register it)
-
[1.6.4] AccessTransformers... What am I doing wrong?
SanAndreaP replied to ianc1215's topic in Modder Support
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. 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?
-
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
SanAndreaP replied to EliteCreature's topic in Modder Support
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) -
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?
-
You run the gradle setup, right? Eclipse left sidebar (Package Explorer) -> Referenced Libraries -> forge-whatever.jar -> source files
-
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
SanAndreaP replied to EliteCreature's topic in Modder Support
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???~~
SanAndreaP replied to Pandassaurus's topic in Modder Support
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???~~
SanAndreaP replied to Pandassaurus's topic in Modder Support
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) ?
SanAndreaP replied to Kwasti's topic in Modder Support
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. -
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
SanAndreaP replied to DiabolusNeil's topic in Modder Support
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???~~
SanAndreaP replied to Pandassaurus's topic in Modder Support
Crash report / logs? Also make sure you call the spawnParticle method client-side only -
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
-
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
SanAndreaP replied to CarbonBasedGhost's topic in Modder Support
There is a method called onItemUse(stack, player, world, x, y, z, side, offsetX, offsetY, offsetZ) Override it and do your stuff in there -
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
-
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