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.

Darwino43

Members
  • Joined

  • Last visited

  1. Darwino43 joined the community
  2. This is for advanced Minecraft Java mod makers. So i have this script: import net.minecraft.entity.monster.SkeletonEntity; import net.minecraft.item.Items; import net.minecraft.item.EnchantedGoldenAppleItem; import net.minecraft.item.ItemStack; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Hand; import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class Example { @SubscribeEvent public void tameSkeleton(PlayerInteractEvent.EntityInteract event) { if (event.getTarget() instanceof SkeletonEntity) { SkeletonEntity skeleton = (SkeletonEntity) event.getTarget(); ItemStack itemstack = event.getPlayer().getHeldItem(event.getHand()); if (skeleton.isTamed()) { return; } else if (itemstack.getItem() instanceof EnchantedGoldenAppleItem) { if (!event.getPlayer().abilities.isCreativeMode) { itemstack.shrink(1); } if (!skeleton.world.isRemote) { skeleton.setTamedBy(event.getPlayer()); skeleton.world.setEntityState(skeleton, (byte)7); } return; } } } @SubscribeEvent public void skeletonDefendPlayer(LivingAttackEvent event) { if (event.getEntity() instanceof PlayerEntity) { PlayerEntity player = (PlayerEntity) event.getEntity(); if (player.getAttackingEntity() instanceof SkeletonEntity) { SkeletonEntity skeleton = (SkeletonEntity) player.getAttackingEntity(); if (skeleton.isTamed()) { event.setCanceled(true); skeleton.setAttackTarget(event.getSource().getTrueSource()); } } } } } and it should make skeleton posible to tame. Apps that im using to create mods doesnt show any errors so why it doesnt work?

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.