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.

DaBootyO_o

Members
  • Joined

  • Last visited

  1. Thanks man. it took me a while to find the code, but it works. :D
  2. it keeps telling me to set posX as a variable. I cant seem to get around that.
  3. package mod; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumFacing; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class ZeusLightningBolt extends Item { public ZeusLightningBolt(ToolMaterial material) { super(); } public ItemStack onItemRightClick(ItemStack Itemstack, World world, EntityPlayer Entityplayer) { if(Entityplayer.capabilities.isCreativeMode || Entityplayer.inventory.consumeInventoryItem(Items.redstone)) world.playSoundAtEntity(Entityplayer, "ambient.weather.thunder", 20.0F, 40.0F / (itemRand.nextFloat() * 20.0F + 40.0F)); world.playSoundAtEntity(Entityplayer, "random.explode", 20.0F, 40.0F / (itemRand.nextFloat() * 20.0F + 40.0F)); double x = 0; double y = 0; double z = 0; world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z)); return Itemstack; } }
  4. I am having trouble spawning lightning bolts. There is thunder, but I cant seem to see the lightning bolt. Any solutions? I am new btw.

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.