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.

FireIsH0t

Members
  • Joined

  • Last visited

Everything posted by FireIsH0t

  1. Don't get me wrong im new to coding java but it should override a method
  2. package net.arsenalnetwork.arsenalmod.client.entities; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.Mod; public class Zombies extends EntityZombie { //Constructor public Zombies(World worldIn) { super(worldIn); } @Override public void onLivingUpdate() { if (this.world.isDaytime() && !this.world.isRemote && !this.isChild() && this.shouldBurnInDay()) { float f = this.getBrightness(); if (f > 0.5F && this.rand.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.world.canSeeSky(new BlockPos(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ))) { boolean flag = true; ItemStack itemstack = this.getItemStackFromSlot(EntityEquipmentSlot.HEAD); if (!itemstack.isEmpty()) { if (itemstack.isItemStackDamageable()) { itemstack.setItemDamage(itemstack.getItemDamage() + this.rand.nextInt(2)); if (itemstack.getItemDamage() >= itemstack.getMaxDamage()) { this.renderBrokenItemStack(itemstack); this.setItemStackToSlot(EntityEquipmentSlot.HEAD, ItemStack.EMPTY); } } flag = false; } if (flag) { this.setFire(8); } } } super.onLivingUpdate(); } @Override protected boolean shouldBurnInDay() { return false; } }
  3. tried this but didnt work
  4. package net.arsenalnetwork.arsenalmod.client.entities; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class Zombies extends EntityZombie { //Constructor public Zombies(World worldIn) { super(worldIn); } public void onLivingUpdate() { if (this.world.isDaytime() && !this.world.isRemote && !this.isChild() && this.shouldBurnInDay()) { float f = this.getBrightness(); if (f > 0.5F && this.rand.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.world.canSeeSky(new BlockPos(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ))) { boolean flag = true; ItemStack itemstack = this.getItemStackFromSlot(EntityEquipmentSlot.HEAD); if (!itemstack.isEmpty()) { if (itemstack.isItemStackDamageable()) { itemstack.setItemDamage(itemstack.getItemDamage() + this.rand.nextInt(2)); if (itemstack.getItemDamage() >= itemstack.getMaxDamage()) { this.renderBrokenItemStack(itemstack); this.setItemStackToSlot(EntityEquipmentSlot.HEAD, ItemStack.EMPTY); } } flag = false; } if (flag) { this.setFire(8); } } } super.onLivingUpdate(); } protected boolean shouldBurnInDay() { return false; } }
  5. Crap if (event.getEntity() instanceof EntityZombie) { event.getEntity(new Zombies(zombieDoNotBurnInDaylight(event)); ignore that Idk what i was doing
  6. Hello, im trying to make a event where entity zombies do not die in daylight or get any effects. EventHandler Class: package net.arsenalnetwork.arsenalmod.handlers; import net.arsenalnetwork.arsenalmod.client.entities.Zombies; import net.arsenalnetwork.arsenalmod.client.gui.ArsenalMainMenu; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import java.util.Arrays; @Mod.EventBusSubscriber(modid = "arsenalmod", value = Side.CLIENT) public class EventHandler { @SubscribeEvent public static void zombieDoNotBurnInDaylight(LivingEvent.LivingUpdateEvent event) { if (event.getEntity() instanceof EntityZombie) { event.getEntity(new Zombies(zombieDoNotBurnInDaylight(event)); } } }

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.