mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 00:47:50 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
a7edf0e221
5 files changed
+18
-12
No files matched your search
@@ -72,7 +72,7 @@ public abstract class EntityAbilityBarrier extends EntityEnergyAbility {
|
||||
}
|
||||
|
||||
public boolean shouldReflect() {
|
||||
return reflectEnabled && useHealth && result == ProjectileHitResult.BLOCKED;
|
||||
return reflectEnabled && result == ProjectileHitResult.BLOCKED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public abstract class EntityAbilityBarrier extends EntityEnergyAbility {
|
||||
healthBefore,
|
||||
0.0f,
|
||||
0.0f,
|
||||
false,
|
||||
barrierData.reflect,
|
||||
barrierData.reflectStrengthPct,
|
||||
false
|
||||
);
|
||||
|
||||
@@ -186,13 +186,17 @@ public class EntityAbilityDome extends EntityAbilityBarrier {
|
||||
}
|
||||
}
|
||||
|
||||
double prevX = projectile.posX - projectile.motionX;
|
||||
double prevY = projectile.posY - projectile.motionY;
|
||||
double prevZ = projectile.posZ - projectile.motionZ;
|
||||
// Test the UPCOMING movement (this tick) so the barrier intercepts before
|
||||
// entity collision runs in updateProjectile(). Using the previous tick's
|
||||
// segment caused small domes to miss fast projectiles that could cross the
|
||||
// dome and hit the player in a single tick.
|
||||
double nextX = projectile.posX + projectile.motionX;
|
||||
double nextY = projectile.posY + projectile.motionY;
|
||||
double nextZ = projectile.posZ + projectile.motionZ;
|
||||
|
||||
return isIncomingRay(
|
||||
nextX, nextY, nextZ,
|
||||
projectile.posX, projectile.posY, projectile.posZ,
|
||||
prevX, prevY, prevZ,
|
||||
projectile.getOwnerEntityId());
|
||||
}
|
||||
|
||||
|
||||
@@ -340,13 +340,15 @@ public class EntityAbilityPanel extends EntityAbilityBarrier {
|
||||
}
|
||||
}
|
||||
|
||||
double prevX = projectile.posX - projectile.motionX;
|
||||
double prevY = projectile.posY - projectile.motionY;
|
||||
double prevZ = projectile.posZ - projectile.motionZ;
|
||||
// Test the UPCOMING movement so the barrier intercepts before entity
|
||||
// collision runs in updateProjectile().
|
||||
double nextX = projectile.posX + projectile.motionX;
|
||||
double nextY = projectile.posY + projectile.motionY;
|
||||
double nextZ = projectile.posZ + projectile.motionZ;
|
||||
|
||||
return isIncomingRay(
|
||||
nextX, nextY, nextZ,
|
||||
projectile.posX, projectile.posY, projectile.posZ,
|
||||
prevX, prevY, prevZ,
|
||||
projectile.getOwnerEntityId());
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.11-beta10")
|
||||
@Mod(modid = "customnpcs", name = "CustomNPC+", version = "1.11-beta11")
|
||||
public class CustomNpcs {
|
||||
|
||||
@SidedProxy(clientSide = "noppes.npcs.client.ClientProxy", serverSide = "noppes.npcs.CommonProxy")
|
||||
|
||||
Reference in new issue
Block a user