Pushed a beta release

This commit is contained in:
WayofTime 2014-12-11 20:08:24 -05:00
parent b30d6de13c
commit f08363b74a
9 changed files with 123 additions and 29 deletions

View file

@ -25,6 +25,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraftforge.client.event.FOVUpdateEvent;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
@ -239,11 +240,11 @@ public class AlchemicalWizardryEventHooks
}
}
// @ForgeSubscribe
// public void onFOVUpdate(FOVUpdateEvent event)
// {
// event.setResult(Result.DEFAULT);
// }
@SubscribeEvent
public void onFOVUpdate(FOVUpdateEvent event)
{
event.setResult(Result.DENY);
}
// @SubscribeEvent
// public void onPlayerTickEnd(PlayerTickEvent event)
@ -269,15 +270,12 @@ public class AlchemicalWizardryEventHooks
if (entityLiving instanceof EntityPlayer)
{
if(!entityLiving.worldObj.isRemote)
{
// APISpellHelper.setPlayerLPTag((EntityPlayer)entityLiving, SoulNetworkHandler.getCurrentEssence(SoulNetworkHandler.getUsername((EntityPlayer)entityLiving)));
// ((EntityPlayer) entityLiving).sendPlayerAbilities();
if(!entityLiving.worldObj.isRemote && entityLiving.worldObj.getTotalWorldTime() % 20 == 0)
{
if(entityLiving instanceof EntityPlayerMP)
{
// System.out.println("Sending Packet");
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getLPPacket(SoulNetworkHandler.getCurrentEssence(SoulNetworkHandler.getUsername((EntityPlayer)entityLiving)), 1000), (EntityPlayerMP)entityLiving);
String ownerName = SoulNetworkHandler.getUsername((EntityPlayer)entityLiving);
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getLPPacket(SoulNetworkHandler.getCurrentEssence(ownerName), SoulNetworkHandler.getMaximumForOrbTier(SoulNetworkHandler.getCurrentMaxOrb(ownerName))), (EntityPlayerMP)entityLiving);
}
}
ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, ((EntityPlayer) event.entityLiving).capabilities, Float.valueOf(0.1f), new String[]{"walkSpeed", "g", "field_75097_g"});

View file

@ -263,8 +263,8 @@ public enum NewPacketHandler
{
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
System.out.println("" + msg.currentLP + ", " + msg.maxLP);
APISpellHelper.setPlayerLPTag(player, msg.currentLP);
APISpellHelper.setPlayerMaxLPTag(player, msg.maxLP);
}
}

View file

@ -75,6 +75,11 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
{
return par1ItemStack;
}
if(itemTag.getString("ownerName").equals(SpellHelper.getUsername(par3EntityPlayer)))
{
SoulNetworkHandler.setMaxOrbToMax(itemTag.getString("ownerName"), this.orbLevel);
}
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence());
EnergyItems.hurtPlayer(par3EntityPlayer, 200);