net.minecraft.entity.monster.EntityWitch Java Examples

The following examples show how to use net.minecraft.entity.monster.EntityWitch. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HackableHandler.java    From PneumaticCraft with GNU General Public License v3.0 6 votes vote down vote up
public static void addDefaultEntries(){
    PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class);

    PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class);
    PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class);
    PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class);
    PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class);
    PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class);
    PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class);
    PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class);
    PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class);
    PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class);
    PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class);
}
 
Example #2
Source File: ServerEventHandler.java    From Et-Futurum with The Unlicense 5 votes vote down vote up
@SubscribeEvent
public void entityStruckByLightning(EntityStruckByLightningEvent event) {
	if (EtFuturum.enableVillagerTurnsIntoWitch && event.entity instanceof EntityVillager) {
		EntityVillager villager = (EntityVillager) event.entity;
		if (!villager.worldObj.isRemote) {
			EntityWitch witch = new EntityWitch(villager.worldObj);
			witch.copyLocationAndAnglesFrom(villager);
			witch.onSpawnWithEgg(null);
			villager.worldObj.spawnEntityInWorld(witch);
			villager.setDead();
		}
	}
}
 
Example #3
Source File: EntityWitchMetaProvider.java    From OpenPeripheral-Integration with MIT License 5 votes vote down vote up
@Override
public Object getMeta(EntityWitch target, Vec3 relativePos) {
	Map<String, Object> map = Maps.newHashMap();

	map.put("isAggressive", target.getAggressive());

	return map;
}
 
Example #4
Source File: HackableWitch.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean afterHackTick(Entity entity){
    if(attackTimer == null) attackTimer = ReflectionHelper.findField(EntityWitch.class, "field_82200_e", "witchAttackTimer");
    try {
        attackTimer.set(entity, 20);
        ((EntityWitch)entity).setAggressive(true);
        return true;
    } catch(Exception e) {
        Log.warning("Reflection failed on HackableWitch:");
        e.printStackTrace();
        return false;
    }
}
 
Example #5
Source File: CraftWitch.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public CraftWitch(CraftServer server, EntityWitch entity) {
    super(server, entity);
}
 
Example #6
Source File: CraftWitch.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityWitch getHandle() {
    return (EntityWitch) entity;
}