Pushed a beta release
This commit is contained in:
parent
b30d6de13c
commit
f08363b74a
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
#Wed Dec 10 11:02:48 EST 2014
|
||||
#Thu Dec 11 19:56:39 EST 2014
|
||||
mod_name=BloodMagic
|
||||
forge_version=10.13.2.1232
|
||||
ccc_version=1.0.4.29
|
||||
|
@ -8,5 +8,5 @@ nei_version=1.0.3.64
|
|||
package_group=com.wayoftime.bloodmagic
|
||||
mod_version=1.3.0Beta
|
||||
minetweaker_version=Dev-1.7.10-3.0.9B
|
||||
build_number=5
|
||||
mc_version=1.7.10
|
||||
build_number=4
|
||||
|
|
|
@ -137,14 +137,14 @@ public class BloodMagicConfiguration
|
|||
AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false);
|
||||
|
||||
String tempDemonConfigs = "Temp Demon Configs [2]";
|
||||
// TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
||||
// TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
||||
// TEDemonPortal.demonHoardDelay = config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt();
|
||||
// TEDemonPortal.demonRoadChance = (float)(config.get(tempDemonConfigs, "Demon Road Chance", 0.3f).getDouble());
|
||||
// TEDemonPortal.demonHouseChance = (float)(config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble());
|
||||
// TEDemonPortal.demonPortalChance = (float)(config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble());
|
||||
// TEDemonPortal.demonHoardChance = (float)(config.get(tempDemonConfigs, "Demon Hoard Chance", 0.8f).getDouble());
|
||||
// TEDemonPortal.portalTickRate = (float)(config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble());
|
||||
TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
||||
TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
||||
TEDemonPortal.demonHoardDelay = config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt();
|
||||
TEDemonPortal.demonRoadChance = (float)(config.get(tempDemonConfigs, "Demon Road Chance", 0.3f).getDouble());
|
||||
TEDemonPortal.demonHouseChance = (float)(config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble());
|
||||
TEDemonPortal.demonPortalChance = (float)(config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble());
|
||||
TEDemonPortal.demonHoardChance = (float)(config.get(tempDemonConfigs, "Demon Hoard Chance", 0.8f).getDouble());
|
||||
TEDemonPortal.portalTickRate = (float)(config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble());
|
||||
|
||||
DemonVillagePath.canGoDown = config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean();
|
||||
DemonVillagePath.tunnelIfObstructed = config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean();
|
||||
|
@ -158,6 +158,8 @@ public class BloodMagicConfiguration
|
|||
{
|
||||
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
||||
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
||||
RenderHelper.lpBarX = config.get("ClientSettings", "LPHUDxOffset", 12).getInt();
|
||||
RenderHelper.lpBarY = config.get("ClientSettings", "LPHUDyOffset", 75).getInt();
|
||||
}
|
||||
|
||||
config.save();
|
||||
|
|
|
@ -5,22 +5,26 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
public class LifeEssenceNetwork extends net.minecraft.world.WorldSavedData
|
||||
{
|
||||
public int currentEssence;
|
||||
public int maxOrb;
|
||||
|
||||
public LifeEssenceNetwork(String par1Str)
|
||||
{
|
||||
super(par1Str);
|
||||
currentEssence = 0;
|
||||
maxOrb = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound)
|
||||
{
|
||||
currentEssence = nbttagcompound.getInteger("currentEssence");
|
||||
maxOrb = nbttagcompound.getInteger("maxOrb");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound)
|
||||
{
|
||||
nbttagcompound.setInteger("currentEssence", currentEssence);
|
||||
nbttagcompound.setInteger("maxOrb", maxOrb);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,66 @@ public class SoulNetworkHandler
|
|||
|
||||
return syphonFromNetwork(event.ownerNetwork, event.drainAmount) >= damageToBeDone;
|
||||
}
|
||||
|
||||
public static int getCurrentMaxOrb(String ownerName)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
return data.maxOrb;
|
||||
}
|
||||
|
||||
public static void setMaxOrbToMax(String ownerName, int maxOrb)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
data = new LifeEssenceNetwork(ownerName);
|
||||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
data.maxOrb = Math.max(maxOrb, data.maxOrb);
|
||||
data.markDirty();
|
||||
}
|
||||
|
||||
public static int getMaximumForOrbTier(int maxOrb)
|
||||
{
|
||||
switch(maxOrb)
|
||||
{
|
||||
case 1:
|
||||
return 5000;
|
||||
case 2:
|
||||
return 25000;
|
||||
case 3:
|
||||
return 150000;
|
||||
case 4:
|
||||
return 1000000;
|
||||
case 5:
|
||||
return 10000000;
|
||||
case 6:
|
||||
return 30000000;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(ItemStack ist, int damageToBeDone)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,23 @@ public class APISpellHelper
|
|||
data.setInteger("BM:StoredLP", amount);
|
||||
}
|
||||
|
||||
public static int getPlayerMaxLPTag(EntityPlayer player)
|
||||
{
|
||||
NBTTagCompound data = player.getEntityData();
|
||||
if(data.hasKey("BM:MaxStoredLP"))
|
||||
{
|
||||
return data.getInteger("BM:MaxStoredLP");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void setPlayerMaxLPTag(EntityPlayer player, int amount)
|
||||
{
|
||||
NBTTagCompound data = player.getEntityData();
|
||||
data.setInteger("BM:MaxStoredLP", amount);
|
||||
}
|
||||
|
||||
public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range)
|
||||
{
|
||||
float f = 1.0F;
|
||||
|
|
|
@ -33,6 +33,9 @@ public class RenderHelper
|
|||
public static boolean enabled = true;
|
||||
public static boolean showInChat = true;
|
||||
|
||||
public static int lpBarX = 12;
|
||||
public static int lpBarY = 75;
|
||||
|
||||
public static int zLevel = 0;
|
||||
|
||||
private static int xOffsetDefault = +50;
|
||||
|
@ -72,10 +75,15 @@ public class RenderHelper
|
|||
|
||||
if(reagentStack != null && reagentStack.amount > 0)
|
||||
{
|
||||
renderTestHUD(mc, reagentStack, maxAmount);
|
||||
// renderTestHUD(mc, reagentStack, maxAmount);
|
||||
}
|
||||
|
||||
renderLPHUD(mc, APISpellHelper.getPlayerLPTag(player), 10000000);
|
||||
int max = APISpellHelper.getPlayerMaxLPTag(player);
|
||||
|
||||
if(max > 1)
|
||||
{
|
||||
renderLPHUD(mc, APISpellHelper.getPlayerLPTag(player), max);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -87,10 +95,10 @@ public class RenderHelper
|
|||
int xSize = 32;
|
||||
int ySize = 32;
|
||||
|
||||
int amount = (int) (256 * ((double)(maxAmount - lpAmount) / maxAmount));
|
||||
int amount = Math.max((int) (256 * ((double)(maxAmount - lpAmount) / maxAmount)), 0);
|
||||
|
||||
int x = (16 + 32 - xSize) / 2 * 8;
|
||||
int y = (150 - ySize) / 2 * 8;
|
||||
int x = (lpBarX - xSize / 2) * 8;
|
||||
int y = (lpBarY - ySize / 2) * 8;
|
||||
|
||||
ResourceLocation test2 = new ResourceLocation("alchemicalwizardry", "textures/gui/container1.png");
|
||||
GL11.glColor4f(1, 0, 0, 1.0F);
|
||||
|
@ -211,7 +219,7 @@ public class RenderHelper
|
|||
int xSize = 32;
|
||||
int ySize = 32;
|
||||
|
||||
int amount = 256 * (maxAmount - reagentStack.amount) / maxAmount;
|
||||
int amount = Math.max((int) (256 * ((double)(maxAmount - reagentStack.amount) / maxAmount)), 0);
|
||||
|
||||
int x = (16 - xSize) / 2 * 8;
|
||||
int y = (150 - ySize) / 2 * 8;
|
||||
|
|
|
@ -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"});
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue