Hi i am reading Minecraft modding forge (Arun Gupta).
The book is about modding Minecraft, of course.
unfortunately the book was made in version 1.6.4, so the codes have changed .
I have actually copied the code from the book and pasted it right to the machine.
Still i get an syntax error from: event.block and event.x/y/z.
Can anyone help me with this new code?
package jattys.mods.forge;
import java.util.Random ;
import net.minecraft.init.Blocks ;
import net.minecraftforge.event.world.BlockEvent.BreakEvent ;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent ;
public class DiamondOreTrap {
@SubscribeEvent
public void explode ( BreakEvent event ) {
if ( (syntax error)event.block != Blocks . diamond_ore ) {
return ;
}
event.world.createExplosion( null , (syntax error)event.x , event.y , event.z , 10 , true );
}
}
Whats wrong?