OSDN Git Service

(・∀・)
[chemicraft/chemicraft.git] / common / pcc / chemicraft / core / ChemiCraftCore.java
index 3f9044f..9ade64f 100644 (file)
@@ -5,17 +5,14 @@ import java.util.Iterator;
 import java.util.List;
 
 import net.minecraft.block.Block;
-import net.minecraft.client.Minecraft;
 import net.minecraft.creativetab.CreativeTabs;
 import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
 import net.minecraft.entity.player.EntityPlayer;
 import net.minecraft.item.Item;
 import net.minecraft.item.ItemStack;
-import net.minecraft.server.MinecraftServer;
 import net.minecraft.util.EntityDamageSource;
-import net.minecraftforge.client.MinecraftForgeClient;
 import net.minecraftforge.common.Configuration;
-import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.common.Property;
 import pcc.chemicraft.ChemiCraft;
 import pcc.chemicraft.ChemiCraftConfiguration;
@@ -307,8 +304,12 @@ public class ChemiCraftCore extends ChemiCraft{
        public static EntityDamageSource getRadiationDamageSource(Entity par1Entity){
                return new EntityDamageSource("radiation", par1Entity){
                        @Override
-                       public String getDeathMessage(EntityPlayer par1EntityPlayer) {
-                               return par1EntityPlayer.username + " is dead by radiation.";
+                       public String getDeathMessage(EntityLiving par1EntityLiving) {
+                               if (par1EntityLiving instanceof EntityPlayer) {
+                                       return ((EntityPlayer) (par1EntityLiving)).username + " is dead by radiation.";
+                               } else {
+                                       return par1EntityLiving.getEntityName() + " is dead by radiation.";
+                               }
                        }
                };
        }