Keys are invincible.
This commit is contained in:
parent
0373d17600
commit
7f945e9ed2
|
@ -14,6 +14,7 @@ import com.legacy.aether.world.AetherData;
|
|||
import com.legacy.aether.world.AetherWorldProvider;
|
||||
import com.legacy.aether.world.TeleporterAether;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
|
@ -343,6 +344,19 @@ AetherEventHandler {
|
|||
AetherNetwork.sendToAll(new PacketSendShouldCycle(providerAether.getShouldCycleCatchup()));
|
||||
}
|
||||
}
|
||||
|
||||
for (Object entity : event.world.loadedEntityList)
|
||||
{
|
||||
if (entity instanceof EntityItem)
|
||||
{
|
||||
EntityItem entityItem = (EntityItem) entity;
|
||||
|
||||
if (entityItem.getEntityItem().getItem() == ItemsAether.dungeon_key)
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(Entity.class, entityItem, true, "invulnerable", "field_83001_bt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
Loading…
Reference in a new issue