9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2026-01-04 15:31:43 +00:00

Configure items that can that drop from explosions

This commit is contained in:
Samsuik
2025-04-11 22:21:15 +01:00
parent 352dfb2881
commit a6e391d6a7
8 changed files with 62 additions and 17 deletions

View File

@@ -436,7 +436,7 @@ index dd7e32b8b176c0f4c13e50aeed33c2c9ccba4b53..673e07e24c0cc0bc8301a15ca028c0bd
Vec3 minPosition = boundingBox.getMinPosition();
Vec3 vec31 = minPosition.subtract(vec3);
diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java
index 65d2b93a6ca6f18aae72627b7a21215eecdcc9c2..26cd9559013ca2bb17b98f2675e7c43f76519d8b 100644
index 323e91e494aef643ecd6f47c5b149a8e36a59dfb..ccf5470c26dee1431e2bd8fa8a90fb3770451807 100644
--- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java
@@ -409,6 +409,7 @@ public class ServerExplosion implements Explosion {
@@ -499,7 +499,7 @@ index 65d2b93a6ca6f18aae72627b7a21215eecdcc9c2..26cd9559013ca2bb17b98f2675e7c43f
if (squareRoot != 0.0) {
d1 /= squareRoot;
d2 /= squareRoot;
@@ -935,7 +957,7 @@ public class ServerExplosion implements Explosion {
@@ -942,7 +964,7 @@ public class ServerExplosion implements Explosion {
// Sakura start - replace density cache
float blockDensity = this.level.densityCache.getDensity(vec3d, entity);
if (blockDensity == me.samsuik.sakura.explosion.density.BlockDensityCache.UNKNOWN_DENSITY) {
@@ -508,7 +508,7 @@ index 65d2b93a6ca6f18aae72627b7a21215eecdcc9c2..26cd9559013ca2bb17b98f2675e7c43f
this.level.densityCache.putDensity(vec3d, entity, blockDensity);
// Sakura end - replace density cache
}
@@ -943,6 +965,16 @@ public class ServerExplosion implements Explosion {
@@ -950,6 +972,16 @@ public class ServerExplosion implements Explosion {
return blockDensity;
}