Added Hunger Restoration on Limbo Respawn
Added code to EventHookContainer.revivePlayerInLimbo() so that the player's food level is restored upon respawning in Limbo. Apparently it was possible for players to have death loops from starving to death in Hardcore Limbo.
This commit is contained in:
parent
42568a1864
commit
e3665c09dd
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class EventHookContainer
|
||||
{
|
||||
private static final int MAX_FOOD_LEVEL = 20;
|
||||
|
||||
private final DDProperties properties;
|
||||
|
||||
public EventHookContainer(DDProperties properties)
|
||||
|
@ -175,6 +177,7 @@ public class EventHookContainer
|
|||
player.extinguish();
|
||||
player.clearActivePotions();
|
||||
player.setHealth(player.getMaxHealth());
|
||||
player.getFoodStats().addStats(MAX_FOOD_LEVEL, 0);
|
||||
Point4D destination = LimboProvider.getLimboSkySpawn(player, properties);
|
||||
DDTeleporter.teleportEntity(player, destination, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue