1.7.2 is almost ready!
This commit is contained in:
parent
d5ba110323
commit
fa6ccb83a1
21 changed files with 231 additions and 69 deletions
|
@ -82,14 +82,14 @@ public class AlchemicalWizardryEventHooks
|
|||
// event.setResult(Result.DEFAULT);
|
||||
// }
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerTickEnd(PlayerTickEvent event)
|
||||
{
|
||||
if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
}
|
||||
}
|
||||
// @SubscribeEvent
|
||||
// public void onPlayerTickEnd(PlayerTickEvent event)
|
||||
// {
|
||||
// if(event.type.equals(Type.PLAYER) && event.phase.equals(TickEvent.Phase.END))
|
||||
// {
|
||||
// ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, event.player.capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
// }
|
||||
// }
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityUpdate(LivingUpdateEvent event)
|
||||
|
@ -104,6 +104,11 @@ public class AlchemicalWizardryEventHooks
|
|||
int yPos = (int)(blockVector.yCoord);
|
||||
int zPos = (int)(blockVector.zCoord);
|
||||
|
||||
if(entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer)event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});
|
||||
}
|
||||
|
||||
if (entityLiving instanceof EntityPlayer && entityLiving.worldObj.isRemote)
|
||||
{
|
||||
EntityPlayer entityPlayer = (EntityPlayer) entityLiving;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue