This commit is contained in:
brandon committed 2016-07-05 22:15:26 +10:00
1 parent b8372ac245
commit d73596cb82
15 files changed
+93 -87

No files matched your search

+7 -1
View File
@@ -1,5 +1,11 @@
######## 1.0.2h ########
-added config option to disable flight.
-removed some log spam.
-fixed issue which makes it impossible to charge new bows after crafting.
-fixed config option to disable arrow explosion damage.
######## 1.0.2g ########
-fixed server crash
-fixed server crash.
######## 1.0.2f ########
-fixed shield sound effect being too loud.
+2 -2
View File
@@ -1,3 +1,3 @@
Version:1.0.2g
Version:1.0.2h
Snapshot:0
ReleaseNote:Fixed a little server crash
ReleaseNote:Fixed issue with charging bows.
+1 -1
View File
@@ -1,5 +1,5 @@
minecraft_version=1.7.10
mod_version=1.0.2g
mod_version=1.0.2h
forge_version=10.13.4.1614-1.7.10
CCLIB_version=1.1.3.140
NEI_version=1.0.5.120
@@ -83,8 +83,9 @@ public class EntityChaosCrystal extends EntityLivingBase {
int j = MathHelper.floor_double(this.posY);
int k = MathHelper.floor_double(this.posZ);
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire)
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire) {
this.worldObj.setBlock(i, j, k, Blocks.fire);
}
} else if (deathAnimation > 0) deathAnimation -= 0.1F;
@@ -3,6 +3,7 @@ package com.brandon3055.draconicevolution.common.entity;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
import com.brandon3055.draconicevolution.client.render.particle.Particles;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
import cpw.mods.fml.common.network.NetworkRegistry;
@@ -416,7 +417,7 @@ public class EntityCustomArrow extends EntityArrow {
public void onHitAnything() {
if (bowProperties.explosionPower > 0 && !worldObj.isRemote) {
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, true);
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, ConfigHandler.bowBlockDamage);
setDead();
}
if (bowProperties.shockWavePower > 0 && !worldObj.isRemote) {
@@ -1,14 +1,14 @@
package com.brandon3055.draconicevolution.common.handler;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import net.minecraftforge.common.config.Configuration;
public class ConfigHandler {
public static Configuration config;
@@ -47,6 +47,7 @@ public class ConfigHandler {
public static boolean useOldD2DToolTextures;
public static boolean disableGuardianCrystalRespawn;
public static boolean disableLog;
public static boolean enableFlight;
private static String[] itemDislocatorBlacklist;
public static Map<String, Integer> itemDislocatorBlacklistMap = new HashMap<String, Integer>();
@@ -123,6 +124,7 @@ public class ConfigHandler {
disableGuardianCrystalRespawn = config.get(Configuration.CATEGORY_GENERAL, "Disable Guardian Crystal Respawn", false, "(Wuss mode) Setting this to true will disable the chaos guardians ability to respawn healing crystals. Under certain circumstances such as on a Spigot server where entity render distance is significantly lower this may be required.").getBoolean(false);
itemDislocatorBlacklist = config.getStringList("Item Dislocator Blacklist", Configuration.CATEGORY_GENERAL, new String[]{"appliedenergistics2:item.ItemCrystalSeed"}, "A list of items of items that should be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
disableLog = config.get(Configuration.CATEGORY_GENERAL, "Disable Log", false, "If you are having issued with console spam that you cant fix setting this to true will disable all log output from Draconic Evolution (Not recommended)").getBoolean(false);
enableFlight = config.get(Configuration.CATEGORY_GENERAL, "Enable Flight", true, "Set this to false to disable flight given by draconic armor.").getBoolean(true);
//Spawner
@@ -171,8 +171,9 @@ public class MinecraftForgeEventHandler {
}
for (Object o : event.entity.worldObj.playerEntities) {
if (o instanceof EntityPlayer)
if (o instanceof EntityPlayer) {
((EntityPlayer) o).addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("msg.de.dragonDeath.txt")));
}
}
int count = 30 + event.entity.worldObj.rand.nextInt(30);
@@ -1,15 +1,13 @@
package com.brandon3055.draconicevolution.common.items.armor;
import java.util.*;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.integration.ModHelper;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
@@ -26,6 +24,8 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import java.util.*;
/**
* Created by Brandon on 13/11/2014.
*/
@@ -211,54 +211,55 @@ public class CustomArmorHandler {
public static void tickArmorEffects(ArmorSummery summery, EntityPlayer player) {
//region/*----------------- Flight ------------------*/
if (ConfigHandler.enableFlight) {
if (summery != null && summery.flight[0]) {
playersWithFlight.put(player, true);
player.capabilities.allowFlying = true;
if (summery.flight[1]) player.capabilities.isFlying = true;
if (summery != null && summery.flight[0]) {
playersWithFlight.put(player, true);
player.capabilities.allowFlying = true;
if (summery.flight[1]) player.capabilities.isFlying = true;
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
// float percentIncrease = summery.flightVModifier;
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
//LogHelper.info(player.motionY);
player.motionY = 0.225F * summery.flightVModifier;
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
//LogHelper.info(player.motionY);
player.motionY = 0.225F * summery.flightVModifier;
}
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
player.motionY = -0.225F * summery.flightVModifier;
}
}
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
player.motionY = -0.225F * summery.flightVModifier;
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
player.motionX *= 0.5;
player.motionZ *= 0.5;
}
}
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
player.motionX *= 0.5;
player.motionZ *= 0.5;
}
} else {
if (!playersWithFlight.containsKey(player)) {
playersWithFlight.put(player, false);
}
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
playersWithFlight.put(player, false);
if (!player.capabilities.isCreativeMode) {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
player.sendPlayerAbilities();
LogHelper.info("Send Disable");
} else {
if (!playersWithFlight.containsKey(player)) {
playersWithFlight.put(player, false);
}
}
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
playersWithFlight.put(player, false);
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
LogHelper.info("Put Client");
setPlayerFlySpeed(player, 0.05F);
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
playersWithFlight.put(player, false);
if (!player.capabilities.isCreativeMode) {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
player.sendPlayerAbilities();
}
}
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
playersWithFlight.put(player, false);
if (!player.capabilities.isCreativeMode) {
player.capabilities.allowFlying = false;
player.capabilities.isFlying = false;
}
setPlayerFlySpeed(player, 0.05F);
}
}
}
//endregion
@@ -1,8 +1,5 @@
package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
import java.util.ArrayList;
import java.util.List;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
@@ -23,6 +20,9 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Brandon on 8/01/2015.
*/
@@ -149,10 +149,14 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
list.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("info.de.capacitorMode.txt") + ": " + ItemNBTHelper.getString(stack, "ProfileName" + preset, "Profile " + preset));
}
for (ItemConfigField field : getFields(stack, 0))
for (ItemConfigField field : getFields(stack, 0)){
list.add(field.getTooltipInfo());//list.add(field.getLocalizedName() + ": " + field.getFormattedValue());
if (capacity > 0)
}
if (getCapacity(stack) > 0) {
list.add(InfoHelper.ITC() + StatCollector.translateToLocal("info.de.charge.txt") + ": " + InfoHelper.HITC() + Utills.formatNumber(getEnergyStored(stack)) + " / " + Utills.formatNumber(capacity));
}
return list;
}
@@ -1,8 +1,5 @@
package com.brandon3055.draconicevolution.common.items.weapons;
import java.util.ArrayList;
import java.util.List;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
@@ -283,10 +283,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
@Override
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
@@ -299,10 +295,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
@@ -1,8 +1,5 @@
package com.brandon3055.draconicevolution.common.items.weapons;
import java.util.ArrayList;
import java.util.List;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
@@ -281,10 +281,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
@Override
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
@@ -297,10 +293,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
@@ -4,7 +4,7 @@ package com.brandon3055.draconicevolution.common.lib;
* Created by Brandon on 24/02/2015.
*/
public class VersionHandler {
public static final String VERSION = "1.0.2g";
public static final String VERSION = "1.0.2h";
public static final int SNAPSHOT = 0;
@@ -47,7 +47,9 @@ public class ContributorPacket implements IMessage {
ContributorHandler.Contributor contributor1 = ContributorHandler.contributors.get(message.contributor);
if (ctx.side == Side.SERVER) {
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) return null;
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) {
return null;
}
contributor1.contributorWingsEnabled = message.wings;
contributor1.patreonBadgeEnabled = message.badge;
@@ -55,8 +57,9 @@ public class ContributorPacket implements IMessage {
DraconicEvolution.network.sendToAll(message);
} else {
EntityPlayer player = BrandonsCore.proxy.getClientPlayer();
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName()))
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName())) {
return null;
}
contributor1.contributorWingsEnabled = message.wings;
contributor1.patreonBadgeEnabled = message.badge;
@@ -1,8 +1,5 @@
package com.brandon3055.draconicevolution.common.tileentities;
import java.util.List;
import java.util.UUID;
import cofh.api.energy.IEnergyReceiver;
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
@@ -32,6 +29,9 @@ import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.FakePlayerFactory;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
import java.util.UUID;
public class TileGrinder extends TileObjectSync implements ISidedInventory, IEnergyReceiver {
//########### variables #############//
public int meta = -1;
@@ -150,10 +150,11 @@ public class TileGrinder extends TileObjectSync implements ISidedInventory, IEne
@SuppressWarnings("unchecked")
public boolean killNextEntity() {
if (worldObj.isRemote) return false;
//fakePlayer = null;
if (fakePlayer == null) {
fakePlayer = FakePlayerFactory.get((WorldServer) worldObj, new GameProfile(UUID.fromString("5b5689b9-e43d-4282-a42a-dc916f3616b7"), "[Draconic-Evolution]"));
}
if (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword)) {
if (BalanceConfigHandler.grinderShouldUseLooting && (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword))) {
fakePlayer.setCurrentItemOrArmor(0, diamondSword);
}
killBox = AxisAlignedBB.getBoundingBox(centreX - 4.5, centreY - 4.5, centreZ - 4.5, centreX + 4.5, centreY + 4.5, centreZ + 4.5);
@@ -41,13 +41,15 @@ public class UpdateChecker {
if (!thread.getVersion().equals(VersionHandler.VERSION) || (VersionHandler.SNAPSHOT > 0 && thread.getSnapshot() == 0)) {
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.LIGHT_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New version available:"));
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Draconic Evolution v" + thread.getVersion()));
if (!StringUtils.isNullOrEmpty(thread.getNote()))
if (!StringUtils.isNullOrEmpty(thread.getNote())){
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
}
} else if (thread.getSnapshot() > VersionHandler.SNAPSHOT) {
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New snapshot version available:"));
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.BLUE + "Draconic Evolution v" + thread.getVersion() + "-snapshot_" + thread.getSnapshot()));
if (!StringUtils.isNullOrEmpty(thread.getNote()))
if (!StringUtils.isNullOrEmpty(thread.getNote())){
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
}
}
} else if (thread.isFailed()) {