use of net.minecraftforge.eventbus.api.SubscribeEvent in project NetherEx by LogicTechCorp.
the class WorldHandler method onEntitySpawn.
@SubscribeEvent
public static void onEntitySpawn(EntityJoinWorldEvent event) {
World world = event.getWorld();
Entity entity = event.getEntity();
if (!world.isRemote()) {
if (entity instanceof AreaEffectCloudEntity) {
AreaEffectCloudEntity areaEffectCloudEntity = (AreaEffectCloudEntity) entity;
areaEffectCloudEntity.effects.removeIf(effect -> effect.getPotion() == NetherExEffects.FIRE_BURNING.get());
}
}
}
use of net.minecraftforge.eventbus.api.SubscribeEvent in project NetherEx by LogicTechCorp.
the class RenderEventHandler method onRenderLivingPost.
@SubscribeEvent
public static void onRenderLivingPost(RenderLivingEvent.Post<?, ?> event) {
MatrixStack matrixStack = event.getMatrixStack();
IRenderTypeBuffer renderTypeBuffer = event.getBuffers();
LivingEntity entity = event.getEntity();
if (entity.isPotionActive(NetherExEffects.FIRE_BURNING.get())) {
renderThirdPersonBlueFire(matrixStack, renderTypeBuffer, entity);
}
}
use of net.minecraftforge.eventbus.api.SubscribeEvent in project NetherEx by LogicTechCorp.
the class RenderEventHandler method onRenderSpecificHand.
@SubscribeEvent
public static void onRenderSpecificHand(RenderHandEvent event) {
PlayerEntity player = MINECRAFT.player;
MatrixStack matrixStack = event.getMatrixStack();
if (player != null && player.isPotionActive(NetherExEffects.FIRE_BURNING.get())) {
renderFirstPersonBlueFire(matrixStack);
}
}
use of net.minecraftforge.eventbus.api.SubscribeEvent in project NetherEx by LogicTechCorp.
the class DataGenerationHandler method onDataGathered.
@SubscribeEvent
public static void onDataGathered(GatherDataEvent event) {
DataGenerator generator = event.getGenerator();
if (event.includeServer()) {
generator.addProvider(gatherLootTables(generator));
generator.addProvider(gatherRecipes(generator));
}
}
use of net.minecraftforge.eventbus.api.SubscribeEvent in project NetherEx by LogicTechCorp.
the class MimicModelHandler method onModelBake.
@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
MimicBlock quartzOreBlock = (MimicBlock) NetherExBlocks.QUARTZ_ORE.get();
if (quartzOreBlock != null) {
ModelResourceLocation modelLocation = quartzOreBlock.getModelLocation();
IBakedModel model = event.getModelRegistry().get(modelLocation);
if (model != null) {
event.getModelRegistry().put(modelLocation, new MimicBakedModel(model, quartzOreBlock.getMimicType()));
}
}
}
Aggregations