Java Code Examples for net.minecraftforge.event.entity.EntityEvent#EntityConstructing
The following examples show how to use
net.minecraftforge.event.entity.EntityEvent#EntityConstructing .
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: EventHandlerGolem.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent(priority = EventPriority.LOWEST) public void on(EntityEvent.EntityConstructing e) { if(e.entity instanceof EntityGolemBase) { EntityGolemBase golem = (EntityGolemBase) e.entity; golem.registerExtendedProperties(Gadomancy.MODID, new ExtendedGolemProperties(golem)); golem.getDataWatcher().addObject(ModConfig.golemDatawatcherId, ""); } }
Example 2
Source File: EntitySpawnHandler.java From Moo-Fluids with GNU General Public License v3.0 | 5 votes |
@SubscribeEvent public void onEntityConstruction(EntityEvent.EntityConstructing event) { if (event.getEntity() instanceof EntityFluidCow) { final EntityFluidCow entityFluidCow = (EntityFluidCow) event.getEntity(); if (entityFluidCow.getEntityFluid() == null) { entityFluidCow.setEntityFluid(getEntityFluid()); } } }