fixed chestplate, tweaked generators

This commit is contained in:
fewizz committed 2016-01-09 11:46:30 +03:00
1 parent 797bde4868
commit a0eb5802bd
2 files changed
+24 -3

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBow;
import net.minecraft.util.MathHelper;
@@ -193,7 +194,7 @@ public class ModelCpecialArmor extends ModelBiped {
this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemBow && player.isUsingItem()) {
if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem().getItemUseAction(player.inventory.getCurrentItem()) == EnumAction.bow && player.isUsingItem()) {
f6 = 0.0F;
f7 = 0.0F;
this.bipedRightArm.rotateAngleZ = 0.0F;
@@ -2,9 +2,13 @@ package tombenpotter.emt.common.tile.generator;
import ic2.api.energy.prefab.BasicSource;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.IAspectSource;
import thaumcraft.common.lib.events.EssentiaHandler;
import thaumcraft.common.lib.network.PacketHandler;
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
import tombenpotter.emt.common.tile.TileEntityEMT;
import tombenpotter.emt.common.util.EMTConfigHandler;
@@ -32,8 +36,24 @@ public abstract class TileEntityBaseGenerator extends TileEntityEMT {
}
public void createEnergy() {
if (!this.worldObj.isRemote && EssentiaHandler.drainEssentia(this, aspect, ForgeDirection.UNKNOWN, 8)) {
energySource.addEnergy(output / 20D);
int count = 0;
if (!this.worldObj.isRemote) {
for (int x = this.xCoord - 4; x < this.xCoord + 4; x++) {
for (int y = this.yCoord - 4; y < this.yCoord + 4; y++) {
for (int z = this.zCoord - 4; z < this.zCoord + 4; z++) {
TileEntity tile = this.worldObj.getTileEntity(x, y, z);
if (tile != null && tile instanceof IAspectSource) {
IAspectSource as = (IAspectSource) tile;
if (as.doesContainerContainAmount(aspect, 1)) {
if (as.takeFromContainer(aspect, 1)) {
PacketHandler.INSTANCE.sendToAllAround(new PacketFXEssentiaSource(xCoord, yCoord, zCoord, (byte) (xCoord - x), (byte) (yCoord - y), (byte) (zCoord - z), aspect.getColor()), new cpw.mods.fml.common.network.NetworkRegistry.TargetPoint(this.getWorldObj().provider.dimensionId, xCoord, yCoord, zCoord, 32.0D));
energySource.addEnergy(output / 30D);
}
}
}
}
}
}
}
}