Fixed step height issues with PotionBoost. Fixed some formatting errors. Set the path blocks' max path lengths.
This commit is contained in:
parent
1ed4926d31
commit
4e054224ac
6 changed files with 30 additions and 8 deletions
|
@ -22,6 +22,7 @@ import net.minecraftforge.common.MinecraftForge;
|
|||
import net.minecraftforge.event.AnvilUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHealEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
|
@ -32,6 +33,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
|||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
|
@ -76,6 +78,22 @@ public class EventHandler
|
|||
{
|
||||
Random random = new Random();
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onEntityUpdate(LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if (event.entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||
if (event.entityLiving.isPotionActive(ModPotions.boost))
|
||||
{
|
||||
entityPlayer.stepHeight = 1.0f;
|
||||
} else
|
||||
{
|
||||
entityPlayer.stepHeight = 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityHurt(LivingHurtEvent event)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue