Posted August 7, 20178 yr I want to create the mod that destroy or spawn blocks freely. To reproduce destruction by right clicking a custom block, I tried following method. 1.Create a custom Block, and Override onBlockActivated. 2.Create a custom Explosion class. 3.Create a custom World class, and Override newExplosion to call the custom Explosion class. 4.In onBlockActivated, copy public void explode from EntityCreeper, and downcast worldIn(param) to the custom World class. But, it is error. Error Message: net.minecraft.client.multiplayer.WorldClient cannot be cast to com.example.examplemod.CustomWorld a type of worldIn is World, but there is WorldClient. why so? and, Is there other best ways? Please help me. Reference Material: https://www.youtube.com/watch?v=M5PI4KKTvPQ
August 8, 20178 yr Author 7 hours ago, diesieben07 said: Why are you making a custom World class? This is almost never a good idea. Just do the explosion from your onBlockActivated method. Thank you for answering my questions ! Because I want to transform the explosion shape. Is it possible to transform by using only param?
August 8, 20178 yr Change the explosion shape -> custom Explosion class. Nothing about that says "I need a custom World class" Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 8, 20178 yr Author 16 minutes ago, Draco18s said: Change the explosion shape -> custom Explosion class. Nothing about that says "I need a custom World class" oh, sorry. Where do I call custom Explosion class? I don't know how to call it.
August 8, 20178 yr 8 hours ago, diesieben07 said: Just do the explosion from your onBlockActivated method. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
August 8, 20178 yr 18 hours ago, uler_pyjon said: To reproduce destruction by right clicking a custom block, I tried following method. So... I'm a little confused. What exactly are you trying to do? Do you have to blow the block up? Or do you just want to remove it? Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes). I know Java pretty well... So yeah... Quote This is where I'd put an inspirational and/or clever quote, but I can't think of one right now... This is the output of the totally, 100% working compiler for my programming language, Planet9: Beginning Compilation... Failed compilation! planet9.compiler.error.CompilationException: Compiler not yet implemented at planet9.compiler.Compiler.compile(Compiler.java:39) at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.