Skip to content

Commit e14000b

Browse files
committed
Fix BlockMechanic inaccuracy
1 parent c74b21f commit e14000b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/sucy/skill/dynamic/mechanic/BlockMechanic.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public boolean execute(LivingEntity caster, int level, List<LivingEntity> target
193193
for (double i = x - width; i <= x + width + 0.01; i++) {
194194
for (double j = y - height; j <= y + height + 0.01; j++) {
195195
for (double k = z - depth; k <= z + depth + 0.01; k++) {
196-
Block b = w.getBlockAt((int) (facingZ ? i : k), (int) j, (int) (facingZ ? k : i));
196+
Block b = w.getBlockAt((int) Math.floor(facingZ ? i : k), (int) Math.floor(j), (int) Math.floor(facingZ ? k : i));
197197
if ((!solid || b.getType().isSolid())
198198
&& (!air || b.getType() == Material.AIR)
199199
&& !SkillAPI.getSettings().getFilteredBlocks().contains(b.getType())) {

0 commit comments

Comments
 (0)