aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java5
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java28
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow.java438
-rw-r--r--src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java78
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java349
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java57
-rw-r--r--src/main/java/gregtech/common/items/ID_MetaItem_01.java27
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java141
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java71
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java23
10 files changed, 14 insertions, 1203 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index 4cb063b3b5..d7bd2ad53f 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -88,8 +88,6 @@ import gregtech.api.util.GT_PlayedSound;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder;
import gregtech.common.blocks.GT_Item_Machines;
-import gregtech.common.entities.GT_Entity_Arrow;
-import gregtech.common.entities.GT_Entity_Arrow_Potion;
import gregtech.common.render.GT_CapeRenderer;
import gregtech.common.render.GT_FlaskRenderer;
import gregtech.common.render.GT_FluidDisplayStackRenderer;
@@ -98,7 +96,6 @@ import gregtech.common.render.GT_MultiTile_Renderer;
import gregtech.common.render.GT_PollutionRenderer;
import gregtech.common.render.GT_RenderDrone;
import gregtech.common.render.GT_Renderer_Block;
-import gregtech.common.render.GT_Renderer_Entity_Arrow;
import gregtech.common.render.items.GT_MetaGenerated_Item_Renderer;
import gregtech.common.tileentities.debug.GT_MetaTileEntity_AdvDebugStructureWriter;
import gregtech.loaders.ExtraIcons;
@@ -633,8 +630,6 @@ public class GT_Client extends GT_Proxy implements Runnable {
metaGeneratedItemRenderer.registerItem(GT_Bees.combs);
}
new GT_MetaGenerated_Tool_Renderer();
- new GT_Renderer_Entity_Arrow(GT_Entity_Arrow.class, "arrow");
- new GT_Renderer_Entity_Arrow(GT_Entity_Arrow_Potion.class, "arrow_potions");
new GT_FlaskRenderer();
new GT_FluidDisplayStackRenderer();
MinecraftForge.EVENT_BUS.register(new NEI_GT_Config());
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index bfd47d5c2c..4cd49429c3 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -67,7 +67,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityEnderman;
-import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
@@ -169,7 +168,6 @@ import gregtech.api.util.GT_Shaped_Recipe;
import gregtech.api.util.GT_Shapeless_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder;
-import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.items.GT_MetaGenerated_Item_98;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gregtech.common.items.ID_MetaTool_01;
@@ -1551,21 +1549,17 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
@SubscribeEvent
public void onEntitySpawningEvent(EntityJoinWorldEvent aEvent) {
- if ((aEvent.entity != null) && (!aEvent.entity.worldObj.isRemote)) {
- if ((aEvent.entity instanceof EntityItem)) {
- ((EntityItem) aEvent.entity).setEntityItemStack(
- GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true));
- }
- if ((this.mSkeletonsShootGTArrows > 0) && (aEvent.entity.getClass() == EntityArrow.class)
- && (aEvent.entity.worldObj.rand.nextInt(this.mSkeletonsShootGTArrows) == 0)
- && ((((EntityArrow) aEvent.entity).shootingEntity instanceof EntitySkeleton))) {
- aEvent.entity.worldObj.spawnEntityInWorld(
- new GT_Entity_Arrow(
- (EntityArrow) aEvent.entity,
- OrePrefixes.arrowGtWood.mPrefixedItems
- .get(aEvent.entity.worldObj.rand.nextInt(OrePrefixes.arrowGtWood.mPrefixedItems.size()))));
- aEvent.entity.setDead();
- }
+ if (aEvent.entity == null) {
+ return;
+ }
+
+ if (aEvent.entity.worldObj.isRemote) {
+ return;
+ }
+
+ if ((aEvent.entity instanceof EntityItem)) {
+ ((EntityItem) aEvent.entity)
+ .setEntityItemStack(GT_OreDictUnificator.get(true, ((EntityItem) aEvent.entity).getEntityItem(), true));
}
}
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
deleted file mode 100644
index 758888c720..0000000000
--- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java
+++ /dev/null
@@ -1,438 +0,0 @@
-package gregtech.common.entities;
-
-import java.util.List;
-import java.util.UUID;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.enchantment.EnchantmentHelper;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.entity.monster.EntityEnderman;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.play.server.S2BPacketChangeGameState;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldServer;
-import net.minecraftforge.common.util.FakePlayerFactory;
-
-import com.mojang.authlib.GameProfile;
-
-import gregtech.api.enums.ParticleFX;
-import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import gregtech.api.util.WorldSpawnedEventBuilder;
-
-public class GT_Entity_Arrow extends EntityArrow {
-
- private int mHitBlockX = -1;
- private int mHitBlockY = -1;
- private int mHitBlockZ = -1;
- private Block mHitBlock = Blocks.air;
- private int mHitBlockMeta = 0;
- private boolean inGround = false;
- private int mTicksAlive = 0;
- private int ticksInAir = 0;
- private int mKnockback = 0;
- private ItemStack mArrow = null;
-
- public GT_Entity_Arrow(World aWorld) {
- super(aWorld);
- }
-
- public GT_Entity_Arrow(World aWorld, double aX, double aY, double aZ) {
- super(aWorld, aX, aY, aZ);
- }
-
- public GT_Entity_Arrow(World aWorld, EntityLivingBase aEntity, float aSpeed) {
- super(aWorld, aEntity, aSpeed);
- }
-
- public GT_Entity_Arrow(EntityArrow aArrow, ItemStack aStack) {
- super(aArrow.worldObj);
- NBTTagCompound tNBT = new NBTTagCompound();
- aArrow.writeToNBT(tNBT);
- readFromNBT(tNBT);
- setArrowItem(aStack);
- }
-
- @Override
- public void onUpdate() {
- onEntityUpdate();
- if ((this.mArrow == null) && (!this.worldObj.isRemote)) {
- setDead();
- return;
- }
- Entity tShootingEntity = this.shootingEntity;
- if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) {
- float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
- this.prevRotationYaw = (this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D
- / Math.PI));
- this.prevRotationPitch = (this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI));
- }
- if (this.mTicksAlive++ == 3000) {
- setDead();
- }
- Block tBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if (tBlock.getMaterial() != Material.air) {
- tBlock.setBlockBoundsBasedOnState(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- AxisAlignedBB axisalignedbb = tBlock
- .getCollisionBoundingBoxFromPool(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if ((axisalignedbb != null)
- && (axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))) {
- this.inGround = true;
- }
- }
- if (this.arrowShake > 0) {
- this.arrowShake -= 1;
- }
- if (this.inGround) {
- int j = this.worldObj.getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- if ((tBlock != this.mHitBlock) || (j != this.mHitBlockMeta)) {
- this.inGround = false;
- this.motionX *= this.rand.nextFloat() * 0.2F;
- this.motionY *= this.rand.nextFloat() * 0.2F;
- this.motionZ *= this.rand.nextFloat() * 0.2F;
- this.mTicksAlive = 0;
- this.ticksInAir = 0;
- }
- } else {
- this.ticksInAir += 1;
- Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- Vec3 vec3 = Vec3
- .createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
- MovingObjectPosition tVector = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
- vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
- vec3 = Vec3
- .createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
- if (tVector != null) {
- vec3 = Vec3.createVectorHelper(tVector.hitVec.xCoord, tVector.hitVec.yCoord, tVector.hitVec.zCoord);
- }
- Entity tHitEntity = null;
- List<Entity> tAllPotentiallyHitEntities = this.worldObj.getEntitiesWithinAABBExcludingEntity(
- this,
- this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ)
- .expand(1.0D, 1.0D, 1.0D));
- double tLargestDistance = Double.MAX_VALUE;
- for (Entity potentiallyHitEntity : tAllPotentiallyHitEntities) {
- if ((potentiallyHitEntity.canBeCollidedWith())
- && ((potentiallyHitEntity != tShootingEntity) || (this.ticksInAir >= 5))) {
- AxisAlignedBB axisalignedbb1 = potentiallyHitEntity.boundingBox.expand(0.3D, 0.3D, 0.3D);
- MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
- if (movingobjectposition1 != null) {
- double tDistance = vec31.distanceTo(movingobjectposition1.hitVec);
- if (tDistance < tLargestDistance) {
- tHitEntity = potentiallyHitEntity;
- tLargestDistance = tDistance;
- }
- }
- }
- }
- if (tHitEntity != null) {
- tVector = new MovingObjectPosition(tHitEntity);
- }
- if ((tVector != null) && ((tVector.entityHit instanceof EntityPlayer entityplayer))) {
- if ((entityplayer.capabilities.disableDamage) || (((tShootingEntity instanceof EntityPlayer))
- && (!((EntityPlayer) tShootingEntity).canAttackPlayer(entityplayer)))) {
- tVector = null;
- }
- }
- if (tVector != null) {
- if (tVector.entityHit != null) {
- ItemData tData = GT_OreDictUnificator.getItemData(this.mArrow);
-
- float tMagicDamage = (tVector.entityHit instanceof EntityLivingBase)
- ? EnchantmentHelper
- .func_152377_a(this.mArrow, ((EntityLivingBase) tVector.entityHit).getCreatureAttribute())
- : 0.0F;
- float tDamage = MathHelper.ceiling_double_int(
- MathHelper.sqrt_double(
- this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ)
- * (getDamage()
- + ((tData != null) && (tData.mMaterial != null) && (tData.mMaterial.mMaterial != null)
- ? tData.mMaterial.mMaterial.mToolQuality / 2.0F - 1.0F
- : 0.0F)));
- if (getIsCritical()) {
- tDamage += this.rand.nextInt((int) (tDamage / 2.0D + 2.0D));
- }
- int tFireDamage = (isBurning() ? 5 : 0)
- + 4 * EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow);
- int tKnockback = this.mKnockback
- + EnchantmentHelper.getEnchantmentLevel(Enchantment.knockback.effectId, this.mArrow);
- int tHitTimer = -1;
-
- int[] tDamages = onHitEntity(
- tVector.entityHit,
- tShootingEntity == null ? this : tShootingEntity,
- this.mArrow == null ? new ItemStack(Items.arrow, 1) : this.mArrow,
- (int) (tDamage * 2.0F),
- (int) (tMagicDamage * 2.0F),
- tKnockback,
- tFireDamage,
- tHitTimer);
- if (tDamages != null) {
- tDamage = tDamages[0] / 2.0F;
- tMagicDamage = tDamages[1] / 2.0F;
- tKnockback = tDamages[2];
- tFireDamage = tDamages[3];
- tHitTimer = tDamages[4];
- if ((tFireDamage > 0) && (!(tVector.entityHit instanceof EntityEnderman))) {
- tVector.entityHit.setFire(tFireDamage);
- }
- if ((!(tHitEntity instanceof EntityPlayer))
- && (EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, this.mArrow) > 0)) {
- EntityPlayer tPlayer = null;
- if ((this.worldObj instanceof WorldServer)) {
- tPlayer = FakePlayerFactory.get(
- (WorldServer) this.worldObj,
- new GameProfile(
- new UUID(0L, 0L),
- (tShootingEntity instanceof EntityLivingBase)
- ? tShootingEntity.getCommandSenderName()
- : "Arrow"));
- }
- if (tPlayer != null) {
- tPlayer.inventory.currentItem = 0;
- tPlayer.inventory.setInventorySlotContents(0, getArrowItem());
- tShootingEntity = tPlayer;
- tPlayer.setDead();
- }
- }
- DamageSource tDamageSource = DamageSource
- .causeArrowDamage(this, tShootingEntity == null ? this : tShootingEntity);
- if ((tDamage + tMagicDamage > 0.0F)
- && (tVector.entityHit.attackEntityFrom(tDamageSource, tDamage + tMagicDamage))) {
- if ((tVector.entityHit instanceof EntityLivingBase tHitLivingEntity)) {
- if (tHitTimer >= 0) {
- tVector.entityHit.hurtResistantTime = tHitTimer;
- }
- if (((tVector.entityHit instanceof EntityCreeper)) && (EnchantmentHelper
- .getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 0)) {
- ((EntityCreeper) tVector.entityHit).func_146079_cb();
- }
- if (!this.worldObj.isRemote) {
- tHitLivingEntity
- .setArrowCountInEntity(tHitLivingEntity.getArrowCountInEntity() + 1);
- }
- if (tKnockback > 0) {
- float tKnockbackDivider = MathHelper
- .sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
- if (tKnockbackDivider > 0.0F) {
- tHitLivingEntity.addVelocity(
- this.motionX * tKnockback * 0.6000000238418579D / tKnockbackDivider,
- 0.1D,
- this.motionZ * tKnockback * 0.6000000238418579D / tKnockbackDivider);
- }
- }
- GT_Utility.GT_EnchantmentHelper.applyBullshitA(
- tHitLivingEntity,
- tShootingEntity == null ? this : tShootingEntity,
- this.mArrow);
- GT_Utility.GT_EnchantmentHelper.applyBullshitB(
- (tShootingEntity instanceof EntityLivingBase) ? (EntityLivingBase) tShootingEntity
- : null,
- tHitLivingEntity,
- this.mArrow);
- if ((tHitLivingEntity != tShootingEntity)
- && ((tHitLivingEntity instanceof EntityPlayer))
- && ((tShootingEntity instanceof EntityPlayerMP))) {
- ((EntityPlayerMP) tShootingEntity).playerNetServerHandler
- .sendPacket(new S2BPacketChangeGameState(6, 0.0F));
- }
- }
- if (((tShootingEntity instanceof EntityPlayer)) && (tMagicDamage > 0.0F)) {
- ((EntityPlayer) tShootingEntity).onEnchantmentCritical(tVector.entityHit);
- }
- if ((!(tVector.entityHit instanceof EntityEnderman))
- || (((EntityEnderman) tVector.entityHit).getActivePotionEffect(Potion.weakness)
- != null)) {
- if (tFireDamage > 0) {
- tVector.entityHit.setFire(tFireDamage);
- }
- playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
- setDead();
- }
- } else {
- this.motionX *= -0.1000000014901161D;
- this.motionY *= -0.1000000014901161D;
- this.motionZ *= -0.1000000014901161D;
- this.rotationYaw += 180.0F;
- this.prevRotationYaw += 180.0F;
- this.ticksInAir = 0;
- }
- }
- } else {
- this.mHitBlockX = tVector.blockX;
- this.mHitBlockY = tVector.blockY;
- this.mHitBlockZ = tVector.blockZ;
- this.mHitBlock = this.worldObj.getBlock(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.mHitBlockMeta = this.worldObj
- .getBlockMetadata(this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ);
- this.motionX = ((float) (tVector.hitVec.xCoord - this.posX));
- this.motionY = ((float) (tVector.hitVec.yCoord - this.posY));
- this.motionZ = ((float) (tVector.hitVec.zCoord - this.posZ));
- float f2 = MathHelper.sqrt_double(
- this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
- this.posX -= this.motionX / f2 * 0.0500000007450581D;
- this.posY -= this.motionY / f2 * 0.0500000007450581D;
- this.posZ -= this.motionZ / f2 * 0.0500000007450581D;
- playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
- this.inGround = true;
- this.arrowShake = 7;
- setIsCritical(false);
- if (this.mHitBlock.getMaterial() != Material.air) {
- this.mHitBlock.onEntityCollidedWithBlock(
- this.worldObj,
- this.mHitBlockX,
- this.mHitBlockY,
- this.mHitBlockZ,
- this);
- }
- if ((!this.worldObj.isRemote)
- && (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, this.mArrow) > 2)) {
- GT_Utility
- .setCoordsOnFire(this.worldObj, this.mHitBlockX, this.mHitBlockY, this.mHitBlockZ, true);
- }
- if (breaksOnImpact()) {
- setDead();
- }
- }
- }
- WorldSpawnedEventBuilder.ParticleEventBuilder events = new WorldSpawnedEventBuilder.ParticleEventBuilder()
- .setWorld(this.worldObj);
-
- if (getIsCritical()) {
- events.setIdentifier(ParticleFX.CRIT)
- .setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ).<WorldSpawnedEventBuilder
- .ParticleEventBuilder>times(
- 4,
- (x, i) -> x
- .setPosition(
- this.posX + this.motionX * i / 4.0D,
- this.posY + this.motionY * i / 4.0D,
- this.posZ + this.motionZ * i / 4.0D)
- .run());
- }
- this.posX += this.motionX;
- this.posY += this.motionY;
- this.posZ += this.motionZ;
-
- this.rotationYaw = ((float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI));
- for (this.rotationPitch = ((float) (Math
- .atan2(this.motionY, MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ))
- * 180.0D
- / Math.PI)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {}
- while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
- this.prevRotationPitch += 360.0F;
- }
- while (this.rotationYaw - this.prevRotationYaw < -180.0F) {
- this.prevRotationYaw -= 360.0F;
- }
- while (this.rotationYaw - this.prevRotationYaw >= 180.0F) {
- this.prevRotationYaw += 360.0F;
- }
- this.rotationPitch = (this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F);
- this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F);
- float tFrictionMultiplier = 0.99F;
- if (isInWater()) {
- events.setMotion(-this.motionX, -this.motionY + 0.2D, -this.motionZ)
- .setIdentifier(ParticleFX.BUBBLE)
- .setPosition(
- this.posX - this.motionX * 0.25D,
- this.posY - this.motionY * 0.25D,
- this.posZ - this.motionZ * 0.25D)
- .times(4, Runnable::run);
- tFrictionMultiplier = 0.8F;
- }
- if (isWet()) {
- extinguish();
- }
- this.motionX *= tFrictionMultiplier;
- this.motionY *= tFrictionMultiplier;
- this.motionZ *= tFrictionMultiplier;
- this.motionY -= 0.0500000007450581D;
- setPosition(this.posX, this.posY, this.posZ);
- func_145775_I();
- }
- }
-
- @Override
- public void writeEntityToNBT(NBTTagCompound aNBT) {
- super.writeEntityToNBT(aNBT);
- aNBT.setShort("xTile", (short) this.mHitBlockX);
- aNBT.setShort("yTile", (short) this.mHitBlockY);
- aNBT.setShort("zTile", (short) this.mHitBlockZ);
- aNBT.setShort("life", (short) this.mTicksAlive);
- aNBT.setByte("inTile", (byte) Block.getIdFromBlock(this.mHitBlock));
- aNBT.setByte("inData", (byte) this.mHitBlockMeta);
- aNBT.setByte("shake", (byte) this.arrowShake);
- aNBT.setByte("inGround", (byte) (this.inGround ? 1 : 0));
- aNBT.setByte("pickup", (byte) this.canBePickedUp);
- aNBT.setDouble("damage", getDamage());
- aNBT.setTag("mArrow", this.mArrow == null ? null : this.mArrow.writeToNBT(new NBTTagCompound()));
- }
-
- @Override
- public void readEntityFromNBT(NBTTagCompound aNBT) {
- super.readEntityFromNBT(aNBT);
- this.mHitBlockX = aNBT.getShort("xTile");
- this.mHitBlockY = aNBT.getShort("yTile");
- this.mHitBlockZ = aNBT.getShort("zTile");
- this.mTicksAlive = aNBT.getShort("life");
- this.mHitBlock = Block.getBlockById(aNBT.getByte("inTile") & 0xFF);
- this.mHitBlockMeta = (aNBT.getByte("inData") & 0xFF);
- this.arrowShake = (aNBT.getByte("shake") & 0xFF);
- this.inGround = (aNBT.getByte("inGround") == 1);
- setDamage(aNBT.getDouble("damage"));
- this.canBePickedUp = aNBT.getByte("pickup");
- this.mArrow = GT_Utility.loadItem(aNBT, "mArrow");
- }
-
- @Override
- public void onCollideWithPlayer(EntityPlayer aPlayer) {
- if ((!this.worldObj.isRemote) && (this.inGround)
- && (this.arrowShake <= 0)
- && (this.canBePickedUp == 1)
- && (aPlayer.inventory.addItemStackToInventory(getArrowItem()))) {
- playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
- aPlayer.onItemPickup(this, 1);
- setDead();
- }
- }
-
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage,
- int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
- return new int[] { aRegularDamage, aMagicDamage, aKnockback, aFireDamage, aHitTimer };
- }
-
- public ItemStack getArrowItem() {
- return GT_Utility.copyOrNull(this.mArrow);
- }
-
- public void setArrowItem(ItemStack aStack) {
- this.mArrow = GT_Utility.updateItemStack(GT_Utility.copyAmount(1, aStack));
- }
-
- public boolean breaksOnImpact() {
- return false;
- }
-
- @Override
- public void setKnockbackStrength(int aKnockback) {
- this.mKnockback = aKnockback;
- }
-}
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java
deleted file mode 100644
index 9b520831b6..0000000000
--- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package gregtech.common.entities;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.world.World;
-
-public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow {
-
- private int[] mPotions = new int[0];
-
- public GT_Entity_Arrow_Potion(World aWorld) {
- super(aWorld);
- }
-
- public GT_Entity_Arrow_Potion(World aWorld, double aX, double aY, double aZ) {
- super(aWorld, aX, aY, aZ);
- }
-
- public GT_Entity_Arrow_Potion(World aWorld, EntityLivingBase aEntity, float aSpeed) {
- super(aWorld, aEntity, aSpeed);
- }
-
- @Override
- public void writeEntityToNBT(NBTTagCompound aNBT) {
- super.writeEntityToNBT(aNBT);
- aNBT.setIntArray("mPotions", this.mPotions);
- }
-
- @Override
- public void readEntityFromNBT(NBTTagCompound aNBT) {
- super.readEntityFromNBT(aNBT);
- setPotions(aNBT.getIntArray("mPotions"));
- }
-
- @Override
- public boolean breaksOnImpact() {
- return true;
- }
-
- public int[] getPotions() {
- return this.mPotions;
- }
-
- public void setPotions(int... aPotions) {
- if (aPotions != null) {
- this.mPotions = aPotions;
- }
- }
-
- @Override
- public int[] onHitEntity(Entity aHitEntity, Entity aShootingEntity, ItemStack aArrow, int aRegularDamage,
- int aMagicDamage, int aKnockback, int aFireDamage, int aHitTimer) {
- if ((aHitEntity instanceof EntityLivingBase)) {
- for (int i = 3; i < this.mPotions.length; i += 4) {
- if (aHitEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
- ((EntityLivingBase) aHitEntity).addPotionEffect(
- new PotionEffect(
- this.mPotions[(i - 3)],
- this.mPotions[(i - 2)],
- this.mPotions[(i - 1)],
- false));
- }
- }
- }
- return super.onHitEntity(
- aHitEntity,
- aShootingEntity,
- aArrow,
- 1,
- aMagicDamage,
- aKnockback,
- aFireDamage,
- aHitTimer);
- }
-}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index 6b9ee54767..dbd6d7404b 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -52,33 +52,6 @@ import static gregtech.client.GT_TooltipHandler.Tier.UV;
import static gregtech.client.GT_TooltipHandler.Tier.UXV;
import static gregtech.client.GT_TooltipHandler.Tier.ZPM;
import static gregtech.client.GT_TooltipHandler.registerTieredTooltip;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Empty;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Holy_Water;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Poison;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Poison_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Poison_Strong;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Slowness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Slowness_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Weakness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Head_Glass_Weakness_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Empty;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Holy_Water;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Poison;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Poison_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Poison_Strong;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Slowness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Slowness_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Weakness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Plastic_Glass_Weakness_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Empty;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Holy_Water;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Poison;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Poison_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Poison_Strong;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Slowness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Slowness_Long;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Weakness;
-import static gregtech.common.items.ID_MetaItem_01.Arrow_Wooden_Glass_Weakness_Long;
import static gregtech.common.items.ID_MetaItem_01.Battery_Hull_HV;
import static gregtech.common.items.ID_MetaItem_01.Battery_Hull_LV;
import static gregtech.common.items.ID_MetaItem_01.Battery_Hull_MV;
@@ -520,7 +493,6 @@ import gregtech.common.covers.GT_Cover_Shutter;
import gregtech.common.covers.GT_Cover_SolarPanel;
import gregtech.common.covers.GT_Cover_SteamRegulator;
import gregtech.common.covers.GT_Cover_SteamValve;
-import gregtech.common.items.behaviors.Behaviour_Arrow_Potion;
import gregtech.common.items.behaviors.Behaviour_Cover_Tool;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
import gregtech.common.items.behaviors.Behaviour_DataStick;
@@ -698,216 +670,6 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.CompressedFireclay.set(addItem(Compressed_Fireclay.ID, "Compressed Fireclay", "Brick-shaped"));
ItemList.Firebrick.set(addItem(Firebrick.ID, "Firebrick", "Heat resistant"));
- ItemList.Arrow_Head_Glass_Emtpy.set(
- addItem(
- Arrow_Head_Glass_Empty.ID,
- "Empty Glass Arrow Head",
- "Fill with Potions before use",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)));
- ItemList.Arrow_Head_Glass_Poison.set(
- addItem(
- Arrow_Head_Glass_Poison.ID,
- "Poison Glass Arrow Head",
- "Glass Arrow filled with Poison",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Poison_Long.set(
- addItem(
- Arrow_Head_Glass_Poison_Long.ID,
- "Poison Glass Arrow Head",
- "Glass Arrow filled with stretched Poison",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Poison_Strong.set(
- addItem(
- Arrow_Head_Glass_Poison_Strong.ID,
- "Poison Glass Arrow Head",
- "Glass Arrow filled with strong Poison",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Slowness.set(
- addItem(
- Arrow_Head_Glass_Slowness.ID,
- "Slowness Glass Arrow Head",
- "Glass Arrow filled with Laming Brew",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Slowness_Long.set(
- addItem(
- Arrow_Head_Glass_Slowness_Long.ID,
- "Slowness Glass Arrow Head",
- "Glass Arrow filled with stretched Laming Brew",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Weakness.set(
- addItem(
- Arrow_Head_Glass_Weakness.ID,
- "Weakness Glass Arrow Head",
- "Glass Arrow filled with Weakening Brew",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Weakness_Long.set(
- addItem(
- Arrow_Head_Glass_Weakness_Long.ID,
- "Weakness Glass Arrow Head",
- "Glass Arrow filled with stretched Weakening Brew",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Head_Glass_Holy_Water.set(
- addItem(
- Arrow_Head_Glass_Holy_Water.ID,
- "Holy Water Glass Arrow Head",
- "Glass Arrow filled with Holy Water",
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)));
-
- ItemList.Arrow_Wooden_Glass_Emtpy.set(
- addItem(
- Arrow_Wooden_Glass_Empty.ID,
- "Regular Glass Vial Arrow",
- "Empty Glass Arrow",
- new Behaviour_Arrow_Potion(1.0F, 6.0F),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)));
- ItemList.Arrow_Wooden_Glass_Poison.set(
- addItem(
- Arrow_Wooden_Glass_Poison.ID,
- "Regular Poison Arrow",
- "Glass Arrow filled with Poison",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Poison_Long.set(
- addItem(
- Arrow_Wooden_Glass_Poison_Long.ID,
- "Regular Poison Arrow",
- "Glass Arrow filled with stretched Poison",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Poison_Strong.set(
- addItem(
- Arrow_Wooden_Glass_Poison_Strong.ID,
- "Regular Poison Arrow",
- "Glass Arrow filled with strong Poison",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.poison.id, 450, 1, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Slowness.set(
- addItem(
- Arrow_Wooden_Glass_Slowness.ID,
- "Regular Slowness Arrow",
- "Glass Arrow filled with Laming Brew",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Slowness_Long.set(
- addItem(
- Arrow_Wooden_Glass_Slowness_Long.ID,
- "Regular Slowness Arrow",
- "Glass Arrow filled with stretched Laming Brew",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Weakness.set(
- addItem(
- Arrow_Wooden_Glass_Weakness.ID,
- "Regular Weakness Arrow",
- "Glass Arrow filled with Weakening Brew",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Weakness_Long.set(
- addItem(
- Arrow_Wooden_Glass_Weakness_Long.ID,
- "Regular Weakness Arrow",
- "Glass Arrow filled with stretched Weakening Brew",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Potion.weakness.id, 1800, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Wooden_Glass_Holy_Water.set(
- addItem(
- Arrow_Wooden_Glass_Holy_Water.ID,
- "Regular Holy Water Arrow",
- "Glass Arrow filled with Holy Water",
- new Behaviour_Arrow_Potion(1.0F, 6.0F, Enchantment.smite, 10),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)));
-
- ItemList.Arrow_Plastic_Glass_Emtpy.set(
- addItem(
- Arrow_Plastic_Glass_Empty.ID,
- "Light Glass Vial Arrow",
- "Empty Glass Arrow",
- new Behaviour_Arrow_Potion(1.5F, 6.0F),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)));
- ItemList.Arrow_Plastic_Glass_Poison.set(
- addItem(
- Arrow_Plastic_Glass_Poison.ID,
- "Light Poison Arrow",
- "Glass Arrow filled with Poison",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Poison_Long.set(
- addItem(
- Arrow_Plastic_Glass_Poison_Long.ID,
- "Light Poison Arrow",
- "Glass Arrow filled with stretched Poison",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Poison_Strong.set(
- addItem(
- Arrow_Plastic_Glass_Poison_Strong.ID,
- "Light Poison Arrow",
- "Glass Arrow filled with strong Poison",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.poison.id, 450, 1, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Slowness.set(
- addItem(
- Arrow_Plastic_Glass_Slowness.ID,
- "Light Slowness Arrow",
- "Glass Arrow filled with Laming Brew",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Slowness_Long.set(
- addItem(
- Arrow_Plastic_Glass_Slowness_Long.ID,
- "Light Slowness Arrow",
- "Glass Arrow filled with stretched Laming Brew",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.moveSlowdown.id, 1800, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Weakness.set(
- addItem(
- Arrow_Plastic_Glass_Weakness.ID,
- "Light Weakness Arrow",
- "Glass Arrow filled with Weakening Brew",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 900, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Weakness_Long.set(
- addItem(
- Arrow_Plastic_Glass_Weakness_Long.ID,
- "Light Weakness Arrow",
- "Glass Arrow filled with stretched Weakening Brew",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Potion.weakness.id, 1800, 0, 100),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.VENENUM, 1L)));
- ItemList.Arrow_Plastic_Glass_Holy_Water.set(
- addItem(
- Arrow_Plastic_Glass_Holy_Water.ID,
- "Light Holy Water Arrow",
- "Glass Arrow filled with Holy Water",
- new Behaviour_Arrow_Potion(1.5F, 6.0F, Enchantment.smite, 10),
- new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 1L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.AURAM, 1L)));
-
ItemList.Shape_Empty.set(
addItem(
Shape_Empty.ID,
@@ -4744,117 +4506,6 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
new Object[] { "PSP", "PCP", "PBP", 'P', OrePrefixes.plate.get(Materials.Aluminium), 'S',
ItemList.Tool_DataStick.get(1L), 'C', ItemList.Cover_Screen.get(1L), 'B',
ItemList.Battery_RE_MV_Lithium.get(1L) });
-
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Emtpy.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Poison.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Poison_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Poison_Strong.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Slowness.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Slowness_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Weakness.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Weakness_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Wooden_Glass_Holy_Water.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Wood) });
-
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Emtpy.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Emtpy, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Poison.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Poison_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Poison_Strong.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Poison_Strong, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Slowness.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Slowness_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Slowness_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Weakness.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Weakness_Long.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Weakness_Long, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
- GT_ModHandler.addCraftingRecipe(
- ItemList.Arrow_Plastic_Glass_Holy_Water.get(1L),
- GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE
- | GT_ModHandler.RecipeBits.REVERSIBLE,
- new Object[] { aTextArrow, aTextStick, aTextFeather, 'A', ItemList.Arrow_Head_Glass_Holy_Water, 'F',
- OreDictNames.craftingFeather, 'S', OrePrefixes.stick.get(Materials.Plastic) });
-
}
private void craftingShapelessRecipes() {
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
index 3bfc99a18d..f7a2a37a2d 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
@@ -211,20 +211,16 @@ import static gregtech.common.items.ID_MetaItem_02.ThermosCan_Lait_au_cafe;
import static gregtech.common.items.ID_MetaItem_02.ThermosCan_Sweet_Tea;
import static gregtech.common.items.ID_MetaItem_02.ThermosCan_Tea;
-import net.minecraft.dispenser.IBlockSource;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
-import net.minecraft.world.World;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Dyes;
@@ -252,7 +248,6 @@ import gregtech.common.covers.redstone.GT_Cover_WirelessDoesWorkDetector;
import gregtech.common.covers.redstone.GT_Cover_WirelessFluidDetector;
import gregtech.common.covers.redstone.GT_Cover_WirelessItemDetector;
import gregtech.common.covers.redstone.GT_Cover_WirelessMaintenanceDetector;
-import gregtech.common.items.behaviors.Behaviour_Arrow;
import ic2.api.crops.CropCard;
import ic2.api.crops.Crops;
@@ -278,7 +273,7 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
OrePrefixes.toolHeadUniversalSpade,
OrePrefixes.toolHeadSense,
OrePrefixes.toolHeadPlow,
- OrePrefixes.toolHeadArrow,
+ OrePrefixes.___placeholder___,
OrePrefixes.toolHeadBuzzSaw,
OrePrefixes.turbineBlade,
null,
@@ -289,8 +284,8 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
OrePrefixes.stickLong,
OrePrefixes.springSmall,
OrePrefixes.spring,
- OrePrefixes.arrowGtWood,
- OrePrefixes.arrowGtPlastic,
+ OrePrefixes.___placeholder___,
+ OrePrefixes.___placeholder___,
OrePrefixes.gemChipped,
OrePrefixes.gemFlawed,
OrePrefixes.gemFlawless,
@@ -2424,13 +2419,6 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
@Override
public boolean onLeftClickEntity(ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
super.onLeftClickEntity(aStack, aPlayer, aEntity);
- int aDamage = aStack.getItemDamage();
- if ((aDamage >= 25000) && (aDamage < 27000)) {
- if (aDamage >= 26000) {
- return Behaviour_Arrow.DEFAULT_PLASTIC.onLeftClickEntity(this, aStack, aPlayer, aEntity);
- }
- return Behaviour_Arrow.DEFAULT_WOODEN.onLeftClickEntity(this, aStack, aPlayer, aEntity);
- }
return false;
}
@@ -2441,33 +2429,6 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
}
@Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY,
- double aZ) {
- int aDamage = aStack.getItemDamage();
- if ((aDamage >= 25000) && (aDamage < 27000)) {
- if (aDamage >= 26000) {
- return Behaviour_Arrow.DEFAULT_PLASTIC.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ);
- }
- return Behaviour_Arrow.DEFAULT_WOODEN.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ);
- }
- return super.getProjectile(aProjectileType, aStack, aWorld, aX, aY, aZ);
- }
-
- @Override
- public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity,
- float aSpeed) {
- int aDamage = aStack.getItemDamage();
- if ((aDamage >= 25000) && (aDamage < 27000)) {
- if (aDamage >= 26000) {
- return Behaviour_Arrow.DEFAULT_PLASTIC
- .getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed);
- }
- return Behaviour_Arrow.DEFAULT_WOODEN.getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed);
- }
- return super.getProjectile(aProjectileType, aStack, aWorld, aEntity, aSpeed);
- }
-
- @Override
public boolean isItemStackUsable(ItemStack aStack) {
int aDamage = aStack.getItemDamage();
Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)];
@@ -3045,18 +3006,6 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 {
}
@Override
- public ItemStack onDispense(IBlockSource aSource, ItemStack aStack) {
- int aDamage = aStack.getItemDamage();
- if ((aDamage >= 25000) && (aDamage < 27000)) {
- if (aDamage >= 26000) {
- return Behaviour_Arrow.DEFAULT_PLASTIC.onDispense(this, aSource, aStack);
- }
- return Behaviour_Arrow.DEFAULT_WOODEN.onDispense(this, aSource, aStack);
- }
- return super.onDispense(aSource, aStack);
- }
-
- @Override
public final ItemStack getContainerItem(ItemStack aStack) {
int aDamage = aStack.getItemDamage();
if (aDamage < 32000) {
diff --git a/src/main/java/gregtech/common/items/ID_MetaItem_01.java b/src/main/java/gregtech/common/items/ID_MetaItem_01.java
index f0af6f30f2..ba479f399c 100644
--- a/src/main/java/gregtech/common/items/ID_MetaItem_01.java
+++ b/src/main/java/gregtech/common/items/ID_MetaItem_01.java
@@ -57,33 +57,6 @@ public enum ID_MetaItem_01 {
Firebrick(111),
ZPM5(145),
ZPM6(146),
- Arrow_Head_Glass_Empty(200),
- Arrow_Head_Glass_Poison(201),
- Arrow_Head_Glass_Poison_Long(202),
- Arrow_Head_Glass_Poison_Strong(203),
- Arrow_Head_Glass_Slowness(204),
- Arrow_Head_Glass_Slowness_Long(205),
- Arrow_Head_Glass_Weakness(206),
- Arrow_Head_Glass_Weakness_Long(207),
- Arrow_Head_Glass_Holy_Water(208),
- Arrow_Wooden_Glass_Empty(225),
- Arrow_Wooden_Glass_Poison(226),
- Arrow_Wooden_Glass_Poison_Long(227),
- Arrow_Wooden_Glass_Poison_Strong(228),
- Arrow_Wooden_Glass_Slowness(229),
- Arrow_Wooden_Glass_Slowness_Long(230),
- Arrow_Wooden_Glass_Weakness(231),
- Arrow_Wooden_Glass_Weakness_Long(232),
- Arrow_Wooden_Glass_Holy_Water(233),
- Arrow_Plastic_Glass_Empty(250),
- Arrow_Plastic_Glass_Poison(251),
- Arrow_Plastic_Glass_Poison_Long(252),
- Arrow_Plastic_Glass_Poison_Strong(253),
- Arrow_Plastic_Glass_Slowness(254),
- Arrow_Plastic_Glass_Slowness_Long(255),
- Arrow_Plastic_Glass_Weakness(256),
- Arrow_Plastic_Glass_Weakness_Long(257),
- Arrow_Plastic_Glass_Holy_Water(258),
ItemFilter_Export(270),
ItemFilter_Import(271),
Cover_FluidLimiter(272),
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java
deleted file mode 100644
index 8005009d14..0000000000
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package gregtech.common.items.behaviors;
-
-import net.minecraft.block.BlockDispenser;
-import net.minecraft.dispenser.IBlockSource;
-import net.minecraft.dispenser.IPosition;
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.world.World;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.entities.GT_Entity_Arrow;
-
-public class Behaviour_Arrow extends Behaviour_None {
-
- public static Behaviour_Arrow DEFAULT_WOODEN = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.0F, 6.0F);
- public static Behaviour_Arrow DEFAULT_PLASTIC = new Behaviour_Arrow(GT_Entity_Arrow.class, 1.5F, 6.0F);
- private final int mLevel;
- private final Enchantment mEnchantment;
- private final float mSpeedMultiplier;
- private final float mPrecision;
- private final Class<? extends GT_Entity_Arrow> mArrow;
-
- public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision) {
- this(aArrow, aSpeed, aPrecision, null, 0);
- }
-
- public Behaviour_Arrow(Class<? extends GT_Entity_Arrow> aArrow, float aSpeed, float aPrecision,
- Enchantment aEnchantment, int aLevel) {
- this.mArrow = aArrow;
- this.mSpeedMultiplier = aSpeed;
- this.mPrecision = aPrecision;
- this.mEnchantment = aEnchantment;
- this.mLevel = aLevel;
- }
-
- @Override
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aEntity instanceof EntityLivingBase)) {
- GT_Utility.GT_EnchantmentHelper.applyBullshitA((EntityLivingBase) aEntity, aPlayer, aStack);
- GT_Utility.GT_EnchantmentHelper.applyBullshitB(aPlayer, aEntity, aStack);
- if (!aPlayer.capabilities.isCreativeMode) {
- aStack.stackSize -= 1;
- }
- if (aStack.stackSize <= 0) {
- aPlayer.destroyCurrentEquippedItem();
- }
- return false;
- }
- return false;
- }
-
- @Override
- public boolean isItemStackUsable(GT_MetaBase_Item aItem, ItemStack aStack) {
- if ((this.mEnchantment != null) && (this.mLevel > 0)) {
- NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack);
- if (!tNBT.getBoolean("GT.HasBeenUpdated")) {
- tNBT.setBoolean("GT.HasBeenUpdated", true);
- GT_Utility.ItemNBT.setNBT(aStack, tNBT);
- GT_Utility.ItemNBT.addEnchantment(aStack, this.mEnchantment, this.mLevel);
- }
- }
- return true;
- }
-
- @Override
- public boolean canDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- return true;
- }
-
- @Override
- public ItemStack onDispense(GT_MetaBase_Item aItem, IBlockSource aSource, ItemStack aStack) {
- World aWorld = aSource.getWorld();
- IPosition tPosition = BlockDispenser.func_149939_a(aSource);
- EnumFacing tFacing = BlockDispenser.func_149937_b(aSource.getBlockMetadata());
- GT_Entity_Arrow tEntityArrow = (GT_Entity_Arrow) getProjectile(
- aItem,
- SubTag.PROJECTILE_ARROW,
- aStack,
- aWorld,
- tPosition.getX(),
- tPosition.getY(),
- tPosition.getZ());
- if (tEntityArrow != null) {
- tEntityArrow.setThrowableHeading(
- tFacing.getFrontOffsetX(),
- tFacing.getFrontOffsetY() + 0.1F,
- tFacing.getFrontOffsetZ(),
- this.mSpeedMultiplier * 1.1F,
- this.mPrecision);
- tEntityArrow.setArrowItem(aStack);
- tEntityArrow.canBePickedUp = 1;
- aWorld.spawnEntityInWorld(tEntityArrow);
- if (aStack.stackSize < 100) {
- aStack.stackSize -= 1;
- }
- return aStack;
- }
- return super.onDispense(aItem, aSource, aStack);
- }
-
- @Override
- public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack) {
- return aProjectileType == SubTag.PROJECTILE_ARROW;
- }
-
- @Override
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld,
- double aX, double aY, double aZ) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility
- .callConstructor(this.mArrow.getName(), -1, null, true, new Object[] { aWorld, aX, aY, aZ });
- rArrow.setArrowItem(aStack);
- return rArrow;
- }
-
- @Override
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld,
- EntityLivingBase aEntity, float aSpeed) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow rArrow = (GT_Entity_Arrow) GT_Utility.callConstructor(
- this.mArrow.getName(),
- -1,
- null,
- true,
- new Object[] { aWorld, aEntity, this.mSpeedMultiplier * aSpeed });
- rArrow.setArrowItem(aStack);
- return rArrow;
- }
-}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java
deleted file mode 100644
index 3643de7b77..0000000000
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Arrow_Potion.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package gregtech.common.items.behaviors;
-
-import net.minecraft.enchantment.Enchantment;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.item.ItemStack;
-import net.minecraft.potion.PotionEffect;
-import net.minecraft.world.World;
-
-import gregtech.api.enums.SubTag;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.common.entities.GT_Entity_Arrow_Potion;
-
-public class Behaviour_Arrow_Potion extends Behaviour_Arrow {
-
- private final int[] mPotions;
-
- public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, int... aPotions) {
- super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision);
- this.mPotions = aPotions;
- }
-
- public Behaviour_Arrow_Potion(float aSpeed, float aPrecision, Enchantment aEnchantment, int aLevel,
- int... aPotions) {
- super(GT_Entity_Arrow_Potion.class, aSpeed, aPrecision, aEnchantment, aLevel);
- this.mPotions = aPotions;
- }
-
- @Override
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if ((aEntity instanceof EntityLivingBase)) {
- for (int i = 3; i < this.mPotions.length; i += 4) {
- if (aEntity.worldObj.rand.nextInt(100) < this.mPotions[i]) {
- ((EntityLivingBase) aEntity).addPotionEffect(
- new PotionEffect(
- this.mPotions[(i - 3)],
- this.mPotions[(i - 2)],
- this.mPotions[(i - 1)],
- false));
- }
- }
- }
- return super.onLeftClickEntity(aItem, aStack, aPlayer, aEntity);
- }
-
- @Override
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld,
- double aX, double aY, double aZ) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aX, aY, aZ);
- rArrow.setArrowItem(aStack);
- rArrow.setPotions(this.mPotions);
- return rArrow;
- }
-
- @Override
- public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld,
- EntityLivingBase aEntity, float aSpeed) {
- if (!hasProjectile(aItem, aProjectileType, aStack)) {
- return null;
- }
- GT_Entity_Arrow_Potion rArrow = new GT_Entity_Arrow_Potion(aWorld, aEntity, aSpeed);
- rArrow.setArrowItem(aStack);
- rArrow.setPotions(this.mPotions);
- return rArrow;
- }
-}
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java
deleted file mode 100644
index e72a79514e..0000000000
--- a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package gregtech.common.render;
-
-import net.minecraft.client.renderer.entity.RenderArrow;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.projectile.EntityArrow;
-import net.minecraft.util.ResourceLocation;
-
-import cpw.mods.fml.client.registry.RenderingRegistry;
-
-public class GT_Renderer_Entity_Arrow extends RenderArrow {
-
- private final ResourceLocation mTexture;
-
- public GT_Renderer_Entity_Arrow(Class<? extends EntityArrow> aArrowClass, String aTextureName) {
- this.mTexture = new ResourceLocation("gregtech:textures/entity/" + aTextureName + ".png");
- RenderingRegistry.registerEntityRenderingHandler(aArrowClass, this);
- }
-
- @Override
- protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
- return this.mTexture;
- }
-}