mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 08:59:23 +00:00
Add old Blast Protection explosion knockback behavior (#346)
Added configurable old Blast Protection explosion knockback behavior that is from <=1.21.4 version.
This commit is contained in:
@@ -15,6 +15,7 @@ public class Knockback extends ConfigModules {
|
||||
public static boolean canPlayerKnockbackZombie = true;
|
||||
@Experimental
|
||||
public static boolean flushKnockback = false;
|
||||
public static boolean oldBlastProtectionKnockbackBehavior = false;
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
@@ -34,5 +35,6 @@ public class Knockback extends ConfigModules {
|
||||
"使玩家可以击退僵尸."
|
||||
));
|
||||
flushKnockback = config.getBoolean(getBasePath() + ".flush-location-while-knockback-player", flushKnockback);
|
||||
oldBlastProtectionKnockbackBehavior = config.getBoolean(getBasePath() + ".old-blast-protection-explosion-knockback", oldBlastProtectionKnockbackBehavior);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public final class BlockPosIterator extends AbstractIterator<BlockPos> {
|
||||
Vec3 movement = vec.scale(toTravel);
|
||||
AABB fromBB = boundingBox.move(-vec.x, -vec.y, -vec.z);
|
||||
AABB searchArea = fromBB.expandTowards(movement);
|
||||
return org.dreeam.leaf.util.map.BlockPosIterator.iterable(searchArea);
|
||||
return iterable(searchArea);
|
||||
}
|
||||
|
||||
public BlockPosIterator(AABB bb) {
|
||||
|
||||
Reference in New Issue
Block a user