private void explode() { if (!this.world.isRemote) { boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); int explosionRadius = 2; this.dead = true; this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float) explosionRadius, flag); this.setDead(); } }
private void explode() { if (!this.world.isRemote) { boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); int explosionRadius = 2; this.dead = true; this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float) explosionRadius, flag); this.setDead(); } }
private void explode() { if (!this.world.isRemote) { boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); int explosionRadius = 2; this.dead = true; this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float) explosionRadius, flag); this.setDead(); } }
private void explode() { if (!this.world.isRemote) { boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); int explosionRadius = 2; this.dead = true; this.world.createExplosion(this, this.posX, this.posY, this.posZ, (float) explosionRadius, flag); this.setDead(); } }
/** * Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { double distance = Math.hypot(Math.abs(this.villager.getPositionVector().z - this.getSpawnLocation().getZ()), Math.abs(this.villager.getPositionVector().x - this.getSpawnLocation().getX())); if (distance < 10) { if (!ForgeEventFactory.getMobGriefingEvent(this.villager.world, this.villager)) { return false; } if (this.runDelay > 0) { --this.runDelay; return false; } else { this.runDelay = 20 + this.villager.getRNG().nextInt(10); this.currentTask = 0; this.staiedAtExploration = 0; return this.searchForDestination(); } } return false; }
/** * Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { if (!super.shouldExecute()) { return false; } else if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.entity.world, this.entity) || !this.entity.world.getBlockState(this.doorPosition).getBlock().canEntityDestroy(this.entity.world.getBlockState(this.doorPosition), this.entity.world, this.doorPosition, this.entity) || !net.minecraftforge.event.ForgeEventFactory.onEntityDestroyBlock(this.entity, this.doorPosition, this.entity.world.getBlockState(this.doorPosition))) { return false; } else { BlockDoor blockdoor = this.doorBlock; return !BlockDoor.isOpen(this.entity.world, this.doorPosition); } }
if (this.willExplode) { if (this.ticksTillExplosion == 0) { world.newExplosion(null, this.posX, this.posY, this.posZ, 2.5F * this.getScaleForAge(), false, net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this)); } else { this.ticksTillExplosion--;
switch (rand.nextInt(4)) { case 0: boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); if (!flag) { setSpawn((byte) 0);