diff --git a/Change Log.txt b/Change Log.txt index 415b41f5..bc94f602 100644 --- a/Change Log.txt +++ b/Change Log.txt @@ -1,4 +1,12 @@ -######## 1.0.1-Snap Shot(?) ######## +######## 1.0.1-Snapshot(?) ######## +-fixed tesseracts not accepting energy from pylons. +-updated RF API. +-fixed energy pylons not remembering which core they are connected to. +-fixed spawner not working with hostile mobs when chunk loaded. +-added recipes for energy relays and transceivers. +-added tool tip to charging draconium blocks. + +######## 1.0.1-Snapshot(4) ######## -reduced default particle view range to 64 blocks. -fixed up and down arrows in advanced dislocator GUI. -fixed chaos guardian not spawning a portal on servers. @@ -13,9 +21,11 @@ -added Energy Transceiver [WIP] -added Advanced Energy Transceiver [WIP] -added Crystal Wrench [WIP] +-added version checker. +-fixed fake air blocks messing with energy core. -######## 1.0.1-Snap Shot(3) ######## +######## 1.0.1-Snapshot(3) ######## -fixed spawner display mob shaking when disabled. -removed energy cost for Draconic Chest flight. diff --git a/VERSION.json b/VERSION.json index 05510b9c..a78ee916 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1,3 +1,3 @@ Version:1.0.1 -Snapshot:4 -ReleaseNote:This is a release note! +Snapshot:5 +ReleaseNote: diff --git a/build.gradle b/build.gradle index 0ca1a5cc..67d1b720 100644 --- a/build.gradle +++ b/build.gradle @@ -26,12 +26,12 @@ repositories { apply plugin: 'forge' -version = "1.7.10-v1.0.1-snapshot_3" //Version System A.B.CD A=Minecraft version (increments with each new minecraft version) B=Major mod change (Will break saves) C=Release Number (Increments with each public release) D=Bugfix version (a-z) +version = "1.7.10-v1.0.1-snapshot_5" //Version System A.B.CD A=Minecraft version (increments with each new minecraft version) B=Major mod change (Will break saves) C=Release Number (Increments with each public release) D=Bugfix version (a-z) group= "com.brandon3055.draconicevolution" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Draconic-Evolution" minecraft { - version = "1.7.10-10.13.2.1286" + version = "1.7.10-10.13.2.1291" //assetDir = "run/assets" } diff --git a/src/main/java/cofh/api/CoFHAPIProps.java b/src/main/java/cofh/api/CoFHAPIProps.java index be48ec3d..9b528304 100644 --- a/src/main/java/cofh/api/CoFHAPIProps.java +++ b/src/main/java/cofh/api/CoFHAPIProps.java @@ -6,6 +6,6 @@ public class CoFHAPIProps { } - public static final String VERSION = "1.7.10R1.0.0"; + public static final String VERSION = "1.7.10R1.0.2"; } diff --git a/src/main/java/cofh/api/energy/EnergyStorage.java b/src/main/java/cofh/api/energy/EnergyStorage.java new file mode 100644 index 00000000..1674c189 --- /dev/null +++ b/src/main/java/cofh/api/energy/EnergyStorage.java @@ -0,0 +1,158 @@ +package cofh.api.energy; + +import net.minecraft.nbt.NBTTagCompound; + +/** + * Reference implementation of {@link IEnergyStorage}. Use/extend this or implement your own. + * + * @author King Lemming + * + */ +public class EnergyStorage implements IEnergyStorage { + + protected int energy; + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public EnergyStorage(int capacity) { + + this(capacity, capacity, capacity); + } + + public EnergyStorage(int capacity, int maxTransfer) { + + this(capacity, maxTransfer, maxTransfer); + } + + public EnergyStorage(int capacity, int maxReceive, int maxExtract) { + + this.capacity = capacity; + this.maxReceive = maxReceive; + this.maxExtract = maxExtract; + } + + public EnergyStorage readFromNBT(NBTTagCompound nbt) { + + this.energy = nbt.getInteger("Energy"); + + if (energy > capacity) { + energy = capacity; + } + return this; + } + + public NBTTagCompound writeToNBT(NBTTagCompound nbt) { + + if (energy < 0) { + energy = 0; + } + nbt.setInteger("Energy", energy); + return nbt; + } + + public void setCapacity(int capacity) { + + this.capacity = capacity; + + if (energy > capacity) { + energy = capacity; + } + } + + public void setMaxTransfer(int maxTransfer) { + + setMaxReceive(maxTransfer); + setMaxExtract(maxTransfer); + } + + public void setMaxReceive(int maxReceive) { + + this.maxReceive = maxReceive; + } + + public void setMaxExtract(int maxExtract) { + + this.maxExtract = maxExtract; + } + + public int getMaxReceive() { + + return maxReceive; + } + + public int getMaxExtract() { + + return maxExtract; + } + + /** + * This function is included to allow for server -> client sync. Do not call this externally to the containing Tile Entity, as not all IEnergyHandlers + * are guaranteed to have it. + * + * @param energy + */ + public void setEnergyStored(int energy) { + + this.energy = energy; + + if (this.energy > capacity) { + this.energy = capacity; + } else if (this.energy < 0) { + this.energy = 0; + } + } + + /** + * This function is included to allow the containing tile to directly and efficiently modify the energy contained in the EnergyStorage. Do not rely on this + * externally, as not all IEnergyHandlers are guaranteed to have it. + * + * @param energy + */ + public void modifyEnergyStored(int energy) { + + this.energy += energy; + + if (this.energy > capacity) { + this.energy = capacity; + } else if (this.energy < 0) { + this.energy = 0; + } + } + + /* IEnergyStorage */ + @Override + public int receiveEnergy(int maxReceive, boolean simulate) { + + int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive)); + + if (!simulate) { + energy += energyReceived; + } + return energyReceived; + } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) { + + int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract)); + + if (!simulate) { + energy -= energyExtracted; + } + return energyExtracted; + } + + @Override + public int getEnergyStored() { + + return energy; + } + + @Override + public int getMaxEnergyStored() { + + return capacity; + } + +} diff --git a/src/main/java/cofh/api/energy/IEnergyConnection.java b/src/main/java/cofh/api/energy/IEnergyConnection.java index 63faffb9..79bdf77a 100644 --- a/src/main/java/cofh/api/energy/IEnergyConnection.java +++ b/src/main/java/cofh/api/energy/IEnergyConnection.java @@ -5,7 +5,7 @@ import net.minecraftforge.common.util.ForgeDirection; /** * Implement this interface on TileEntities which should connect to energy transportation blocks. This is intended for blocks which generate energy but do not * accept it; otherwise just use IEnergyHandler. - * + *
* Note that {@link IEnergyHandler} is an extension of this. * * @author King Lemming diff --git a/src/main/java/cofh/api/energy/IEnergyContainerItem.java b/src/main/java/cofh/api/energy/IEnergyContainerItem.java index 0bcfda60..c28455b1 100644 --- a/src/main/java/cofh/api/energy/IEnergyContainerItem.java +++ b/src/main/java/cofh/api/energy/IEnergyContainerItem.java @@ -4,7 +4,7 @@ import net.minecraft.item.ItemStack; /** * Implement this interface on Item classes that support external manipulation of their internal energy storages. - * + *
* A reference implementation is provided {@link ItemEnergyContainer}. * * @author King Lemming diff --git a/src/main/java/cofh/api/energy/IEnergyHandler.java b/src/main/java/cofh/api/energy/IEnergyHandler.java index 3df31234..22f2dbc6 100644 --- a/src/main/java/cofh/api/energy/IEnergyHandler.java +++ b/src/main/java/cofh/api/energy/IEnergyHandler.java @@ -4,17 +4,19 @@ import net.minecraftforge.common.util.ForgeDirection; /** * Implement this interface on Tile Entities which should handle energy, generally storing it in one or more internal {@link IEnergyStorage} objects. - * + *
* A reference implementation is provided {@link TileEnergyHandler}. - * + * * @author King Lemming - * + * */ -public interface IEnergyHandler extends IEnergyConnection { +public interface IEnergyHandler extends IEnergyProvider, IEnergyReceiver { + + // merely a convenience interface (remove these methods in 1.8; provided here for back-compat via compiler doing things) /** - * Add energy to an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler. - * + * Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver. + * * @param from * Orientation the energy is received from. * @param maxReceive @@ -23,11 +25,12 @@ public interface IEnergyHandler extends IEnergyConnection { * If TRUE, the charge will only be simulated. * @return Amount of energy that was (or would have been, if simulated) received. */ + @Override int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate); /** - * Remove energy from an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler. - * + * Remove energy from an IEnergyProvider, internal distribution is left entirely to the IEnergyProvider. + * * @param from * Orientation the energy is extracted from. * @param maxExtract @@ -36,16 +39,20 @@ public interface IEnergyHandler extends IEnergyConnection { * If TRUE, the extraction will only be simulated. * @return Amount of energy that was (or would have been, if simulated) extracted. */ + @Override int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate); + /** * Returns the amount of energy currently stored. */ + @Override int getEnergyStored(ForgeDirection from); /** * Returns the maximum amount of energy that can be stored. */ + @Override int getMaxEnergyStored(ForgeDirection from); } diff --git a/src/main/java/cofh/api/energy/IEnergyProvider.java b/src/main/java/cofh/api/energy/IEnergyProvider.java new file mode 100644 index 00000000..05287b35 --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyProvider.java @@ -0,0 +1,38 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Implement this interface on Tile Entities which should provide energy, generally storing it in one or more internal {@link IEnergyStorage} objects. + *
+ * A reference implementation is provided {@link TileEnergyHandler}. + * + * @author King Lemming + * + */ +public interface IEnergyProvider extends IEnergyConnection { + + /** + * Remove energy from an IEnergyProvider, internal distribution is left entirely to the IEnergyProvider. + * + * @param from + * Orientation the energy is extracted from. + * @param maxExtract + * Maximum amount of energy to extract. + * @param simulate + * If TRUE, the extraction will only be simulated. + * @return Amount of energy that was (or would have been, if simulated) extracted. + */ + int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate); + + /** + * Returns the amount of energy currently stored. + */ + int getEnergyStored(ForgeDirection from); + + /** + * Returns the maximum amount of energy that can be stored. + */ + int getMaxEnergyStored(ForgeDirection from); + +} diff --git a/src/main/java/cofh/api/energy/IEnergyReceiver.java b/src/main/java/cofh/api/energy/IEnergyReceiver.java new file mode 100644 index 00000000..c726e09e --- /dev/null +++ b/src/main/java/cofh/api/energy/IEnergyReceiver.java @@ -0,0 +1,38 @@ +package cofh.api.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Implement this interface on Tile Entities which should receive energy, generally storing it in one or more internal {@link IEnergyStorage} objects. + *
+ * A reference implementation is provided {@link TileEnergyHandler}.
+ *
+ * @author King Lemming
+ *
+ */
+public interface IEnergyReceiver extends IEnergyConnection {
+
+ /**
+ * Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
+ *
+ * @param from
+ * Orientation the energy is received from.
+ * @param maxReceive
+ * Maximum amount of energy to receive.
+ * @param simulate
+ * If TRUE, the charge will only be simulated.
+ * @return Amount of energy that was (or would have been, if simulated) received.
+ */
+ int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate);
+
+ /**
+ * Returns the amount of energy currently stored.
+ */
+ int getEnergyStored(ForgeDirection from);
+
+ /**
+ * Returns the maximum amount of energy that can be stored.
+ */
+ int getMaxEnergyStored(ForgeDirection from);
+
+}
diff --git a/src/main/java/cofh/api/energy/IEnergyStorage.java b/src/main/java/cofh/api/energy/IEnergyStorage.java
index 68f4cbc0..bc206560 100644
--- a/src/main/java/cofh/api/energy/IEnergyStorage.java
+++ b/src/main/java/cofh/api/energy/IEnergyStorage.java
@@ -1,9 +1,10 @@
package cofh.api.energy;
/**
- * An energy internalGenBuffer is the unit of interaction with EnergyHelper inventories.
- *
- * A reference implementation can be found at {@link com.brandon3055.draconicevolution.common.utills.EnergyStorage}.
+ * An energy storage is the unit of interaction with Energy inventories.
+ * This is not to be implemented on TileEntities. This is for internal use only.
+ *
+ * A reference implementation can be found at {@link EnergyStorage}.
*
* @author King Lemming
*
@@ -11,24 +12,24 @@ package cofh.api.energy;
public interface IEnergyStorage {
/**
- * Adds energy to the internalGenBuffer. Returns quantity of energy that was accepted.
+ * Adds energy to the storage. Returns quantity of energy that was accepted.
*
* @param maxReceive
* Maximum amount of energy to be inserted.
* @param simulate
* If TRUE, the insertion will only be simulated.
- * @return Amount of energy that was (or would have been, if simulated) accepted by the internalGenBuffer.
+ * @return Amount of energy that was (or would have been, if simulated) accepted by the storage.
*/
int receiveEnergy(int maxReceive, boolean simulate);
/**
- * Removes energy from the internalGenBuffer. Returns quantity of energy that was removed.
+ * Removes energy from the storage. Returns quantity of energy that was removed.
*
* @param maxExtract
* Maximum amount of energy to be extracted.
* @param simulate
* If TRUE, the extraction will only be simulated.
- * @return Amount of energy that was (or would have been, if simulated) extracted from the internalGenBuffer.
+ * @return Amount of energy that was (or would have been, if simulated) extracted from the storage.
*/
int extractEnergy(int maxExtract, boolean simulate);
diff --git a/src/main/java/cofh/api/energy/ItemEnergyContainer.java b/src/main/java/cofh/api/energy/ItemEnergyContainer.java
index 81610e52..055ae45b 100644
--- a/src/main/java/cofh/api/energy/ItemEnergyContainer.java
+++ b/src/main/java/cofh/api/energy/ItemEnergyContainer.java
@@ -66,12 +66,12 @@ public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
if (container.stackTagCompound == null) {
container.stackTagCompound = new NBTTagCompound();
}
- int energy = container.stackTagCompound.getInteger("EnergyHelper");
+ int energy = container.stackTagCompound.getInteger("Energy");
int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive));
if (!simulate) {
energy += energyReceived;
- container.stackTagCompound.setInteger("EnergyHelper", energy);
+ container.stackTagCompound.setInteger("Energy", energy);
}
return energyReceived;
}
@@ -79,15 +79,15 @@ public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
- if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("EnergyHelper")) {
+ if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
- int energy = container.stackTagCompound.getInteger("EnergyHelper");
+ int energy = container.stackTagCompound.getInteger("Energy");
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
if (!simulate) {
energy -= energyExtracted;
- container.stackTagCompound.setInteger("EnergyHelper", energy);
+ container.stackTagCompound.setInteger("Energy", energy);
}
return energyExtracted;
}
@@ -95,10 +95,10 @@ public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
@Override
public int getEnergyStored(ItemStack container) {
- if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("EnergyHelper")) {
+ if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
- return container.stackTagCompound.getInteger("EnergyHelper");
+ return container.stackTagCompound.getInteger("Energy");
}
@Override
diff --git a/src/main/java/cofh/api/energy/TileEnergyHandler.java b/src/main/java/cofh/api/energy/TileEnergyHandler.java
index e14186e8..7cc655e9 100644
--- a/src/main/java/cofh/api/energy/TileEnergyHandler.java
+++ b/src/main/java/cofh/api/energy/TileEnergyHandler.java
@@ -1,15 +1,14 @@
package cofh.api.energy;
-import com.brandon3055.draconicevolution.common.utills.EnergyStorage;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Reference implementation of {@link IEnergyHandler}. Use/extend this or implement your own.
- *
+ *
* @author King Lemming
- *
+ *
*/
public class TileEnergyHandler extends TileEntity implements IEnergyHandler {
@@ -29,25 +28,28 @@ public class TileEnergyHandler extends TileEntity implements IEnergyHandler {
storage.writeToNBT(nbt);
}
- /* IEnergyHandler */
+ /* IEnergyConnection */
@Override
public boolean canConnectEnergy(ForgeDirection from) {
return true;
}
+ /* IEnergyReceiver */
@Override
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
return storage.receiveEnergy(maxReceive, simulate);
}
+ /* IEnergyProvider */
@Override
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) {
return storage.extractEnergy(maxExtract, simulate);
}
+ /* IEnergyReceiver and IEnergyProvider */
@Override
public int getEnergyStored(ForgeDirection from) {
diff --git a/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java b/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java
index c050b456..fa985eb5 100644
--- a/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java
+++ b/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java
@@ -19,12 +19,14 @@ import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.entity.EntityCustomDragon;
import com.brandon3055.draconicevolution.common.entity.EntityDragonHeart;
+import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.*;
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyRelay;
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyTransceiver;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyPylon;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
+import com.brandon3055.draconicevolution.common.utills.UpdateChecker;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
@@ -104,6 +106,7 @@ public class ClientProxy extends CommonProxy {
super.init(event);
FMLCommonHandler.instance().bus().register(new KeyInputHandler());
FMLCommonHandler.instance().bus().register(new ClientEventHandler());
+ if (ConfigHandler.enableVersionChecker) FMLCommonHandler.instance().bus().register(new UpdateChecker());
MinecraftForge.EVENT_BUS.register(new HudHandler());
MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
KeyBindings.init();
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/itemblocks/DraconiumItemBlock.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/itemblocks/DraconiumItemBlock.java
index 75bc0719..f53378ab 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/itemblocks/DraconiumItemBlock.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/itemblocks/DraconiumItemBlock.java
@@ -1,9 +1,12 @@
package com.brandon3055.draconicevolution.common.blocks.itemblocks;
import cofh.api.energy.IEnergyContainerItem;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
@@ -57,7 +60,10 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
energy += energyReceived;
container.stackTagCompound.setInteger("Energy", energy);
}
- if (getEnergyStored(container) == getMaxEnergyStored(container)) container.setItemDamage(2);
+ if (getEnergyStored(container) == getMaxEnergyStored(container)) {
+ container.setItemDamage(2);
+ container.setTagCompound(null);
+ }
return energyReceived;
}
@@ -84,4 +90,11 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
if (stack.getItemDamage() == 0 && getEnergyStored(stack) == getMaxEnergyStored(stack)) stack.setItemDamage(2);
super.onUpdate(stack, p_77663_2_, p_77663_3_, p_77663_4_, p_77663_5_);
}
+
+ @SideOnly(Side.CLIENT)
+ @SuppressWarnings("unchecked")
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
+ if (stack.hasTagCompound()) list.add(getEnergyStored(stack) + " / " + getMaxEnergyStored(stack) + "RF");
+ }
}
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityCustomDragon.java b/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityCustomDragon.java
index 2216f98b..1df10b37 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityCustomDragon.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityCustomDragon.java
@@ -37,10 +37,10 @@ public class EntityCustomDragon extends EntityDragon {
public float attackDamage = 10F;
protected boolean isUber = false;
private boolean needsRenderUpdate = true;
+ private boolean initialized = false;
public EntityCustomDragon(World par1World) {
super(par1World);
- this.addPotionEffect(new PotionEffect(10, 600, 10, false));
}
public EntityCustomDragon(World world, double health, float attack){
@@ -48,13 +48,12 @@ public class EntityCustomDragon extends EntityDragon {
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(health);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(health);
this.attackDamage = attack;
- this.addPotionEffect(new PotionEffect(10, 600, 10, false));
}
@Override
protected void entityInit() {
super.entityInit();
- this.dataWatcher.addObject(12, Byte.valueOf((isUber ? (byte)1 : (byte)0)));
+ this.dataWatcher.addObject(12, (isUber ? (byte)1 : (byte)0));
}
@Override
@@ -72,6 +71,12 @@ public class EntityCustomDragon extends EntityDragon {
public void onLivingUpdate() {
float f;
float f1;
+
+ if (!initialized){
+ this.addPotionEffect(new PotionEffect(10, 600, 10, false));
+ initialized = true;
+ }
+
if (this.worldObj.isRemote) {
f = MathHelper.cos(this.animTime * (float) Math.PI * 2.0F);
f1 = MathHelper.cos(this.prevAnimTime * (float) Math.PI * 2.0F);
@@ -597,6 +602,7 @@ public class EntityCustomDragon extends EntityDragon {
super.writeToNBT(compound);
compound.setFloat("AttackDamage", attackDamage);
compound.setBoolean("IsUber", isUber);
+ compound.setBoolean("Initialized", initialized);
compound.setInteger("PortalX", portalX);
compound.setInteger("PortalY", portalY);
compound.setInteger("PortalZ", portalZ);
@@ -607,6 +613,7 @@ public class EntityCustomDragon extends EntityDragon {
super.readFromNBT(compound);
attackDamage = compound.getFloat("AttackDamage");
isUber = compound.getBoolean("IsUber");
+ initialized = compound.getBoolean("Initialized");
this.dataWatcher.updateObject(12, isUber ? (byte)1: (byte)0);
portalX = compound.getInteger("PortalX");
portalY = compound.getInteger("PortalY");
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/entity/ExtendedPlayer.java b/src/main/java/com/brandon3055/draconicevolution/common/entity/ExtendedPlayer.java
index d7b694a0..564ade7b 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/entity/ExtendedPlayer.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/entity/ExtendedPlayer.java
@@ -58,9 +58,6 @@ public class ExtendedPlayer implements IExtendedEntityProperties {
return spawnCount;
}
- /**
- * Simple method sets current mana to max mana
- */
public void setSpawnCount(int count) {
spawnCount = count;
}
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java
index 0c457eb5..814e1a7d 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java
@@ -29,6 +29,7 @@ public class ConfigHandler {
public static boolean disableOreSpawnOverworld;
public static boolean disableOreSpawnNether;
public static boolean enableHudDisplay;
+ public static boolean enableVersionChecker;
//spawner
public static String[] spawnerList;
@@ -81,6 +82,7 @@ public class ConfigHandler {
disableOreSpawnNether = config.get(Configuration.CATEGORY_GENERAL, "Disable Ore Spawn (Nether)", false, "Set to true to prevent draconium ore from spawning in the nether").getBoolean(false);
disableOreSpawnOverworld = config.get(Configuration.CATEGORY_GENERAL, "Disable Ore Spawn (Overworld)", false, "Set to true to prevent draconium ore from spawning in the overworld").getBoolean(false);
enableHudDisplay = config.get(Configuration.CATEGORY_GENERAL, "Enable HUD info", true, "Set to false to disable the HUD info for tools and blocks").getBoolean(true);
+ enableVersionChecker = config.get(Configuration.CATEGORY_GENERAL, "Enable version checker", true, "Set to false to disable the version checker").getBoolean(true);
//Spawner
spawnerListType = config.get("spawner", "listType", false, "Sets weather the spawner list is a white list or a black list (true = white list false = black list)").getBoolean(false);
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java
index 897ab6ca..ad096db2 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java
@@ -93,14 +93,19 @@ public class CraftingHandler {
addOre(ModBlocks.playerDetector, "ITI", "CEC", "IDI", 'I', "ingotIron", 'E', Items.ender_eye, 'T', Blocks.redstone_torch, 'C', Items.comparator, 'D', ModItems.draconicCore);
addOre(new ItemStack(ModBlocks.generator, 1, 3), "NIN", "IFI", "NCN", 'N', Items.netherbrick, 'I', "ingotIron", 'F', Blocks.furnace, 'C', ModItems.draconicCore);
addOre(ModBlocks.dissEnchanter, "PIP", "ETE", "CBC", 'P', Items.ender_eye, 'I', Items.enchanted_book, 'E', "gemEmerald", 'T', Blocks.enchanting_table, 'C', ModItems.draconicCore, 'B', Items.book);
-
+ addOre(new ItemStack(ModBlocks.energyCrystal, 4, 0), "IDI", "DCD", "IDI", 'I' , ModItems.draconiumIngot, 'D', "gemDiamond", 'C', ModItems.draconicCore);
+ addOre(new ItemStack(ModBlocks.energyCrystal, 4, 1), "CRC", "RWR", "CRC", 'R' , new ItemStack(ModBlocks.energyCrystal, 1), 'W', ModItems.wyvernCore, 'C', ModItems.draconicCore);
+ addShaplessOre(new ItemStack(ModBlocks.energyCrystal, 1, 0), new ItemStack(ModBlocks.energyCrystal, 1, 2), new ItemStack(ModBlocks.energyCrystal, 1, 2));
+ addShaplessOre(new ItemStack(ModBlocks.energyCrystal, 2, 2), new ItemStack(ModBlocks.energyCrystal, 1, 0));
+ addShaplessOre(new ItemStack(ModBlocks.energyCrystal, 1, 1), new ItemStack(ModBlocks.energyCrystal, 1, 3), new ItemStack(ModBlocks.energyCrystal, 1, 3));
+ addShaplessOre(new ItemStack(ModBlocks.energyCrystal, 2, 3), new ItemStack(ModBlocks.energyCrystal, 1, 1));
//Tools
add(ModItems.teleporterMKII, "IEI", "ETE", "IWI", 'I', ModItems.draconiumIngot, 'E', Items.ender_pearl, 'T', ModItems.teleporterMKI, 'W', ModItems.wyvernCore);
add(ModItems.teleporterMKI, "CSC", "SMS", "CSC", 'C', Items.blaze_powder, 'S', ModItems.draconiumDust, 'M', Items.ender_eye);
addOre(new ItemStack(ModItems.safetyMatch, 1, 1000), " O ", " S ", " ", 'O', "dyeOrange", 'S', "stickWood");
add(ModItems.safetyMatch, "MMM", "MMM", "MMM", 'M', new ItemStack(ModItems.safetyMatch, 1, 1000));
-
+ addOre(ModItems.wrench, " ID", " RI", "C ", 'I' , ModItems.draconiumIngot, 'D', "gemDiamond", 'R', Items.blaze_rod, 'C', ModItems.draconicCore);
//Other
addOre(ModItems.infoTablet, "SSS", "SDS", "SSS", 'S', "stone", 'D', ModItems.draconiumDust);
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java
index d5e69844..7c7dfe1d 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java
@@ -6,7 +6,6 @@ import com.brandon3055.draconicevolution.common.items.ItemDE;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayItem;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
-import com.brandon3055.draconicevolution.common.utills.UpdateChecker;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
@@ -40,7 +39,8 @@ public class Wrench extends ItemDE implements IHudDisplayItem{
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
- new UpdateChecker();
+ //if (world.isRemote)FMLCommonHandler.instance().bus().register(new UpdateChecker());
+ //player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.BLUE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New version available:"));
if (player.isSneaking()) cycleMode(stack, world, player);
else if (ItemNBTHelper.getCompound(stack).hasKey("LinkData") && ItemNBTHelper.getCompound(stack).getCompoundTag("LinkData").getBoolean("Bound")) ItemNBTHelper.getCompound(stack).getCompoundTag("LinkData").setBoolean("Bound", false);
diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java
index 9a4a7894..bb13c252 100644
--- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java
+++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java
@@ -4,7 +4,6 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.DataUtills;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
-import com.brandon3055.draconicevolution.common.utills.LogHelper;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.item.EntityItem;
@@ -68,7 +67,6 @@ public abstract class MiningTool extends ToolBase {//todo add custom information
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
ToolHandler.updateGhostBlocks(player, world);
- LogHelper.info(getDisplayData(stack));
if (player.isSneaking())
{
List