Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jarle

Members
  • Joined

  • Last visited

  1. Yeah I am a teenager hwo are trying to learn coding so that speaks for it self... but thanks
  2. Hi there! I am trying to check if the player kills a Zombie and not anything else. I am new at minecraft modding so please help me! import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityZombie; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class Inheritance { EntityZombie entityZ = new EntityZombie(null); @SubscribeEvent public void LivingDeathEvent(AttackEntityEvent event){ if(event.target == entityZ){ System.out.println("You killed a zombie"); } } } I am not getting any errors but it still doesn't print out
  3. Jarle replied to Jarle's topic in Modder Support
    sorry forgot to tell you i am modding in 1.8
  4. Jarle posted a topic in Modder Support
    What i want to do: I want to make a mod, where the player can jump much higher then normal height. The height should be 15 times higher then normal height. This function will only be available if my position is on an slime_block. I no this mod may be really strange, but why not? The code package jattys.mods.devox4kids; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class SuperJump { @SubscribeEvent public void BouncySlimeBlock(LivingJumpEvent event){ if(!(event.entity instanceof EntityPlayer)) { return; } if(event.entity.worldObj.(where i get an error)getBlock( ((int) Math.floor(event.entity.posX)), ((int) Math.floor(event.entity.posY)) - 2, ((int) Math.floor(event.entity.posZ))) != Blocks.slime_block){ return; } event.entity.motionY *= 15; } } The error The method getBlock(int, int, int) is undefined for the type World. What can i actually do?
  5. Jarle replied to Jarle's topic in Modder Support
    I am a freaking noob Sorry Faillander, but i couldn't make the BlockPos idea to work. event.world.createExplosion( null, BlockPos(x, y, z), 10 , true ); It just gives me an syntax error.
  6. Jarle replied to Jarle's topic in Modder Support
    oh tank you man you saved me a lot of time!
  7. Jarle replied to Jarle's topic in Modder Support
    Thanks for the help but what about the x,y and z tough?
  8. Jarle replied to Jarle's topic in Modder Support
    Yeah, i am in version 1.8
  9. Jarle posted a topic in Modder Support
    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?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.