1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-03 21:37:28 +01:00

net.minecraft.world.level.storage.loot.predicates

This commit is contained in:
Jake Potrebic 2024-12-13 17:50:51 -08:00
parent 9ef230aa31
commit 5b0289a248
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5

View file

@ -1,12 +1,12 @@
--- a/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java
+++ b/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java
@@ -31,7 +31,8 @@
RandomSource randomsource = loottableinfo.getRandom();
float f = 1.0F / ofloat;
- return randomsource.nextFloat() <= f;
@@ -30,7 +_,8 @@
if (_float != null) {
RandomSource random = context.getRandom();
float f = 1.0F / _float;
- return random.nextFloat() <= f;
+ // CraftBukkit - <= to < to allow for plugins to completely disable block drops from explosions
+ return randomsource.nextFloat() < f;
+ return random.nextFloat() < f;
} else {
return true;
}