This commit is contained in:
brandon committed 2016-05-01 16:36:51 +10:00
1 parent f2ab4dabb6
commit e078911077
13 files changed
+75 -25

No files matched your search

@@ -59,9 +59,8 @@ public class HudHandler {
int y = (int) (((float)ConfigHandler.hudSettings[1] / 1000F) * (float) height);
GL11.glPushMatrix();
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GuiHelper.drawHoveringText(hudList, x, y, fontRenderer, toolTipFadeOut > 1 ? 1 : toolTipFadeOut, ConfigHandler.hudSettings[4] / 100D, width, height);
GL11.glPopAttrib();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
@@ -79,7 +79,6 @@ public class ParticleHandler
{
if (mc == null || mc.renderViewEntity == null || mc.effectRenderer == null) return false;
double var15 = mc.renderViewEntity.posX - x;
double var17 = mc.renderViewEntity.posY - y;
double var19 = mc.renderViewEntity.posZ - z;
@@ -1,6 +1,5 @@
package com.brandon3055.draconicevolution.common.entity;
import com.brandon3055.brandonscore.common.utills.LogHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
import com.brandon3055.draconicevolution.client.render.particle.Particles;
@@ -405,9 +404,8 @@ public class EntityCustomArrow extends EntityArrow {
@Override
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
{
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
LogHelper.info("collide "+ canBePickedUp);
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.arrow, 1))) {
@@ -5,7 +5,9 @@ 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;
public class ConfigHandler {
@@ -44,6 +46,8 @@ public class ConfigHandler {
public static boolean useOriginal3DArmorModel;
public static boolean useOldD2DToolTextures;
public static boolean disableGuardianCrystalRespawn;
private static String[] itemDislocatorBlacklist;
public static Map<String, Integer> itemDislocatorBlacklistMap = new HashMap<String, Integer>();
//spawner
public static String[] spawnerList;
@@ -115,6 +119,7 @@ public class ConfigHandler {
chaosIslandSeparation = config.get(Configuration.CATEGORY_GENERAL, "Chaos Island Separation", 10000, "This sets how far apart the chaos islands will spawn. The islands spawn in a grid pattern.").getInt(10000);
useOriginal3DArmorModel = config.get(Configuration.CATEGORY_GENERAL, "Use the original 3D armor models", false, "If true the original 3D armor models created by Skeletonpunk will be used instead of the current ones").getBoolean(false);
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");
//Spawner
@@ -137,8 +142,25 @@ public class ConfigHandler {
reactorFuelUsageMultiplier = config.get("Draconic Reactor", "FuelUsageMultiplier", 1, "Use this to adjust how quickly the reactor uses fuel", 0, 1000000).getDouble(1);
reactorOutputMultiplier = config.get("Draconic Reactor", "EnergyOutputMultiplier", 1, "Use this to adjust the output of the reactor", 0, 1000000).getDouble(1);
for (String s : disabledBlocksItems) disabledNamesList.add(s);
for (int i : speedDimBlackList) speedLimitDimList.add(i);
disabledNamesList.clear();
for (String s : disabledBlocksItems) {
disabledNamesList.add(s);
}
speedLimitDimList.clear();
for (int i : speedDimBlackList) {
speedLimitDimList.add(i);
}
itemDislocatorBlacklistMap.clear();
for (String s : itemDislocatorBlacklist){
if (s.contains("|")){
itemDislocatorBlacklistMap.put(s.substring(0, s.indexOf("|")), Integer.parseInt(s.substring(s.indexOf("|")+1)));
}
else{
itemDislocatorBlacklistMap.put(s, -1);
}
}
}
catch (Exception e) {
LogHelper.error("Unable to load Config");
@@ -75,6 +75,10 @@ public class CustomArmorHandler {
}
public static void onPlayerAttacked(LivingAttackEvent event){
if (event.isCanceled()){
return;
}
EntityPlayer player = (EntityPlayer)event.entityLiving;
ArmorSummery summery = new ArmorSummery().getSummery(player);
@@ -127,6 +131,10 @@ public class CustomArmorHandler {
}
public static void onPlayerDeath(LivingDeathEvent event) {
if (event.isCanceled()){
return;
}
EntityPlayer player = (EntityPlayer)event.entityLiving;
ArmorSummery summery = new ArmorSummery().getSummery(player);
@@ -4,6 +4,7 @@ import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.items.ItemDE;
import com.brandon3055.draconicevolution.common.lib.References;
import cpw.mods.fml.relauncher.Side;
@@ -85,7 +86,16 @@ public class Magnet extends ItemDE {
boolean flag = false;
for (EntityItem item : items) {
flag = true;
if (item.getEntityItem() == null) {
continue;
}
String name = Item.itemRegistry.getNameForObject(item.getEntityItem().getItem());
if (ConfigHandler.itemDislocatorBlacklistMap.containsKey(name) && (ConfigHandler.itemDislocatorBlacklistMap.get(name) == -1 || ConfigHandler.itemDislocatorBlacklistMap.get(name) == item.getEntityItem().getItemDamage())) {
continue;
}
flag = true;
if (item.delayBeforeCanPickup > 0) item.delayBeforeCanPickup = 0;
item.motionX = item.motionY = item.motionZ = 0;
item.setPosition(entity.posX-0.2+(world.rand.nextDouble()*0.4), entity.posY-0.6, entity.posZ-0.2+(world.rand.nextDouble()*0.4));
@@ -31,13 +31,11 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
/**Max Extract*/
private int maxExtract = 0;
public RFItemBase(){
this.setMaxStackSize(1);
this.setCreativeTab(DraconicEvolution.tabToolsWeapons);
}
@Override
public boolean hasCustomEntity(ItemStack stack) {
return true;
@@ -56,9 +54,7 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
public void setMaxExtract(int maxExtract){ this.maxExtract = maxExtract;}
public int getCapacity(ItemStack stack){
return capacity;
}
public int getCapacity(ItemStack stack){ return capacity; }
public int getMaxExtract(ItemStack stack){ return maxExtract; }
@@ -66,7 +62,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
@Override
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyReceived = Math.min(getCapacity(container) - energy, Math.min(getMaxReceive(container), maxReceive));
@@ -79,7 +74,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
int energyExtracted = Math.min(energy, Math.min(getMaxExtract(container), maxExtract));
@@ -93,7 +93,7 @@ public class ToolBase extends RFItemBase {
public boolean func_150897_b(Block block)
{
if (getToolClasses(null).contains("pickaxe")) return true;
return blockOverrides.contains(block);
return blockOverrides.contains(block) || blockOverrides.contains(block.getMaterial());
}
@SideOnly(Side.CLIENT)
@@ -5,7 +5,7 @@ package com.brandon3055.draconicevolution.common.lib;
*/
public class VersionHandler
{
public static final String VERSION = "1.0.2b";
public static final String VERSION = "1.0.2c";
public static final int SNAPSHOT = 0;
public static final String MCVERSION = "1.7.10";