
MCrafterzz
Members-
Posts
285 -
Joined
-
Last visited
Everything posted by MCrafterzz
-
My multitool, maybe it helps: http://pastebin.com/kc81tL87
-
Fence Gate rendering problem 1.10.2 (Solved)
MCrafterzz replied to jjattack's topic in Modder Support
Copy the fence gates files from vanilla into your mod. Then extends your mod fence gate files instead of the vanilla fence gate files -
TESR still exist in 1.10.2
-
[1.10.2]help getting BlockPos and Breaking adjacent blocks...
MCrafterzz replied to gabriellsh's topic in Modder Support
Another thing, your multitool wont be effective on modded blocks, take a look on my multitool: http://pastebin.com/jFmqACY9 -
[1.10.2]help getting BlockPos and Breaking adjacent blocks...
MCrafterzz replied to gabriellsh's topic in Modder Support
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? -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
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 -
Then you need to show your code, how should we otherwise know the problem?
-
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
Fixed problem #1 with this: } else { if (worldIn.getBlockState(offset2).getBlockHardness(worldIn, offset2)!=Blocks.BEDROCK.getBlockHardness(Blocks.BEDROCK.getDefaultState(), worldIn, null)) { worldIn.setBlockToAir(offset2); } } -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
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); } } -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
WHY AM I STILL USING THE STATe VARIABLE? I have now changed it -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
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); } } -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
AND HOW DO I DO THAT?? I just did want you told me to do -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
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 -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
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 -
[1.10.2][FIXED thank you Draco18s!] Break blocks with enchantments
MCrafterzz replied to MCrafterzz's topic in Modder Support
Where should I look? -
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
-
[FINALY SOLVED][1.10.2] Check if tool can break block
MCrafterzz replied to MCrafterzz's topic in Modder Support
Thank you it worked -
1.7.10 is no longer supported by forge, you are on your own.
-
[FINALY SOLVED][1.10.2] Check if tool can break block
MCrafterzz replied to MCrafterzz's topic in Modder Support
HELP! -
Solved, thank you everyone
-
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
-
CommonProxy: public void init(FMLInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new CommandMCrafterzzMod()); ClientCommandHandler.instance.registerCommand(new CommandMM()); ClientCommandHandler.instance.registerCommand(new CommandSetBlocks()); }
-
[FINALY SOLVED][1.10.2] Check if tool can break block
MCrafterzz replied to MCrafterzz's topic in Modder Support
I added this: RayTraceResult sideHit = this.rayTrace(worldIn, player, false); But side hit doesn't have a methoud named .getAxis() -
[FINALY SOLVED][1.10.2] Check if tool can break block
MCrafterzz replied to MCrafterzz's topic in Modder Support
What? -
This is the only thing on the errored line: }