File tree Expand file tree Collapse file tree
Movecraft/src/main/java/net/countercraft/movecraft/features/status Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ private StatusUpdateTask(@NotNull Craft craft) {
9595
9696 Counter <RequiredBlockEntry > flyblocks = new Counter <>();
9797 Counter <RequiredBlockEntry > moveblocks = new Counter <>();
98+ for (RequiredBlockEntry entry : craft .getType ().getRequiredBlockProperty (CraftType .MOVE_BLOCKS )) {
99+ moveblocks .add (entry , 0 );
100+ }
98101 for (Material material : materials .getKeySet ()) {
99102 for (RequiredBlockEntry entry : craft .getType ().getRequiredBlockProperty (CraftType .FLY_BLOCKS )) {
100103 if (entry .contains (material )) {
@@ -143,9 +146,11 @@ public void onCraftStatusUpdate(@NotNull CraftStatusUpdateEvent e) {
143146 if (!entry .check (flyBlocks .get (entry ), nonNegligibleBlocks , sinkPercent ))
144147 sinking = true ;
145148 }
146- for (RequiredBlockEntry entry : moveBlocks .getKeySet ()) {
147- if (!entry .check (moveBlocks .get (entry ), nonNegligibleBlocks , sinkPercent ))
148- disabled = true ;
149+ if (craft .getType ().getRequiredBlockProperty (CraftType .MOVE_BLOCKS ).size () > 0 ) {
150+ for (RequiredBlockEntry entry : moveBlocks .getKeySet ()) {
151+ if (!entry .check (moveBlocks .get (entry ), nonNegligibleBlocks , sinkPercent ))
152+ disabled = true ;
153+ }
149154 }
150155
151156 // And check the OverallSinkPercent
You can’t perform that action at this time.
0 commit comments