Just another commit

This commit is contained in:
brandon3055 committed 2015-06-24 18:05:50 +10:00
1 parent 96be94c7b4
commit baaea7d9e0
138 files changed
+3587 -2448

No files matched your search

+12 -2
View File
@@ -1,8 +1,18 @@
######## 1.0.2 ########
-stabilized spawner's will now keep their original mob type when created.
-mobs spawned by stabilized spawner are now allowed to despawn after 30 seconds.
-increased the length and render distance of the particle generator beam.
-shortened the teleport sound.
-added Draconium Infused Obsidian
-added Draconic Portal
-removed old debug code from bow
-fixed energy crystal name localisation in hud
######## 1.0.1-Bugfix-c ########
-fixed crash when arrow from DE bow hits RFTools force field
-fixed crash when arrow from DE bow hits RFTools force field.
######## 1.0.1-Bugfix-b ########
-fixed a problem in the config gui that came from a change in bugfix a
-fixed a problem in the config gui that came from a change in bugfix a.
######## 1.0.1-Bugfix-a ########
-fixed heart dupe bug.
+1 -1
View File
@@ -52,7 +52,7 @@ dependencies {
compile "codechicken:CodeChickenCore:${config.minecraft_version}-${config.ccc_version}:dev"
compile "codechicken:NotEnoughItems:${config.minecraft_version}-${config.NEI_version}:dev"
if (file('../BrandonsLib/').exists()) compile project('../BrandonsLib')
if (file('../BrandonsCore/').exists()) compile project('../BrandonsCore')
}
processResources
+1 -1
View File
@@ -1,5 +1,5 @@
minecraft_version=1.7.10
mod_version=1.0.1c
mod_version=1.0.1d_privateServerFix
forge_version=10.13.3.1403-1.7.10
CCLIB_version=1.1.1.99
NEI_version=1.0.3.74
+1 -1
View File
@@ -1 +1 @@
if(file('../BrandonsLib/').exists()) { include '../BrandonsLib' }
if(file('../BrandonsCore/').exists()) { include '../BrandonsCore' }
-11
View File
@@ -1,11 +0,0 @@
package cofh.api;
public class CoFHAPIProps {
private CoFHAPIProps() {
}
public static final String VERSION = "1.7.10R1.0.2";
}
@@ -1,158 +0,0 @@
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 -&gt; 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;
}
}
@@ -1,21 +0,0 @@
package cofh.api.energy;
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.
* <p>
* Note that {@link IEnergyHandler} is an extension of this.
*
* @author King Lemming
*
*/
public interface IEnergyConnection {
/**
* Returns TRUE if the TileEntity can connect on a given side.
*/
boolean canConnectEnergy(ForgeDirection from);
}
@@ -1,52 +0,0 @@
package cofh.api.energy;
import net.minecraft.item.ItemStack;
/**
* Implement this interface on Item classes that support external manipulation of their internal energy storages.
* <p>
* A reference implementation is provided {@link ItemEnergyContainer}.
*
* @author King Lemming
*
*/
public interface IEnergyContainerItem {
/**
* Adds energy to a container item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged.
*
* @param container
* ItemStack to be charged.
* @param maxReceive
* Maximum amount of energy to be sent into the item.
* @param simulate
* If TRUE, the charge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) received by the item.
*/
int receiveEnergy(ItemStack container, int maxReceive, boolean simulate);
/**
* Removes energy from a container item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally
* discharged.
*
* @param container
* ItemStack to be discharged.
* @param maxExtract
* Maximum amount of energy to be extracted from the item.
* @param simulate
* If TRUE, the discharge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) extracted from the item.
*/
int extractEnergy(ItemStack container, int maxExtract, boolean simulate);
/**
* Get the amount of energy currently stored in the container item.
*/
int getEnergyStored(ItemStack container);
/**
* Get the max amount of energy that can be stored in the container item.
*/
int getMaxEnergyStored(ItemStack container);
}
@@ -1,58 +0,0 @@
package cofh.api.energy;
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.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
*
* @author King Lemming
*
*/
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 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.
*/
@Override
int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate);
/**
* 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.
*/
@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);
}
@@ -1,38 +0,0 @@
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.
* <p>
* 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);
}
@@ -1,38 +0,0 @@
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.
* <p>
* 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);
}
@@ -1,46 +0,0 @@
package cofh.api.energy;
/**
* An energy storage is the unit of interaction with Energy inventories.<br>
* This is not to be implemented on TileEntities. This is for internal use only.
* <p>
* A reference implementation can be found at {@link EnergyStorage}.
*
* @author King Lemming
*
*/
public interface IEnergyStorage {
/**
* 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 storage.
*/
int receiveEnergy(int maxReceive, boolean simulate);
/**
* 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 storage.
*/
int extractEnergy(int maxExtract, boolean simulate);
/**
* Returns the amount of energy currently stored.
*/
int getEnergyStored();
/**
* Returns the maximum amount of energy that can be stored.
*/
int getMaxEnergyStored();
}
@@ -1,110 +0,0 @@
package cofh.api.energy;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/**
* Reference implementation of {@link IEnergyContainerItem}. Use/extend this or implement your own.
*
* @author King Lemming
*
*/
public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
protected int capacity;
protected int maxReceive;
protected int maxExtract;
public ItemEnergyContainer() {
}
public ItemEnergyContainer(int capacity) {
this(capacity, capacity, capacity);
}
public ItemEnergyContainer(int capacity, int maxTransfer) {
this(capacity, maxTransfer, maxTransfer);
}
public ItemEnergyContainer(int capacity, int maxReceive, int maxExtract) {
this.capacity = capacity;
this.maxReceive = maxReceive;
this.maxExtract = maxExtract;
}
public ItemEnergyContainer setCapacity(int capacity) {
this.capacity = capacity;
return this;
}
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;
}
/* IEnergyContainerItem */
@Override
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
if (container.stackTagCompound == null) {
container.stackTagCompound = new NBTTagCompound();
}
int energy = container.stackTagCompound.getInteger("Energy");
int energyReceived = Math.min(capacity - energy, Math.min(this.maxReceive, maxReceive));
if (!simulate) {
energy += energyReceived;
container.stackTagCompound.setInteger("Energy", energy);
}
return energyReceived;
}
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
int energy = container.stackTagCompound.getInteger("Energy");
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
if (!simulate) {
energy -= energyExtracted;
container.stackTagCompound.setInteger("Energy", energy);
}
return energyExtracted;
}
@Override
public int getEnergyStored(ItemStack container) {
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
return 0;
}
return container.stackTagCompound.getInteger("Energy");
}
@Override
public int getMaxEnergyStored(ItemStack container) {
return capacity;
}
}
@@ -1,65 +0,0 @@
package cofh.api.energy;
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 {
protected EnergyStorage storage = new EnergyStorage(32000);
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
storage.readFromNBT(nbt);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
storage.writeToNBT(nbt);
}
/* 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) {
return storage.getEnergyStored();
}
@Override
public int getMaxEnergyStored(ForgeDirection from) {
return storage.getMaxEnergyStored();
}
}
@@ -1,10 +0,0 @@
/**
* (C) 2014 Team CoFH / CoFH / Cult of the Full Hub
* http://www.teamcofh.com
*/
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|energy")
package cofh.api.energy;
import cofh.api.CoFHAPIProps;
import cpw.mods.fml.common.API;
-9
View File
@@ -1,9 +0,0 @@
/**
* (C) 2014 Team CoFH / CoFH / Cult of the Full Hub
* http://www.teamcofh.com
*/
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHLib", provides = "CoFHAPI")
package cofh.api;
import cpw.mods.fml.common.API;
@@ -17,7 +17,11 @@ import net.minecraft.enchantment.Enchantment;
import java.util.Arrays;
@Mod(modid = References.MODID, name = References.MODNAME, version = References.VERSION, canBeDeactivated = false, guiFactory = References.GUIFACTORY, dependencies = "after:NotEnoughItems;after:NotEnoughItems;after:ThermalExpansion;after:ThermalFoundation;")
@Mod(modid = References.MODID, name = References.MODNAME, version = References.VERSION, canBeDeactivated = false, guiFactory = References.GUIFACTORY, dependencies = "after:NotEnoughItems;" +
"after:NotEnoughItems;" +
"after:ThermalExpansion;" +
"after:ThermalFoundation;" +
"required-after:BrandonsCore@[1.0.0.1,);")
public class DraconicEvolution {
@Mod.Instance(References.MODID)
@@ -28,6 +28,7 @@ import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnerg
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileWirelessEnergyTransceiver;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyPylon;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileReactorCore;
import com.brandon3055.draconicevolution.common.utills.UpdateChecker;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
@@ -138,6 +139,7 @@ public class ClientProxy extends CommonProxy {
//ISimpleBlockRendering
RenderingRegistry.registerBlockHandler(new RenderTeleporterStand());
RenderingRegistry.registerBlockHandler(new RenderPortal());
//TileEntitySpecialRenderers
ClientRegistry.bindTileEntitySpecialRenderer(TileParticleGenerator.class, new RenderTileParticleGen());
@@ -153,6 +155,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEnergyRelay.class, new RenderTileCrystal());
ClientRegistry.bindTileEntitySpecialRenderer(TileEnergyTransceiver.class, new RenderTileCrystal());
ClientRegistry.bindTileEntitySpecialRenderer(TileWirelessEnergyTransceiver.class, new RenderTileCrystal());
ClientRegistry.bindTileEntitySpecialRenderer(TileReactorCore.class, new RenderTileReactorCore());
//Entitys
RenderingRegistry.registerEntityRenderingHandler(EntityCustomDragon.class, new RenderDragon());
@@ -161,11 +164,7 @@ public class ClientProxy extends CommonProxy {
public void registerRenderIDs (){
References.idTeleporterStand = RenderingRegistry.getNextAvailableRenderId();
}
@Override
public boolean isDedicatedServer() {
return false;
References.idPortal = RenderingRegistry.getNextAvailableRenderId();
}
@Override
@@ -228,22 +227,9 @@ public class ClientProxy extends CommonProxy {
}
@Override
public void spawnParticle(Object particle) {
if (particle instanceof EntityFX) ParticleHandler.spawnCustomParticle((EntityFX)particle);
public void spawnParticle(Object particle, int range) {
if (particle instanceof EntityFX && ((EntityFX)particle).worldObj.isRemote) ParticleHandler.spawnCustomParticle((EntityFX)particle, range);
}
@Override
public boolean isSpaceDown() {
return Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
}
@Override
public boolean isShiftDown() {
return Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
}
@Override
public boolean isCtrlDown() {
return Minecraft.getMinecraft().gameSettings.keyBindSprint.getIsKeyPressed();
}
}
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.client.creativetab;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.ModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -10,7 +10,7 @@ import com.brandon3055.draconicevolution.common.container.ContainerDraconiumChes
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.network.ButtonPacket;
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.client.gui;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser;
import cpw.mods.fml.relauncher.Side;
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.client.gui;
import com.brandon3055.draconicevolution.common.container.ContainerGenerator;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.TileGenerator;
import cpw.mods.fml.relauncher.Side;
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.client.gui;
import com.brandon3055.draconicevolution.common.container.ContainerGrinder;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
import cpw.mods.fml.relauncher.Side;
@@ -754,15 +754,15 @@ public class GUIParticleGenerator extends GuiScreen {
packetValue = (short) beam_blue;
break;
case 103: //beam pitch +
beam_pitch = (beam_pitch + value_F) > 360F ? 360F : beam_pitch + value_F;
beam_pitch = (beam_pitch + value_F) > 180F ? 180F : beam_pitch + value_F;
packetValue = (short) (beam_pitch * 100F);
break;
case 104: //beam yaw +
beam_yaw = (beam_yaw + value_F) > 360F ? 360F : beam_yaw + value_F;
beam_yaw = (beam_yaw + value_F) > 180F ? 180F : beam_yaw + value_F;
packetValue = (short) (beam_yaw * 100F);
break;
case 105: //beam length +
beam_length = (beam_length + value_F) > 30F ? 30F : beam_length + value_F;
beam_length = (beam_length + value_F) > 320F ? 320F : beam_length + value_F;
packetValue = (short) (beam_length * 100F);
break;
case 106: //beam rotation +
@@ -786,11 +786,11 @@ public class GUIParticleGenerator extends GuiScreen {
packetValue = (short) beam_blue;
break;
case 111: //beam pitch -
beam_pitch = (beam_pitch - value_F) < -0F ? -0F : beam_pitch - value_F;
beam_pitch = (beam_pitch - value_F) < -180F ? -180F : beam_pitch - value_F;
packetValue = (short) (beam_pitch * 100F);
break;
case 112: //beam yaw -
beam_yaw = (beam_yaw - value_F) < -0F ? -0F : beam_yaw - value_F;
beam_yaw = (beam_yaw - value_F) < -180F ? -180F : beam_yaw - value_F;
packetValue = (short) (beam_yaw * 100F);
break;
case 113: //beam length -
@@ -6,9 +6,9 @@ import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.Teleporter.TeleportLocation;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Teleporter.TeleportLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
@@ -5,7 +5,7 @@ import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import com.brandon3055.draconicevolution.common.container.DummyContainer;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.google.gson.stream.JsonReader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@@ -2,8 +2,8 @@ package com.brandon3055.draconicevolution.client.gui.guicomponents;
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.DataUtills;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.brandonscore.common.utills.DataUtills;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import net.minecraft.client.Minecraft;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.client.gui.guicomponents;
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.DataUtills;
import com.brandon3055.brandonscore.common.utills.DataUtills;
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import net.minecraft.client.Minecraft;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.client.gui.guicomponents;
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -3,9 +3,9 @@ package com.brandon3055.draconicevolution.client.gui.guicomponents;
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import com.brandon3055.draconicevolution.client.utill.CustomResourceLocation;
import com.brandon3055.draconicevolution.common.utills.GuiHelper;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.client.utills.GuiHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.Utills;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.ItemStack;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.client.gui.manual;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
@@ -5,7 +5,7 @@ import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.items.weapons.DraconicBow;
import com.brandon3055.draconicevolution.common.items.weapons.WyvernBow;
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
@@ -0,0 +1,155 @@
package com.brandon3055.draconicevolution.client.render.block;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.lib.References;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
/**
* Created by Brandon on 25/5/2015.
*/
public class RenderPortal implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator tess = Tessellator.instance;
int meta = world.getBlockMetadata(x, y, z);
tess.setColorRGBA(0, 0, 0, 256);
switch (meta){
case 1:
tess.addVertexWithUV(x-0.01, y-0.01, z+0.75, 0, 0);
tess.addVertexWithUV(x-0.01, y+1.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+1.01, y+1.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+1.01, y-0.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+1.01, y-0.01, z+0.25, 0, 0);
tess.addVertexWithUV(x+1.01, y+1.01, z+0.25, 0, 0);
tess.addVertexWithUV(x-0.01, y+1.01, z+0.25, 0, 0);
tess.addVertexWithUV(x-0.01, y-0.01, z+0.25, 0, 0);
if (isFrame(world, x+1, y, z)){
tess.addVertexWithUV(x+0.99, y-0.01, z+0.25, 0, 0);
tess.addVertexWithUV(x+0.99, y-0.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+0.99, y+1.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+0.99, y+1.01, z+0.25, 0, 0);
}
if (isFrame(world, x-1, y, z)){
tess.addVertexWithUV(x+0.01, y+1.01, z+0.25, 0, 0);
tess.addVertexWithUV(x+0.01, y+1.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+0.01, y-0.01, z+0.75, 0, 0);
tess.addVertexWithUV(x+0.01, y-0.01, z+0.25, 0, 0);
}
if (isFrame(world, x, y-1, z)){
tess.addVertexWithUV(x-0.01, y+0.01,z+0.25, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.01,z+0.75, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.01,z+0.75, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.01,z+0.25, 0, 0);
}
if (isFrame(world, x, y+1, z)){
tess.addVertexWithUV(x+1.01, y+0.99,z+0.25, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.99,z+0.75, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.99,z+0.75, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.99,z+0.25, 0, 0);
}
break;
case 2:
tess.addVertexWithUV(x+0.75, y-0.01, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.75, y-0.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+1.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+1.01, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+1.01, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+1.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.25, y-0.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.25, y-0.01, z-0.01, 0, 0);
if (isFrame(world, x, y, z+1)){
tess.addVertexWithUV(x+0.25, y-0.01, z+0.99, 0, 0);
tess.addVertexWithUV(x+0.25, y+1.01, z+0.99, 0, 0);
tess.addVertexWithUV(x+0.75, y+1.01, z+0.99, 0, 0);
tess.addVertexWithUV(x+0.75, y-0.01, z+0.99, 0, 0);
}
if (isFrame(world, x, y, z-1)){
tess.addVertexWithUV(x+0.75, y-0.01, z+0.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+1.01, z+0.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+1.01, z+0.01, 0, 0);
tess.addVertexWithUV(x+0.25, y-0.01, z+0.01, 0, 0);
}
if (isFrame(world, x, y-1, z)){
tess.addVertexWithUV(x+0.25, y+0.01, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+0.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+0.01, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+0.01, z-0.01, 0, 0);
}
if (isFrame(world, x, y+1, z)){
tess.addVertexWithUV(x+0.75, y+0.99, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.75, y+0.99, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+0.99, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.25, y+0.99, z-0.01, 0, 0);
}
break;
case 3:
tess.addVertexWithUV(x-0.01, y+0.25, z-0.01, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.25, z+1.01, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.25, z+1.01, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.25, z-0.01, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.75, z-0.01, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.75, z+1.01, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.75, z+1.01, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.75, z-0.01, 0, 0);
if (isFrame(world, x, y, z+1)){
tess.addVertexWithUV(x-0.01, y+0.25, z+0.99, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.75, z+0.99, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.75, z+0.99, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.25, z+0.99, 0, 0);
}
if (isFrame(world, x, y, z-1)){
tess.addVertexWithUV(x+1.01, y+0.25, z+0.01, 0, 0);
tess.addVertexWithUV(x+1.01, y+0.75, z+0.01, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.75, z+0.01, 0, 0);
tess.addVertexWithUV(x-0.01, y+0.25, z+0.01, 0, 0);
}
if (isFrame(world, x+1, y, z)){
tess.addVertexWithUV(x+0.99, y+0.25, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.99, y+0.25, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.99, y+0.75, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.99, y+0.75, z-0.01, 0, 0);
}
if (isFrame(world, x-1, y, z)){
tess.addVertexWithUV(x+0.01, y+0.75, z-0.01, 0, 0);
tess.addVertexWithUV(x+0.01, y+0.75, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.01, y+0.25, z+1.01, 0, 0);
tess.addVertexWithUV(x+0.01, y+0.25, z-0.01, 0, 0);
}
}
return true;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return false;
}
@Override
public int getRenderId() {
return References.idPortal;
}
private boolean isFrame(IBlockAccess access, int x, int y, int z){
Block block = access.getBlock(x, y, z);
return block == ModBlocks.infusedObsidian || block == ModBlocks.dislocatorReceptacle;
}
}
@@ -25,7 +25,7 @@ public class RenderTeleporterStand implements ISimpleBlockRenderingHandler {
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
return false;
}
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.client.render.item;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.RenderManager;
@@ -3,7 +3,7 @@ package com.brandon3055.draconicevolution.client.render.particle;
import com.brandon3055.draconicevolution.client.handler.ClientEventHandler;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
@@ -1,10 +1,12 @@
package com.brandon3055.draconicevolution.client.render.particle;
import com.brandon3055.brandonscore.common.utills.Utills;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@@ -543,6 +545,96 @@ public final class Particles {
}
}
public static class PortalParticle extends EntityFX
{
public double targetX;
public double targetY;
public double targetZ;
public double startX;
public double startY;
public double startZ;
public float baseScale;
public PortalParticle(World world, double x, double y, double z, double tx, double ty, double tz) {
super(world, x, y, z, 0.0D, 0.0D, 0.0D);
this.startX = x;
this.startY = y;
this.startZ = z;
this.targetX = tx;
this.targetY = ty;
this.targetZ = tz;
float speed = 0.12F + (rand.nextFloat() * 0.2F);
this.motionX = (targetX - startX) * speed;
this.motionY = (targetY - startY) * speed;
this.motionZ = (targetZ - startZ) * speed;
this.particleMaxAge = 100;
this.noClip = true;
this.particleRed = this.particleGreen = this.particleBlue = 1.0f;
float baseSize = 0.05F + ((float) RenderManager.instance.livingPlayer.getDistance(x, y, z)) * 0.007F;
if (RenderManager.instance.livingPlayer != null) this.baseScale = baseSize + (rand.nextFloat() * (baseSize * 2F));
}
@Override
public void onUpdate() {
//super.onUpdate();
if (particleAge >= particleMaxAge || this.getDistanceSq(targetX, targetY, targetZ) < 0.05) setDead();
double d1 = Utills.getDistanceAtoB(startX, startY, startZ, targetX, targetY, targetZ);
double d2 = Utills.getDistanceAtoB(posX, posY, posZ, targetX, targetY, targetZ);
particleScale = ((float) (d2 / d1)) * baseScale;
particleAge ++;
prevPosX = posX;
prevPosY = posY;
prevPosZ = posZ;
moveEntity(motionX, motionY, motionZ);
}
@Override
@SideOnly(Side.CLIENT)
public void renderParticle(Tessellator tesselator, float par2, float par3, float par4, float par5, float par6, float par7) {//Note U=X V=Y
tesselator.draw();
ResourceHandler.bindParticles();
tesselator.startDrawingQuads();
tesselator.setBrightness(200);
int uIndex = 6;
int vIndex = 0;
float minU = uIndex * 0.125F;
float maxU = (uIndex+1) * 0.125F;
float minV = vIndex * 0.125F;
float maxV = (vIndex+1) * 0.125F;
float drawScale = 0.1F * this.particleScale;
if (this.particleIcon != null) {
minU = this.particleIcon.getMinU();
maxU = this.particleIcon.getMaxU();
minV = this.particleIcon.getMinV();
maxV = this.particleIcon.getMaxV();
}
float drawX = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
float drawY = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
float drawZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
tesselator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
tesselator.addVertexWithUV((double) (drawX - par3 * drawScale - par6 * drawScale), (double) (drawY - par4 * drawScale), (double) (drawZ - par5 * drawScale - par7 * drawScale), (double) maxU, (double) maxV);
tesselator.addVertexWithUV((double) (drawX - par3 * drawScale + par6 * drawScale), (double) (drawY + par4 * drawScale), (double) (drawZ - par5 * drawScale + par7 * drawScale), (double) maxU, (double) minV);
tesselator.addVertexWithUV((double) (drawX + par3 * drawScale + par6 * drawScale), (double) (drawY + par4 * drawScale), (double) (drawZ + par5 * drawScale + par7 * drawScale), (double) minU, (double) minV);
tesselator.addVertexWithUV((double) (drawX + par3 * drawScale - par6 * drawScale), (double) (drawY - par4 * drawScale), (double) (drawZ + par5 * drawScale - par7 * drawScale), (double) minU, (double) maxV);
tesselator.draw();
ResourceHandler.bindDefaultParticles();
tesselator.startDrawingQuads();
}
}
}
//int uIndex = 0;
//int vIndex = 0;
@@ -20,12 +20,10 @@ public class RenderTileEnergyStorageCore extends TileEntitySpecialRenderer {//to
private static final ResourceLocation iner_model_texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/models/power_sphere_layer_1.png");
private static final ResourceLocation outer_model_texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/models/power_sphere_layer_2.png");
private IModelCustom iner_model;
private IModelCustom outer_model;
public RenderTileEnergyStorageCore()
{
iner_model = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/power_sphere_layer_1.obj"));
//outer_model = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/power_sphere_layer_2.obj"));
}
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float timeSinceLastTick) {
@@ -67,15 +65,10 @@ public class RenderTileEnergyStorageCore extends TileEntitySpecialRenderer {//to
GL11.glTranslated(x+0.5, y+0.5, z+0.5);
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(iner_model_texture);
//float colour = (float)(Minecraft.getSystemTime()%10000) / 10000f;
//double colour = Math.sin((float)Minecraft.getSystemTime() / 10000f);
double colour = ((TileEnergyStorageCore) tile).getEnergyStored() / ((TileEnergyStorageCore) tile).getMaxEnergyStored();
float brightness = (float)Math.abs(Math.sin((float) Minecraft.getSystemTime() / 3000f) * 100f);
colour = 1f - colour;
//LogHelper.info(colour + " " + ((TileEnergyStorageCore) tile).getEnergyStored() +" "+ ((TileEnergyStorageCore) tile).getMaxEnergyStored());
//GL11.glColor4d(1F, 0.3F, 0.7f, 1F);
GL11.glScalef(scale, scale, scale);
GL11.glPushMatrix();
GL11.glRotatef(rotation, 0F, 1F, 0.5F);
@@ -109,7 +102,7 @@ public class RenderTileEnergyStorageCore extends TileEntitySpecialRenderer {//to
iner_model.renderAll();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
}
@@ -0,0 +1,72 @@
package com.brandon3055.draconicevolution.client.render.tile;
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileReactorCore;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import org.lwjgl.opengl.GL11;
/**
* Created by Brandon on 16/6/2015.
*/
public class RenderTileReactorCore extends TileEntitySpecialRenderer {
private IModelCustom reactorModel;
public RenderTileReactorCore(){
reactorModel = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/reactorCoreModel.obj"));
}
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick) {
TileReactorCore tile = (TileReactorCore) tileEntity;
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
GL11.glDisable(GL11.GL_LIGHTING);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 200F, 200F);
renderReactorCore(tile, partialTick);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
public void renderReactorCore(TileReactorCore tile, float partialTick) {
float rotation = tile.renderRotation + (partialTick * 0.2F);
double ff = 1;
double r = ff < 0.5 ? 1 - (ff*2) : 0;
double g = ff > 0.5 ? (ff-0.5)*2 : 0;
double b = ff * 2;
double a = ff < 0.1 ? (ff * 10) + 0.5 : 1;
ResourceHandler.bindResource("textures/models/reactorCore.png");
GL11.glScaled(2F, 2F, 2F);
GL11.glRotatef(rotation, 0.5F, 1F, 0.5F);
reactorModel.renderAll();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
ResourceHandler.bindResource("textures/models/reactorShieldPlate.png");
GL11.glColor4d(r, g, b, a);
GL11.glScaled(1.03F, 1.03F, 1.03F);
GL11.glRotatef(2343, 0.5F, 1F, 0.5F);
GL11.glRotatef(-rotation*2, 0.5F, 1F, 0.5F);
reactorModel.renderAll();
}
}
@@ -5,8 +5,8 @@ import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKII;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Utills;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer;
@@ -20,10 +20,7 @@ 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.energynet.TileWirelessEnergyTransceiver;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnderResurrection;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyPylon;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileInvisibleMultiblock;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.*;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.world.DraconicWorldGenerator;
import cpw.mods.fml.common.FMLCommonHandler;
@@ -34,7 +31,6 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
@@ -144,6 +140,9 @@ public class CommonProxy {
GameRegistry.registerTileEntity(TileEnergyRelay.class, References.RESOURCESPREFIX + "TileEnergyRelay");
GameRegistry.registerTileEntity(TileEnergyTransceiver.class, References.RESOURCESPREFIX + "TileEnergyTransceiver");
GameRegistry.registerTileEntity(TileWirelessEnergyTransceiver.class, References.RESOURCESPREFIX + "TileWirelessEnergyTransceiver");
GameRegistry.registerTileEntity(TileDislocatorReceptacle.class, References.RESOURCESPREFIX + "TileDislocatorReceptacle");
GameRegistry.registerTileEntity(TilePortalBlock.class, References.RESOURCESPREFIX + "TilePortalBlock");
GameRegistry.registerTileEntity(TileReactorCore.class, References.RESOURCESPREFIX + "TileReactorCore");
if (DraconicEvolution.debug) {
GameRegistry.registerTileEntity(TileTestBlock.class, References.RESOURCESPREFIX + "TileTestBlock");
GameRegistry.registerTileEntity(TileContainerTemplate.class, References.RESOURCESPREFIX + "TileContainerTemplate");
@@ -174,12 +173,6 @@ public class CommonProxy {
EntityRegistry.registerModEntity(EntityDragonHeart.class, "Dragon Heart Item", 5, DraconicEvolution.instance, 32, 5, true);
}
public boolean isDedicatedServer() {return true;}
public MinecraftServer getMCServer(){
return FMLCommonHandler.instance().getMinecraftServerInstance();
}
public ParticleEnergyBeam energyBeam(World worldObj, double x, double y, double z, double tx, double ty, double tz, int powerFlow, boolean advanced, ParticleEnergyBeam oldBeam, boolean render, int beamType)
{
return null;
@@ -189,36 +182,12 @@ public class CommonProxy {
return null;
}
public boolean isOp(String paramString)
{
MinecraftServer localMinecraftServer = FMLCommonHandler.instance().getMinecraftServerInstance();
paramString = paramString.trim();
for (String str : localMinecraftServer.getConfigurationManager().func_152606_n()) {
if (paramString.equalsIgnoreCase(str)) {
return true;
}
}
return false;
}
public void spawnParticle(Object particle)
public void spawnParticle(Object particle, int range)
{
}
public boolean isSpaceDown()
{
return false;
}
public boolean isCtrlDown()
{
return false;
}
public boolean isShiftDown()
{
return false;
}
}
@@ -3,9 +3,7 @@ package com.brandon3055.draconicevolution.common;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.blocks.*;
import com.brandon3055.draconicevolution.common.blocks.machine.*;
import com.brandon3055.draconicevolution.common.blocks.multiblock.EnergyPylon;
import com.brandon3055.draconicevolution.common.blocks.multiblock.EnergyStorageCore;
import com.brandon3055.draconicevolution.common.blocks.multiblock.InvisibleMultiblock;
import com.brandon3055.draconicevolution.common.blocks.multiblock.*;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -42,6 +40,10 @@ public class ModBlocks {
public static BlockDE draconiumChest;
public static BlockDE draconicBlock;
public static BlockDE energyCrystal;
public static BlockDE infusedObsidian;
public static BlockDE dislocatorReceptacle;
public static BlockDE portal;
public static BlockDE reactorCore;
public static Block safetyFlame;
public static ItemStack resurrectionStone;
@@ -73,6 +75,10 @@ public class ModBlocks {
draconiumChest = new DraconiumChest();
draconicBlock = new DraconicBlock();
energyCrystal = new EnergyCrystal();
infusedObsidian = new InfusedObsidian();
dislocatorReceptacle = new DislocatorReceptacle();
portal = new Portal();
reactorCore = new ReactorCore();
longRangeDislocator = new LongRangeDislocator();
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.achievements;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import net.minecraft.entity.player.EntityPlayer;
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.blocks;
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
import com.brandon3055.brandonscore.common.utills.InventoryUtils;
import com.google.common.collect.Lists;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
@@ -3,7 +3,7 @@ package com.brandon3055.draconicevolution.common.blocks;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.blocks.itemblocks.CKeyStoneItemBlock;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
@@ -99,7 +99,7 @@ public class CKeyStone extends BlockDE {
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
TileCKeyStone tile = world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileCKeyStone ? (TileCKeyStone) world.getTileEntity(x, y, z) : null;
if (tile != null) {
ItemStack key = new ItemStack(ModItems.key);
@@ -6,8 +6,8 @@ import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -170,7 +170,7 @@ public class DraconiumChest extends BlockCustomDrop {
@Override
public int getRenderType() {
return References.idDraconiumChest;
return -1;
}
@Override
@@ -0,0 +1,62 @@
package com.brandon3055.draconicevolution.common.blocks;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.lib.References;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import java.util.List;
/**
* Created by Brandon on 19/5/2015.
*/
public class InfusedObsidian extends BlockDE {
public InfusedObsidian(){
super(Material.rock);
this.setHardness(100.0F);
this.setResistance(4000.0F);
this.setBlockName("infusedObsidian");
this.setHarvestLevel("pickaxe", 4);
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
ModBlocks.register(this, InfusedObsidianItemBlock.class);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "animated/infusedObsidian");
}
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
}
public static class InfusedObsidianItemBlock extends ItemBlock {
public InfusedObsidianItemBlock(Block p_i45328_1_) {
super(p_i45328_1_);
}
@SideOnly(Side.CLIENT)
@SuppressWarnings("unchecked")
@Override
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("info.infusedObsidian.txt"));
super.addInformation(p_77624_1_, p_77624_2_, list, p_77624_4_);
}
}
}
@@ -6,7 +6,7 @@ import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKI;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
import com.brandon3055.draconicevolution.common.utills.Teleporter;
import com.brandon3055.brandonscore.common.utills.Teleporter;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -8,7 +8,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.energynet.*;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
@@ -207,7 +207,7 @@ public class EnergyCrystal extends BlockDE implements IHudDisplayBlock
IRemoteEnergyHandler tile = world.getTileEntity(x, y, z) instanceof IRemoteEnergyHandler ? (IRemoteEnergyHandler) world.getTileEntity(x, y, z) : null;
if (tile != null)
{
list.add(InfoHelper.HITC()+getLocalizedName());
list.add(InfoHelper.HITC()+StatCollector.translateToLocal(this.getUnlocalizedName() + world.getBlockMetadata(x, y, z) + ".name"));
list.add("RF: " + tile.getEnergyStored(ForgeDirection.DOWN));
list.add("Cap: " + tile.getCapacity() + "%");
if (tile instanceof TileEnergyTransceiver) {
@@ -21,7 +21,7 @@ public class SunDial extends BlockDE {
public IIcon icon_front;
public IIcon icon_front_active;
public IIcon icon_side;
public boolean blockState = true;
//public boolean blockState = true;
public SunDial() {
this.setBlockName(Strings.blockSunDialName);
@@ -62,6 +62,7 @@ public class SunDial extends BlockDE {
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
{
TileEntity tile = world.getTileEntity(x, y, z);
@@ -0,0 +1,137 @@
package com.brandon3055.draconicevolution.common.blocks.multiblock;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.blocks.BlockCustomDrop;
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKI;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileDislocatorReceptacle;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
/**
* Created by Brandon on 19/5/2015.
*/
public class DislocatorReceptacle extends BlockCustomDrop implements ITileEntityProvider {
IIcon textureInactive;
public DislocatorReceptacle(){
super(Material.rock);
this.setHardness(50.0F);
this.setResistance(2000.0F);
this.setBlockName("dislocatorReceptacle");
this.setHarvestLevel("pickaxe", 3);
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
ModBlocks.register(this);
}
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
textureInactive = iconRegister.registerIcon(References.RESOURCESPREFIX + "animated/dislocatorReceptacle_inactive");
blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "animated/dislocatorReceptacle_active");
}
@Override
public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) {
TileDislocatorReceptacle tile = access.getTileEntity(x, y, z) instanceof TileDislocatorReceptacle ? (TileDislocatorReceptacle)access.getTileEntity(x, y, z) : null;
if (tile != null) return tile.isActive ? blockIcon : textureInactive;
return blockIcon;
}
@Override
public void updateTick(World world, int x, int y, int z, Random random) {
TileDislocatorReceptacle tile = (TileDislocatorReceptacle) world.getTileEntity(x, y, z);
if (tile != null) tile.updateState();
}
@Override
public IIcon getIcon(int p_149691_1_, int meta) {
return blockIcon;
}
@Override
public boolean hasTileEntity(int metadata) {
return true;
}
@Override
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
return false;
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TileDislocatorReceptacle();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
if (world.isRemote) return true;
TileDislocatorReceptacle tile = (TileDislocatorReceptacle) world.getTileEntity(x, y, z);
if (tile == null) return false;
if (tile.getStackInSlot(0) != null){
if (player.getHeldItem() == null){
player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.getStackInSlot(0));
tile.setInventorySlotContents(0, null);
}else {
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, tile.getStackInSlot(0)));
tile.setInventorySlotContents(0, null);
}
world.markBlockForUpdate(x, y, z);
world.notifyBlockChange(x, y, z, this);
}else {
ItemStack stack = player.getHeldItem();
if (stack != null && stack.getItem() instanceof TeleporterMKI && ((TeleporterMKI)stack.getItem()).getLocation(stack) != null){
tile.setInventorySlotContents(0, player.getHeldItem());
player.destroyCurrentEquippedItem();
}
}
return true;
}
@Override
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int p_149736_5_) {
TileDislocatorReceptacle tile = (TileDislocatorReceptacle)world.getTileEntity(x, y, z);
return tile == null ? 0 : tile.getStackInSlot(0) != null ? 15 : 0;
}
@Override
protected boolean dropInventory() {
return true;
}
@Override
protected boolean hasCustomDropps() {
return false;
}
@Override
protected void getCustomTileEntityDrops(TileEntity te, List<ItemStack> droppes) {
}
}
@@ -7,9 +7,9 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -8,9 +8,9 @@ import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.Til
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileInvisibleMultiblock;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -0,0 +1,121 @@
package com.brandon3055.draconicevolution.common.blocks.multiblock;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileDislocatorReceptacle;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TilePortalBlock;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.Random;
/**
* Created by Brandon on 23/5/2015.
*/
public class Portal extends BlockDE implements ITileEntityProvider{
public Portal(){
super(Material.portal);
this.setBlockUnbreakable();
this.setBlockName("portal");
ModBlocks.register(this);
}
@Override
public int getRenderType() {
return References.idPortal;
}
@Override
public AxisAlignedBB getSelectedBoundingBoxFromPool(World p_149633_1_, int p_149633_2_, int p_149633_3_, int p_149633_4_) {
return AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public TileEntity createNewTileEntity(World world, int i) {
return new TilePortalBlock();
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
return null;
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
if (world.isRemote) return;
if (getMaster(world, x, y, z) == null){
world.setBlockToAir(x, y, z);
return;
}
if (getMaster(world, x, y, z).isActive) getMaster(world, x, y, z).validateActivePortal();
if (!getMaster(world, x, y, z).isActive && !getMaster(world, x, y, z).updating) {
world.setBlockToAir(x, y, z);
return;
}
updateMetadata(world, x, y, z);
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
if (world.isRemote) return;
TileDislocatorReceptacle tile = getMaster(world, x, y, z);
if (tile != null && tile.isActive && tile.getLocation() != null) {
if (tile.coolDown > 0) return;
tile.coolDown = 1;
tile.getLocation().sendEntityToCoords(entity);
}
else if (tile != null) tile.validateActivePortal();
else world.setBlockToAir(x, y, z);
}
private TileDislocatorReceptacle getMaster(World world, int x, int y, int z){
return world.getTileEntity(x, y, z) instanceof TilePortalBlock ? ((TilePortalBlock)world.getTileEntity(x, y, z)).getMaster() : null;
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
return null; }
private boolean isPortalOrFrame(IBlockAccess access, int x, int y, int z) {
Block block = access.getBlock(x, y, z);
return block == ModBlocks.portal || block == ModBlocks.infusedObsidian || block == ModBlocks.dislocatorReceptacle;
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
updateMetadata(world, x, y, z);
}
private void updateMetadata(World world, int x, int y, int z) {
if (world.isRemote || world.getBlockMetadata(x, y, z) != 0) return;
int meta = 0;
if (isPortalOrFrame(world, x, y + 1, z) && isPortalOrFrame(world, x, y - 1, z) && isPortalOrFrame(world, x + 1, y, z) && isPortalOrFrame(world, x - 1, y, z)) meta = 1;
else if (isPortalOrFrame(world, x, y + 1, z) && isPortalOrFrame(world, x, y - 1, z) && isPortalOrFrame(world, x, y, z + 1) && isPortalOrFrame(world, x, y, z - 1)) meta = 2;
else if (isPortalOrFrame(world, x + 1, y, z) && isPortalOrFrame(world, x - 1, y, z) && isPortalOrFrame(world, x, y, z + 1) && isPortalOrFrame(world, x, y, z - 1)) meta = 3;
world.setBlockMetadataWithNotify(x, y, z, meta, 2);
}
}
@@ -0,0 +1,55 @@
package com.brandon3055.draconicevolution.common.blocks.multiblock;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileReactorCore;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
/**
* Created by Brandon on 16/6/2015.
*/
public class ReactorCore extends BlockDE {
public ReactorCore(){
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
this.setBlockName("reactorCore");
ModBlocks.register(this);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean hasTileEntity(int metadata) {
return true;
}
@Override
public TileEntity createTileEntity(World world, int metadata) {
return new TileReactorCore();
}
}
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.common.container;
import com.brandon3055.draconicevolution.common.inventory.SlotOutput;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.entity;
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
@@ -6,7 +6,7 @@ import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.blocks.DraconiumBlock;
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation;
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.entity;
import com.brandon3055.draconicevolution.common.utills.Utills;
import com.brandon3055.brandonscore.common.utills.Utills;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -25,7 +25,7 @@ public class ExtendedPlayer implements IExtendedEntityProperties {
* Used to register these extended properties for the player during EntityConstructing event
* This method is for convenience only; it will make your code look nicer
*/
public static final void register(EntityPlayer player) {
public static void register(EntityPlayer player) {
player.registerExtendedProperties(ExtendedPlayer.EXT_PROP_NAME, new ExtendedPlayer(player));
}
@@ -33,7 +33,7 @@ public class ExtendedPlayer implements IExtendedEntityProperties {
* Returns ExtendedPlayer properties for player
* This method is for convenience only; it will make your code look nicer
*/
public static final ExtendedPlayer get(EntityPlayer player) {
public static ExtendedPlayer get(EntityPlayer player) {
return (ExtendedPlayer) player.getExtendedProperties(EXT_PROP_NAME);
}
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.handler;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.utills.ShapedOreEnergyRecipe;
import cpw.mods.fml.common.Loader;
@@ -74,11 +74,13 @@ public class CraftingHandler {
//aesthetic
add(ModBlocks.particleGenerator, "RBR", "BCB", "RBR", 'R', Blocks.redstone_block, 'B', Items.blaze_rod, 'C', ModItems.draconicCore);
add(ModBlocks.infusedObsidian, "BOB", "ODO", "BOB", 'B', Items.blaze_powder, 'O', Blocks.obsidian, 'D', ModItems.draconiumDust);
//machines
addOre(ModBlocks.potentiometer, "ITI", "QCQ", "IRI", 'I', "ingotIron", 'T', Blocks.redstone_torch, 'Q', "gemQuartz", 'C', Items.comparator, 'R', Blocks.redstone_block);
addOre(ModBlocks.rainSensor, " ", "RBR", "SPS", 'R', "dustRedstone", 'B', Items.bucket, 'S', Blocks.stone_slab, 'P', Blocks.heavy_weighted_pressure_plate);
addOre(ModBlocks.teleporterStand, " P ", " S ", "HBH", 'P', Blocks.stone_pressure_plate, 'S', "stone", 'H', new ItemStack(Blocks.stone_slab, 1, 0), 'B', Items.blaze_powder);
addOre(ModBlocks.dislocatorReceptacle, "ICI", " O ", "ISI", 'I', "ingotIron", 'C', ModItems.draconicCore, 'O', ModBlocks.infusedObsidian, 'S', ModBlocks.teleporterStand);
//machines adv
@@ -94,7 +96,7 @@ public class CraftingHandler {
addOre(getStack(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(getStack(ModBlocks.energyCrystal, 4, 0), "IDI", "DCD", "IDI", 'I' , ModItems.draconiumIngot, 'D', "gemDiamond", 'C', ModItems.draconicCore);
addOre(getStack(ModBlocks.energyCrystal, 4, 1), "CRC", "RWR", "CRC", 'R' , ModBlocks.energyCrystal, 'W', ModItems.wyvernCore, 'C', ModItems.draconicCore);
addOre(getStack(ModBlocks.energyCrystal, 4, 1), "CRC", "RWR", "CRC", 'R' , getStack(ModBlocks.energyCrystal, 1, 0), 'W', ModItems.wyvernCore, 'C', ModItems.draconicCore);
addShaplessOre(getStack(ModBlocks.energyCrystal, 1, 0), getStack(ModBlocks.energyCrystal, 1, 2), getStack(ModBlocks.energyCrystal, 1, 2));
addShaplessOre(getStack(ModBlocks.energyCrystal, 2, 2), getStack(ModBlocks.energyCrystal, 1, 0));
addShaplessOre(getStack(ModBlocks.energyCrystal, 1, 1), getStack(ModBlocks.energyCrystal, 1, 3), getStack(ModBlocks.energyCrystal, 1, 3));
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.common.handler;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.items.armor.ArmorEffectHandler;
import com.brandon3055.draconicevolution.common.lib.References;
@@ -96,16 +96,16 @@ public class FMLEventHandler {
player.capabilities.allowFlying = true;
if (ArmorEffectHandler.getFlightLock(player)) player.capabilities.isFlying = true;
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && ((ArmorEffectHandler.getVAccSprint(player) && DraconicEvolution.proxy.isCtrlDown()) || (!ArmorEffectHandler.getVAccSprint(player))))
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && ((ArmorEffectHandler.getVAccSprint(player) && BrandonsCore.proxy.isCtrlDown()) || (!ArmorEffectHandler.getVAccSprint(player))))
{
float percentIncrease = ArmorEffectHandler.getVAccel(player);
if (DraconicEvolution.proxy.isSpaceDown() && !DraconicEvolution.proxy.isShiftDown())
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown())
{
player.motionY =(double)(percentIncrease * 2F);
}
if (DraconicEvolution.proxy.isShiftDown() && !DraconicEvolution.proxy.isSpaceDown())
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown())
{
player.motionY = -(double)(percentIncrease * 2F);
}
@@ -1,6 +1,7 @@
package com.brandon3055.draconicevolution.common.handler;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
@@ -12,7 +13,6 @@ import com.brandon3055.draconicevolution.common.items.armor.ArmorEffectHandler;
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
import com.brandon3055.draconicevolution.common.network.SpeedRequestPacket;
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.ReflectionHelper;
@@ -24,6 +24,7 @@ import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.boss.IBossDisplayData;
@@ -53,6 +54,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
import net.minecraftforge.event.world.WorldEvent;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
@@ -68,11 +70,40 @@ public class MinecraftForgeEventHandler {
public static int ticksSinceRequest = 0;
public static boolean speedNeedsUpdating = true;
private Field persistenceRequired = null;
public MinecraftForgeEventHandler(){
try {
persistenceRequired = ReflectionHelper.findField(EntityLiving.class, "field_82179_bU", "persistenceRequired");
} catch (Exception e) {
LogHelper.error("Unable to find field \"persistenceRequired\"");
}
}
@SubscribeEvent
public void onLivingUpdate(LivingEvent.LivingUpdateEvent event)
{
EntityLivingBase entity = event.entityLiving;
if (entity.getEntityData().hasKey("SpawnedByDESpawner")){
long spawnTime = entity.getEntityData().getLong("SpawnedByDESpawner");
long livedFor = entity.worldObj.getTotalWorldTime() - spawnTime;
if (livedFor > 600 && persistenceRequired != null){
try {
persistenceRequired.setBoolean(entity, false);
entity.getEntityData().removeTag("SpawnedByDESpawner");
LogHelper.info("Tag Removed From " + entity);
} catch (Exception e) {
LogHelper.warn("Error occured while resetting entity persistence: " + e);
entity.getEntityData().removeTag("SpawnedByDESpawner");
}
}
}
if (!event.entityLiving.worldObj.isRemote || !(event.entityLiving instanceof EntityPlayerSP)) return;
EntityPlayerSP player = (EntityPlayerSP) event.entityLiving;
EntityPlayerSP player = (EntityPlayerSP) entity;
double motionX = player.motionX;
double motionZ = player.motionZ;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.inventory;
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@@ -1,15 +1,17 @@
package com.brandon3055.draconicevolution.common.items;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityMobSpawner;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
@@ -34,7 +36,18 @@ public class DraconicCore extends ItemDE {
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
if (world.getBlock(x, y, z) == Blocks.mob_spawner)
{
TileEntityMobSpawner oldSpawner = world.getTileEntity(x, y, z) instanceof TileEntityMobSpawner ? (TileEntityMobSpawner)world.getTileEntity(x, y, z) : null;
if (oldSpawner == null) return false;
String mobName = oldSpawner.func_145881_a().getEntityNameToSpawn();
world.setBlock(x, y, z, ModBlocks.customSpawner);
TileCustomSpawner newSpawner = world.getTileEntity(x, y, z) instanceof TileCustomSpawner ? (TileCustomSpawner)world.getTileEntity(x, y, z) : null;
if (newSpawner != null) {
newSpawner.getBaseLogic().entityName = mobName;
newSpawner.isSetToSpawn = true;
world.markBlockForUpdate(x, y, z);
}
stack.splitStack(1);
return true;
}
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.items;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.lib.Strings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.common.items;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.lib.Strings;
import cpw.mods.fml.relauncher.Side;
@@ -32,6 +32,29 @@ public class Tclogo extends ItemDE {
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5)
{
// if (entity instanceof EntityPlayerMP && !entity.onGround) {
// //for (int i = 0; i < 10; i++)
// EntityPlayer player = (EntityPlayer)entity;
// if (player.posX < 500){
//
// ((EntityPlayerMP) entity).playerNetServerHandler.setPlayerLocation(player.posX + 10, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
// player.motionX += 10;
// if (player.posX > 128) {
//
// ((EntityPlayerMP) entity).playerNetServerHandler.setPlayerLocation(501, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
//
// }
//
// }
// else player.motionX = 0;
// ((EntityPlayerMP) entity).playerNetServerHandler.setPlayerLocation(entity.posX + 10, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
// ((EntityPlayerMP) entity).addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 10, 1000));
// if (entity.posX > 500) ((EntityPlayerMP) entity).destroyCurrentEquippedItem();
// }
/*
//if (entity.isCollidedHorizontally)// && !world.isRemote)
//entity.setLocationAndAngles(entity.posX+30D, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);;
/*
@@ -74,6 +97,13 @@ public class Tclogo extends ItemDE {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
/*if (player instanceof EntityPlayerMP) {
for (int i = 0; i < 10; i++)
((EntityPlayerMP) player).playerNetServerHandler.setPlayerLocation(player.posX + 1, player.posY, player.posZ, player.rotationYaw, player.rotationPitch);
}
if (1==1) return stack;*/
//Minecraft.getMinecraft().gameSettings.mouseSensitivity = -0.34F;
// if (world.isRemote)
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.common.items.armor;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -1,6 +1,8 @@
package com.brandon3055.draconicevolution.common.items.armor;
import cofh.api.energy.IEnergyContainerItem;
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.entity.EntityPersistentItem;
@@ -1,6 +1,8 @@
package com.brandon3055.draconicevolution.common.items.armor;
import cofh.api.energy.IEnergyContainerItem;
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.entity.EntityPersistentItem;
@@ -1,7 +1,7 @@
package com.brandon3055.draconicevolution.common.items.tools;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.items.ItemDE;
import com.brandon3055.draconicevolution.common.ModItems;
@@ -6,7 +6,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
@@ -7,7 +7,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -6,8 +6,8 @@ import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
@@ -5,8 +5,8 @@ import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.RFItemBase;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.items.tools;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModBlocks;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.items.ItemDE;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.lib.References;
@@ -1,13 +1,14 @@
package com.brandon3055.draconicevolution.common.items.tools;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Teleporter.TeleportLocation;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.items.ItemDE;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.Teleporter.TeleportLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -92,7 +93,7 @@ public class TeleporterMKI extends ItemDE {
ItemNBTHelper.setFloat(stack, "Pitch", player.rotationPitch);
ItemNBTHelper.setInteger(stack, "Dimension", player.dimension);
ItemNBTHelper.setBoolean(stack, "IsSet", true);
ItemNBTHelper.setString(stack, "DimentionName", DraconicEvolution.proxy.getMCServer().worldServerForDimension(player.dimension).provider.getDimensionName());
ItemNBTHelper.setString(stack, "DimentionName", BrandonsCore.proxy.getMCServer().worldServerForDimension(player.dimension).provider.getDimensionName());
}
return stack;
} else if (world.isRemote)
@@ -7,9 +7,9 @@ import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayItem;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.Teleporter.TeleportLocation;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Teleporter.TeleportLocation;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -8,7 +8,7 @@ import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileRemoteEnergyBase;
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileWirelessEnergyTransceiver;
import com.brandon3055.draconicevolution.common.utills.IHudDisplayItem;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import net.minecraft.block.Block;
import net.minecraft.block.material.MaterialLiquid;
import net.minecraft.client.Minecraft;
@@ -1,6 +1,9 @@
package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Utills;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.items.ItemDE;
@@ -1,5 +1,10 @@
package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.DataUtills;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Utills;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.draconicevolution.client.keybinding.KeyBindings;
import com.brandon3055.draconicevolution.common.lib.References;
@@ -159,11 +164,11 @@ public class ToolBase extends RFItemBase {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (!world.isRemote && !DraconicEvolution.proxy.isDedicatedServer())
if (!world.isRemote && !BrandonsCore.proxy.isDedicatedServer())
{
handleModeChange(stack, player, InfoHelper.isShiftKeyDown(), InfoHelper.isCtrlKeyDown());
}
else if (world.isRemote && DraconicEvolution.proxy.getMCServer() == null)
else if (world.isRemote && BrandonsCore.proxy.getMCServer() == null)
{
handleModeChange(stack, player, InfoHelper.isShiftKeyDown(), InfoHelper.isCtrlKeyDown());
DraconicEvolution.network.sendToServer(new ToolModePacket(InfoHelper.isShiftKeyDown(), InfoHelper.isCtrlKeyDown()));
@@ -3,7 +3,7 @@ package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.Enchantment;
@@ -6,9 +6,9 @@ import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -8,9 +8,9 @@ import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHand
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.google.common.collect.Multimap;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
@@ -6,9 +6,9 @@ import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -108,8 +108,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool {
{
String currentMode = ItemNBTHelper.getString(stack, "mode", "rapidfire");
System.out.println("curent mode:" + currentMode);
if (currentMode.equals("rapidfire"))
ItemNBTHelper.setString(stack, "mode", "sharpshooter");
else
@@ -8,9 +8,9 @@ import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHand
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.lib.Strings;
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
import com.brandon3055.draconicevolution.common.utills.InfoHelper;
import com.brandon3055.brandonscore.common.utills.InfoHelper;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.google.common.collect.Multimap;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
@@ -21,7 +21,7 @@ public final class References {
//======================Render IDs========================//
public static int idTeleporterStand = -1;
public static int idDraconiumChest = -1;
public static int idPortal = -1;
//======================Data Types========================//
@@ -5,7 +5,7 @@ package com.brandon3055.draconicevolution.common.lib;
*/
public class VersionHandler
{
public static final String VERSION = "1.0.1c";
public static final String VERSION = "1.0.1d";
public static final int SNAPSHOT = 0;
public static final String MCVERSION = "1.7.10";
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.network;
import com.brandon3055.draconicevolution.common.utills.DataUtills;
import com.brandon3055.brandonscore.common.utills.DataUtills;
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
import cpw.mods.fml.common.network.ByteBufUtils;
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.network;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.handler.MinecraftForgeEventHandler;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
@@ -39,7 +39,7 @@ public class SpeedRequestPacket implements IMessage
public IMessage onMessage(SpeedRequestPacket message, MessageContext ctx) {
if (ctx.side == Side.SERVER)
{
if (ConfigHandler.speedLimitDimList.contains(ctx.getServerHandler().playerEntity.dimension) || (DraconicEvolution.proxy.isOp(ctx.getServerHandler().playerEntity.getCommandSenderName()) && !ConfigHandler.speedLimitops)) return new SpeedRequestPacket(20F);
if (ConfigHandler.speedLimitDimList.contains(ctx.getServerHandler().playerEntity.dimension) || (BrandonsCore.proxy.isOp(ctx.getServerHandler().playerEntity.getCommandSenderName()) && !ConfigHandler.speedLimitops)) return new SpeedRequestPacket(20F);
LogHelper.info(ConfigHandler.speedLimitops);
return new SpeedRequestPacket(ConfigHandler.maxPlayerSpeed);
}
@@ -1,10 +1,10 @@
package com.brandon3055.draconicevolution.common.network;
import com.brandon3055.draconicevolution.DraconicEvolution;
import com.brandon3055.brandonscore.BrandonsCore;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.Teleporter.TeleportLocation;
import com.brandon3055.draconicevolution.common.ModItems;
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.utills.Teleporter.TeleportLocation;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -138,7 +138,7 @@ public class TeleporterPacket implements IMessage
if (message.function == ADDDESTINATION){
NBTTagCompound tag = new NBTTagCompound();
message.location.setDimentionName(DraconicEvolution.proxy.getMCServer().worldServerForDimension(message.location.getDimension()).provider.getDimensionName());
message.location.setDimentionName(BrandonsCore.proxy.getMCServer().worldServerForDimension(message.location.getDimension()).provider.getDimensionName());
message.location.writeToNBT(tag);
list.appendTag(tag);
compound.setTag("Locations", list);
@@ -172,7 +172,7 @@ public class TeleporterPacket implements IMessage
if (message.function == UPDATEDESTINATION){
NBTTagCompound tag = list.getCompoundTagAt(message.data);
message.location.setDimentionName(DraconicEvolution.proxy.getMCServer().worldServerForDimension(message.location.getDimension()).provider.getDimensionName());
message.location.setDimentionName(BrandonsCore.proxy.getMCServer().worldServerForDimension(message.location.getDimension()).provider.getDimensionName());
message.location.writeToNBT(tag);
list.func_150304_a(message.data, tag);
compound.setTag("Locations", list);
@@ -2,7 +2,7 @@ package com.brandon3055.draconicevolution.common.network;
import com.brandon3055.draconicevolution.common.container.ContainerDataSync;
import com.brandon3055.draconicevolution.common.tileentities.TileObjectSync;
import com.brandon3055.draconicevolution.common.utills.DataUtills;
import com.brandon3055.brandonscore.common.utills.DataUtills;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
@@ -26,6 +26,7 @@ public class NEIDraconicevolutionConfig implements IConfigureNEI
API.hideItem(new ItemStack(ModItems.creativeStructureSpawner));
API.hideItem(new ItemStack(ModItems.dezilsMarshmallow));
API.hideItem(new ItemStack(ModItems.creativeStructureSpawner, 1, 1));
API.hideItem(new ItemStack(ModBlocks.portal));
LogHelper.info("Added NEI integration");
}
@@ -166,7 +166,11 @@ public abstract class CustomSpawnerBaseLogic {
}
} else ((EntityLiving) par1Entity).onSpawnWithEgg(null);
if (!requiresPlayer)((EntityLiving)par1Entity).func_110163_bv();
if (!requiresPlayer) {
((EntityLiving)par1Entity).func_110163_bv();
par1Entity.getEntityData().setLong("SpawnedByDESpawner", getSpawnerWorld().getTotalWorldTime());
}
this.getSpawnerWorld().spawnEntityInWorld(par1Entity);
}
@@ -242,7 +246,7 @@ public abstract class CustomSpawnerBaseLogic {
@SideOnly(Side.CLIENT)
public Entity getEntityForRenderer() {
if (this.renderedEntity == null) {
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), (World) null);
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), getSpawnerWorld());
entity = this.spawnEntity(entity);
if (entity instanceof EntitySkeleton) ((EntitySkeleton)entity).setSkeletonType(skeletonType);
this.renderedEntity = entity;
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.tileentities;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import com.brandon3055.draconicevolution.common.ModItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -1,6 +1,6 @@
package com.brandon3055.draconicevolution.common.tileentities;
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@@ -8,7 +8,7 @@ import com.brandon3055.draconicevolution.common.container.ContainerDraconiumChes
import com.brandon3055.draconicevolution.common.lib.OreDoublingRegistry;
import com.brandon3055.draconicevolution.common.utills.EnergyStorage;
import com.brandon3055.draconicevolution.common.utills.ICustomItemData;
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
import com.brandon3055.brandonscore.common.utills.InventoryUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
Loaded 100 of 138 files, more files were not shown because too many files have changed in this diff. Show more