Everything posted by xJon
-
[1.8] [RESOLVED] Changing tool and armor material parameters with config file
Okay, I tried loading checks() in preInit and Items.init & Items.register in init, yet it didn't work. :'( Again, tool and armor material are been loaded with null parameters. Worth to note that all the configuration things that need to be loaded are been loaded in preInit.
-
[1.8] [RESOLVED] Changing tool and armor material parameters with config file
Basically the configuration is a boolean and it works good (I checked it on other things) so I don't think it has anything to do with the problem. The problem is loading the custom parameters into the tool and armor material, without them being null. So do I need to load checks() before I load the Items? How can I do that? wouldn't putting checks() in preInit and Tools in init problematic? Thanks for all the quick replies
-
[1.8] [RESOLVED] Changing tool and armor material parameters with config file
Hi, I want to change the parameters of the tool and armor materials with a boolean configuration file that I have setup, but unfortunately my method doesn't really work. Here's the relevant part of the code: public static int harvestLevel, maxUses, enchantability, armorHelm, armorChest, armorLeg, armorBoot; public static float efficiency, damage; public static void checks() { if(!UselessConfiguration.isUseless) { harvestLevel = 10; maxUses = 1000; enchantability = 100; efficiency = 10.0F; damage = 10.0F; armorHelm = 4; armorChest = 14; armorLeg = 10; armorBoot = 6; } else { harvestLevel = 0; maxUses = 11; enchantability = 1; efficiency = 0.5F; damage = 0.5F; armorHelm = 1; armorChest = 2; armorLeg = 2; armorBoot = 1; } } public static final Item.ToolMaterial uselessToolMaterial = EnumHelper.addToolMaterial("uselessToolMaterial", harvestLevel, maxUses, efficiency, damage, enchantability); public static final ItemArmor.ArmorMaterial uselessArmorMaterial = EnumHelper.addArmorMaterial("uselessArmorMaterial", "useless_armor", maxUses, new int []{armorHelm,armorChest,armorLeg,armorBoot}, enchantability); I tried calling checks() on preInit and on init but it refuses to work. Both tool and armor material are loading with null parameters. Don't know what am I doing wrong! Any help appreciated, thanks!
-
[1.8] [RESOLVED] Breaking particles of custom blocks
I edited it in, can you please tell me what the hell am I doing wrong? Thanks
-
[1.8] [RESOLVED] Breaking particles of custom blocks
When I add this to my model it just breaks, and the block isn't rendering at all D: This is my current (and working but without the particles) model: { "textures": { "0": "blocks/stonebrick_carved", "1": "blocks/log_spruce", "2": "blocks/coal_block", "3": "blocks/hardened_clay_stained_cyan", "4": "blocks/piston_bottom", "5": "blocks/glowstone", "6": "blocks/planks_oak", "7": "blocks/quartz_block_top", "8": "blocks/hardened_clay_stained_red", "9": "blocks/hardened_clay_stained_blue", "10": "blocks/hardened_clay_stained_yellow", "11": "blocks/mushroom_block_skin_stem" }, "elements": [ { "name": "Cube", "from": [ 1.0, 0.0, 1.0 ], "to": [ 15.0, 1.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 13.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 13.0, 1.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 14.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 13.0, 14.0 ] } } }, { "name": "Cube", "from": [ 11.0, 1.0, 11.0 ], "to": [ 14.0, 9.0, 14.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] } } }, { "name": "Cube", "from": [ 12.0, 1.0, 11.0 ], "to": [ 5.0, 9.0, 5.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, -7.0, 8.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, -6.0, 8.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, -7.0, 8.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, -6.0, 8.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, -7.0, -6.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, -7.0, -6.0 ] } } }, { "name": "Cube", "from": [ 3.0, 1.0, 0.0 ], "to": [ 13.0, 17.0, 6.0 ], "faces": { "north": { "texture": "#3", "uv": [ 0.0, 0.0, 9.0, 17.0 ] }, "east": { "texture": "#3", "uv": [ 0.0, 0.0, 6.0, 17.0 ] }, "south": { "texture": "#3", "uv": [ 0.0, 0.0, 9.0, 17.0 ] }, "west": { "texture": "#3", "uv": [ 0.0, 0.0, 6.0, 17.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 0.0, 9.0, 6.0 ] }, "down": { "texture": "#3", "uv": [ 0.0, 0.0, 9.0, 6.0 ] } } }, { "name": "Cube", "from": [ 2.0, 9.0, 1.0 ], "to": [ 14.0, 10.0, 14.0 ], "faces": { "north": { "texture": "#4", "uv": [ 1.0, 5.0, 12.0, 6.0 ] }, "east": { "texture": "#4", "uv": [ 0.0, 0.0, 13.0, 1.0 ] }, "south": { "texture": "#4", "uv": [ 0.0, 0.0, 11.0, 1.0 ] }, "west": { "texture": "#4", "uv": [ 0.0, 0.0, 13.0, 1.0 ] }, "up": { "texture": "#4", "uv": [ 2.0, 1.0, 14.0, 14.0 ] }, "down": { "texture": "#4", "uv": [ 2.0, 3.0, 13.0, 16.0 ] } } }, { "name": "Cube", "from": [ 10.0, 9.0, 6.0 ], "to": [ 11.0, 10.0, 7.0 ], "faces": { "north": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "east": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "south": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "west": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "up": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#-1", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "Cube", "from": [ 4.0, 16.0, 8.0 ], "to": [ 12.0, 18.0, 12.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "x", "angle": -22.5 }, "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 7.0, 2.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 7.0, 2.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 4.0, 2.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 7.0, 4.0 ] }, "down": { "texture": "#5", "uv": [ 4.0, 6.0, 11.0, 10.0 ] } } }, { "name": "Cube", "from": [ 4.0, 10.0, 6.0 ], "to": [ 12.0, 16.0, 7.0 ], "faces": { "north": { "texture": "#6", "uv": [ 0.0, 0.0, 7.0, 6.0 ] }, "east": { "texture": "#6", "uv": [ 3.0, 0.0, 4.0, 6.0 ] }, "south": { "texture": "#7", "uv": [ 8.0, 5.0, 15.0, 11.0 ] }, "west": { "texture": "#6", "uv": [ 2.0, 0.0, 3.0, 6.0 ] }, "up": { "texture": "#6", "uv": [ 3.0, 0.0, 10.0, 1.0 ] }, "down": { "texture": "#6", "uv": [ 0.0, 0.0, 7.0, 1.0 ] } } }, { "name": "Cube", "from": [ 11.0, 10.0, 7.0 ], "to": [ 13.0, 12.0, 9.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": -22.5 }, "faces": { "north": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "east": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "south": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "west": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "up": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "down": { "texture": "#8", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } } }, { "name": "Cube", "from": [ 3.0, 10.0, 8.0 ], "to": [ 5.0, 13.0, 10.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, "faces": { "north": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "east": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "south": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "west": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 3.0 ] }, "up": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "down": { "texture": "#9", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } } }, { "name": "Cube", "from": [ 14.0, 7.0, 4.0 ], "to": [ 15.0, 10.0, 13.0 ], "faces": { "north": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "east": { "texture": "#10", "uv": [ 0.0, 0.0, 9.0, 3.0 ] }, "south": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "west": { "texture": "#10", "uv": [ 0.0, 0.0, 9.0, 3.0 ] }, "up": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 9.0 ] }, "down": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 9.0 ] } } }, { "name": "Cube", "from": [ 1.0, 7.0, 4.0 ], "to": [ 2.0, 10.0, 13.0 ], "faces": { "north": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "east": { "texture": "#10", "uv": [ 0.0, 0.0, 9.0, 3.0 ] }, "south": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "west": { "texture": "#10", "uv": [ 0.0, 0.0, 9.0, 3.0 ] }, "up": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 9.0 ] }, "down": { "texture": "#10", "uv": [ 0.0, 0.0, 1.0, 9.0 ] } } }, { "name": "Cube", "from": [ 2.0, 1.0, 2.0 ], "to": [ 5.0, 9.0, 5.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] } } }, { "name": "Cube", "from": [ 11.0, 1.0, 2.0 ], "to": [ 14.0, 9.0, 5.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] } } }, { "name": "Cube", "from": [ 2.0, 1.0, 11.0 ], "to": [ 5.0, 9.0, 14.0 ], "faces": { "north": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "south": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 8.0 ] }, "up": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] }, "down": { "texture": "#1", "uv": [ 0.0, 0.0, 3.0, 3.0 ] } } }, { "name": "Cube", "from": [ 9.0, 16.0, -1.0 ], "to": [ 10.0, 22.0, 0.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": 22.5 }, "faces": { "north": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "east": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "south": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "west": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "up": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "Cube", "from": [ 6.0, 16.0, -1.0 ], "to": [ 7.0, 22.0, 0.0 ], "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "z", "angle": -22.5 }, "faces": { "north": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "east": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "south": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "west": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "up": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#11", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } } ] } And this is the block state: { "variants": { "normal": { "model": "jum:useless_machine" } } }
-
[1.8] [RESOLVED] Breaking particles of custom blocks
While breaking custom blocks like a new chest the breaking patricles are missing textures, and I'm not sure where in the code I need to implement this part. I'm pretty sure that this part changed between 1.7 to 1.8 so I couldn't find much already online which is relevant to me. Thanks!
-
[1.8] [UNSOLVED] Kill player by a button click
I have a GUI setup, and in "actionPerformed" I want to make it so one specific button would kill the player that is clicking it. It should be pretty simple? I'm not sure. I'm new here. Thanks
IPS spam blocked by CleanTalk.