diff options
| author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-10 19:47:29 +0100 |
|---|---|---|
| committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2021-03-10 19:47:29 +0100 |
| commit | d006460e3e3f2221b82c03b02d282d5ed6767095 (patch) | |
| tree | 72e341a8cf3d7e13bc1e72ca6480dd5803a8133e /src/main/java/gregtech/common/entities | |
| parent | f03e907ac73d92bfaf5948e1cae7848675439497 (diff) | |
| download | GT5-Unofficial-d006460e3e3f2221b82c03b02d282d5ed6767095.tar.gz GT5-Unofficial-d006460e3e3f2221b82c03b02d282d5ed6767095.tar.bz2 GT5-Unofficial-d006460e3e3f2221b82c03b02d282d5ed6767095.zip | |
Implemented Requests
Diffstat (limited to 'src/main/java/gregtech/common/entities')
| -rw-r--r-- | src/main/java/gregtech/common/entities/GT_Entity_Arrow.java | 26 |
1 files changed, 12 insertions, 14 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 65fe475360..b9973e91fc 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -244,15 +244,11 @@ public class GT_Entity_Arrow extends EntityArrow { } PositionedWorldEvent<String> events = new PositionedWorldEvent<>(this.worldObj); if (getIsCritical()) { - events.setThing("crit"); - for (int i = 0; i < 4; i++) { - events.setPosition( - this.posX + this.motionX * i / 4.0D, - this.posY + this.motionY * i / 4.0D, - this.posZ + this.motionZ * i / 4.0D - ); - events.spawnParticle(-this.motionX, -this.motionY + 0.2D, -this.motionZ); - } + events.setThing("crit").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 + ).spawnParticle(-this.motionX, -this.motionY + 0.2D, -this.motionZ)); } this.posX += this.motionX; this.posY += this.motionY; @@ -274,11 +270,13 @@ public class GT_Entity_Arrow extends EntityArrow { this.rotationYaw = (this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F); float tFrictionMultiplier = 0.99F; if (isInWater()) { - events.setThing("bubble"); - events.setPosition(this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D); - for (int l = 0; l < 4; l++) { - events.spawnParticle(this.motionX, this.motionY, this.motionZ); - } + events.setThing("bubble") + .setPosition( + this.posX - this.motionX * 0.25D, + this.posY - this.motionY * 0.25D, + this.posZ - this.motionZ * 0.25D + ).times(4, x -> x.spawnParticle(this.motionX, this.motionY, this.motionZ)); + tFrictionMultiplier = 0.8F; } if (isWet()) { |
