Jump to content

MCrafterzz

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by MCrafterzz

  1. My multitool, maybe it helps: http://pastebin.com/kc81tL87
  2. Copy the fence gates files from vanilla into your mod. Then extends your mod fence gate files instead of the vanilla fence gate files
  3. TESR still exist in 1.10.2
  4. Another thing, your multitool wont be effective on modded blocks, take a look on my multitool: http://pastebin.com/jFmqACY9
  5. Change the name to solved if you have solved it. Also happy that my thread was useful for over people to. On thing though, this wont work with enchantments, so do you want your multitool to be enchantable?
  6. It now works, THANK YOU so much! I don't know why it didn't work before. The only change was that I had IBlockState offsetState = worldIn.getBlockState(offset2); at the top instead of worldIn.getBlockState(offset2) on every line. Don't know why that made a different, but the important thing is that it now works
  7. Then you need to show your code, how should we otherwise know the problem?
  8. Fixed problem #1 with this: } else { if (worldIn.getBlockState(offset2).getBlockHardness(worldIn, offset2)!=Blocks.BEDROCK.getBlockHardness(Blocks.BEDROCK.getDefaultState(), worldIn, null)) { worldIn.setBlockToAir(offset2); } }
  9. Still doen't work, updated code: if (worldIn.getBlockState(offset2).getBlock().canHarvestBlock(worldIn, offset2, player)) { worldIn.getBlockState(offset2).getBlock().removedByPlayer(worldIn.getBlockState(offset2), worldIn, offset2, player, true); worldIn.getBlockState(offset2).getBlock().onBlockDestroyedByPlayer(worldIn, offset2, worldIn.getBlockState(offset2)); worldIn.getBlockState(offset2).getBlock().harvestBlock(worldIn, player, offset2, worldIn.getBlockState(offset2), null, itemStack); } else { if (worldIn.isBlockModifiable(player, offset2)) { worldIn.setBlockToAir(offset2); } }
  10. WHY AM I STILL USING THE STATe VARIABLE? I have now changed it
  11. Thank you, but there are 2 problems: 1. I can't make it be able to not break unbreakeble blocks 2. Only the original block drops (all of them breakes) if (worldIn.getBlockState(offset2).getBlock().canHarvestBlock(worldIn, offset2, player)) { worldIn.getBlockState(offset2).getBlock().removedByPlayer(state, worldIn, offset2, player, true); worldIn.getBlockState(offset2).getBlock().onBlockDestroyedByPlayer(worldIn, offset2, state); worldIn.getBlockState(offset2).getBlock().harvestBlock(worldIn, player, offset2, state, null, itemStack); } else { if (worldIn.isBlockModifiable(player, offset2)) { worldIn.setBlockToAir(offset2); } }
  12. AND HOW DO I DO THAT?? I just did want you told me to do
  13. I have now changed it to this: if (state.getBlock().canHarvestBlock(worldIn, offset2, player)) { state.getBlock().removedByPlayer(state, worldIn, offset2, player, true); state.getBlock().onBlockDestroyedByPlayer(worldIn, offset2, state); state.getBlock().harvestBlock(worldIn, player, offset2, state, null, itemStack); } else { worldIn.setBlockToAir(offset2); } The error: http://pastebin.com/iyU6Z4ec
  14. I've changed it to this: state.getBlock().harvestBlock(worldIn, player, offset2, state, null, itemStack); But only the original block breaks even if I get the drops from all of them
  15. I have created a hammer, but I have a problem (yes another problem), I don't know how to break blocks with enchantments so for example silk touch gives you the silk touch block. Here is the code that needs to be changed: worldIn.destroyBlock(offset2, true); Full souce code: http://pastebin.com/UHZCSs6K
  16. 1.7.10 is no longer supported by forge, you are on your own.
  17. Solved, thank you everyone
  18. Added this to the client Proxy: public void serverStart(FMLServerStartingEvent event) { event.registerServerCommand(new CommandMCrafterzzMod()); event.registerServerCommand(new CommandMM()); event.registerServerCommand(new CommandSetBlocks()); } but it doesn't work, not in the common proxy either
  19. CommonProxy: public void init(FMLInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new CommandMCrafterzzMod()); ClientCommandHandler.instance.registerCommand(new CommandMM()); ClientCommandHandler.instance.registerCommand(new CommandSetBlocks()); }
  20. I added this: RayTraceResult sideHit = this.rayTrace(worldIn, player, false); But side hit doesn't have a methoud named .getAxis()
  21. This is the only thing on the errored line: }
×
×
  • Create New...

Important Information

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