Jump to content

Mightydanp

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Mightydanp

  1. it is but here is the whole code after working on it a bit. ignore all the isRemote it is there so that the message doesn't get displayed twice
  2. your not looking " nbt.setInteger("coolDown", 180); " there is the part where it is set in the code
  3. i am having a bit of a issue. i made a nbt tag compound for my item. the problem is i tried to make it a cool down. The cooldown is always 0 for some reason even if i try to set it.
  4. i know metadata and itemdamage are almost the same thing but i was hoping for some help on variables in the json file to set the textures
  5. i am trying to find a way to do diffrent varients for the json file of a item. I have looked around for examples but cannot find any. I am trying to change a items json file or have it chance its texted based on the varient.
  6. i removed && this.twig.canBlockStay(worldIn, blockpos, this.state and it still game me the same errors i showed you above
  7. at com.mightydanp.eot.api.common.world.gen.feature.IWorldGenTwigs.generate(IWorldGenTwigs.java:23) ~[iWorldGenTwigs.class:?] at com.mightydanp.eot.api.common.world.gen.IWorldGen.spawnTwigs(IWorldGen.java:57) ~[iWorldGen.class:?] at com.mightydanp.eot.common.world.gen.WorldGen.generateSurface(WorldGen.java:51) ~[WorldGen.class:?] at com.mightydanp.eot.api.common.world.gen.IWorldGen.generate(IWorldGen.java:28) ~[iWorldGen.class:?] at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:120) ~[GameRegistry.class:?] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1070) ~[Chunk.class:?] at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1033) ~[Chunk.class:?]
  8. Any help ? i registed my block state of my block already. it still gave me the error
  9. if (worldIn.isAirBlock(blockpos) && (!worldIn.provider.getHasNoSky() || blockpos.getY() < 255) && this.getBlock.canBlockStay(worldIn, blockpos,this.getBlock.getDefaultState() ))
  10. i have tried to set the blocks state with this.getBlock.getDefaultState() and this.getBlock.canBlockStay(worldIn, blockpos, this.getBlock.getStateFromMeta(0) neither of them work and it gives the same exact crash
  11. Encountered an unexpected exception java.lang.NullPointerException at net.minecraft.block.BlockBush.canBlockStay(BlockBush.java:80) ~[blockBush.class:?] at com.mightydanp.eot.api.common.world.gen.feature.IWorldGenTwigs.generate(IWorldGenTwigs.java:31) ~[iWorldGenTwigs.class:?] at com.mightydanp.eot.api.common.world.gen.IWorldGen.spawnTwigs(IWorldGen.java:57) ~[iWorldGen.class:?] at com.mightydanp.eot.common.world.gen.WorldGen.generateSurface(WorldGen.java:51) ~[WorldGen.class:?] at com.mightydanp.eot.api.common.world.gen.IWorldGen.generate(IWorldGen.java:28) ~[iWorldGen.class:?] http://pastebin.com/A5Fiq6uA http://pastebin.com/36390A3G spawnTwigs(ModBlocks.twigs, world, random, chunkX, chunkZ, 7);
  12. I just tried this and i get the same Errors
  13. I am trying to Generate a flower like block. right now it extends Blockbush. i seem to be having trouble with this line if (worldIn.isAirBlock(blockpos) && (!worldIn.provider.getHasNoSky() || blockpos.getY() < 255) && this.getBlock.canBlockStay(worldIn, blockpos, this.state)) this part makes my game crash this.getBlock.canBlockStay(worldIn, blockpos, this.state) http://pastebin.com/ZpERMRM6 http://pastebin.com/X1TpkUcM
  14. when i just put ItemTwigs it says ItemTwigs cannot be resolved to a variable
  15. I just have but can you explain what i am sepost to put in for itemblock in public static void registerCustomItemBlockAndBlock(Block block, ItemBlock itemBlock, String registryName) because for me i am putting in registerCustomItemBlockAndBlock(twigs, ItemTwigs.class, ItemReference.TWIGS_NAME) and it says The method registerBlock(Block, ItemBlock, String) in the type IRegistryHandler is not applicable for the arguments (Block, Class<ItemTwigs>, String)
  16. The method registerBlock(Block, String, String[], ItemBlock) in the type IRegistryHandler is not applicable for the arguments (Block, String, null, Class<ItemTwigs>) ModBlocks.java /MDKExample/src/main/java/com/mightydanp/eot/common/block line 39 Java Problem
  17. ifgured out the problem and semi-fixed it im trying to make this ise a ItemBlock but i get a error when i put ItemBlockTwigs.class public static Block registerBlock(Block block, String prefixName, @Nullable String[] suffixName, @Nullable ItemBlock isCustomItemBlock) { if (isCustomItemBlock == null) { GameRegistry.register(block, new ResourceLocation(Reference.MODID, prefixName)); ItemBlock itemBlock = new IMetaItemBlock(block, suffixName); GameRegistry.register(itemBlock.setRegistryName(block.getRegistryName())); } else { GameRegistry.register(block, new ResourceLocation(Reference.MODID, prefixName)); GameRegistry.register(isCustomItemBlock.setRegistryName(block.getRegistryName())); } return block; }
  18. o got ride of that i got this now http://pastebin.com/H3uVazFK
  19. ok its not a registry name. i have my ModBlocks.preInit(); ModItems.preInit(); im preInit and my ModBlocks.renderBlocks(); ModItems.renderItems(); in preinit in client proxy
  20. im trying something like this it gives me Caught exception from eot java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: eot:compressed Old: eot:compressed[Ljava.lang.String;@64b7066e
  21. for some odd reason my block states work fine but i cannot make a single block
×
×
  • Create New...

Important Information

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