diff options
| author | Martin Robertz <dream-master@gmx.net> | 2021-05-24 16:45:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 16:45:15 +0200 |
| commit | 12582fb1cec74a5d05a1adfedc1eb04e4f7409c1 (patch) | |
| tree | 18ebd936b02506772cd2004d0c893d8dcecb1cad /src/main/java/gregtech/common/entities | |
| parent | c39086946112174b81612e7fd96a2ce0ad056620 (diff) | |
| parent | a4e104881944bbc03eddeacb24a6b7bd94cc53ce (diff) | |
| download | GT5-Unofficial-12582fb1cec74a5d05a1adfedc1eb04e4f7409c1.tar.gz GT5-Unofficial-12582fb1cec74a5d05a1adfedc1eb04e4f7409c1.tar.bz2 GT5-Unofficial-12582fb1cec74a5d05a1adfedc1eb04e4f7409c1.zip | |
Merge pull request #546 from GTNewHorizons/glow-texture
fix(render): grass block top grey in inventory
Diffstat (limited to 'src/main/java/gregtech/common/entities')
| -rw-r--r-- | src/main/java/gregtech/common/entities/GT_Entity_Arrow.java | 5 | ||||
| -rw-r--r-- | src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java index 2983a6580c..b7c87b4860 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -62,6 +62,7 @@ public class GT_Entity_Arrow extends EntityArrow { setArrowItem(aStack); } + @Override public void onUpdate() { onEntityUpdate(); if ((this.mArrow == null) && (!this.worldObj.isRemote)) { @@ -298,6 +299,7 @@ public class GT_Entity_Arrow extends EntityArrow { } } + @Override public void writeEntityToNBT(NBTTagCompound aNBT) { super.writeEntityToNBT(aNBT); aNBT.setShort("xTile", (short) this.mHitBlockX); @@ -313,6 +315,7 @@ public class GT_Entity_Arrow extends EntityArrow { 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"); @@ -328,6 +331,7 @@ public class GT_Entity_Arrow extends EntityArrow { 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); @@ -352,6 +356,7 @@ public class GT_Entity_Arrow extends EntityArrow { 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 index 37cdf2643a..ccf645bf1c 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow_Potion.java @@ -22,16 +22,19 @@ public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { 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; } @@ -46,6 +49,7 @@ public class GT_Entity_Arrow_Potion extends GT_Entity_Arrow { } } + @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) { |
