diff --git a/Movecraft/src/main/java/net/countercraft/movecraft/features/status/StatusManager.java b/Movecraft/src/main/java/net/countercraft/movecraft/features/status/StatusManager.java index 5a9068f01..533f84ece 100644 --- a/Movecraft/src/main/java/net/countercraft/movecraft/features/status/StatusManager.java +++ b/Movecraft/src/main/java/net/countercraft/movecraft/features/status/StatusManager.java @@ -130,25 +130,12 @@ public void onCraftStatusUpdate(@NotNull CraftStatusUpdateEvent e) { boolean sinking = false; boolean disabled = false; - Counter materials = craft.getDataTag(Craft.MATERIALS); int nonNegligibleBlocks = craft.getDataTag(Craft.NON_NEGLIGIBLE_BLOCKS); int nonNegligibleSolidBlocks = craft.getDataTag(Craft.NON_NEGLIGIBLE_SOLID_BLOCKS); // Build up counters of the fly and move blocks - Counter flyBlocks = new Counter<>(); - flyBlocks.putAll(craft.getType().getRequiredBlockProperty(CraftType.FLY_BLOCKS)); - Counter moveBlocks = new Counter<>(); - moveBlocks.putAll(craft.getType().getRequiredBlockProperty(CraftType.MOVE_BLOCKS)); - for (Material m : materials.getKeySet()) { - for (RequiredBlockEntry entry : flyBlocks.getKeySet()) { - if(entry.contains(m)) - flyBlocks.add(entry, materials.get(m)); - } - for (RequiredBlockEntry entry : moveBlocks.getKeySet()) { - if(entry.contains(m)) - moveBlocks.add(entry, materials.get(m)); - } - } + Counter flyBlocks = craft.getDataTag(Craft.FLYBLOCKS); + Counter moveBlocks = craft.getDataTag(Craft.MOVEBLOCKS); // now see if any of the resulting percentages are below the threshold specified in sinkPercent double sinkPercent = craft.getType().getDoubleProperty(CraftType.SINK_PERCENT) / 100.0;