mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-21 20:42:12 +00:00
- TileManipulationFocus: fixed & texture updated
This commit is contained in:
1 parent
c77555e5e4
commit
2088f3d2d2
12 files changed
+95
-27
No files matched your search
@@ -2,12 +2,18 @@ package makeo.gadomancy.common.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import makeo.gadomancy.common.data.ModConfig;
|
||||
import makeo.gadomancy.common.familiar.FamiliarAIController;
|
||||
import makeo.gadomancy.common.utils.world.TCMazeHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -40,4 +46,19 @@ public class EventHandlerEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void on(LivingEvent.LivingUpdateEvent event) {
|
||||
if(event.entityLiving == null || !(event.entityLiving instanceof EntityPlayer)) return;
|
||||
EntityPlayer player = (EntityPlayer)event.entity;
|
||||
if ((event.entity.worldObj.provider.dimensionId == ModConfig.dimOuterId) && ((player.ticksExisted & 7) == 0) && ((player.capabilities.isFlying) || (Hover.getHover(player.getEntityId())))){
|
||||
player.capabilities.isFlying = false;
|
||||
Hover.setHover(player.getEntityId(), false);
|
||||
String msg = StatCollector.translateToLocal("tc.break.fly");
|
||||
if(player.capabilities.isCreativeMode) {
|
||||
msg += " " + StatCollector.translateToLocal("gadomancy.eldritch.noflyCreative");
|
||||
}
|
||||
player.addChatMessage(new ChatComponentText(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.GRAY + msg));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user