@@ -115,13 +115,6 @@ protected void execute() {
115115 newHitBox .add (newLocation );
116116
117117 Material oldMaterial = originalLocation .toBukkit (w ).getBlock ().getType ();
118- //prevent chests collision
119- if (Tags .CHESTS .contains (oldMaterial ) && !checkChests (oldMaterial , newLocation )) {
120- failed = true ;
121- failMessage = String .format (I18nSupport .getInternationalisedString ("Rotation - Craft is obstructed" ) + " @ %d,%d,%d" , newLocation .getX (), newLocation .getY (), newLocation .getZ ());
122- break ;
123- }
124-
125118 if (!withinWorldBorder (craft .getWorld (), newLocation )) {
126119 failMessage = I18nSupport .getInternationalisedString ("Rotation - Failed Craft cannot pass world border" ) + String .format (" @ %d,%d,%d" , newLocation .getX (), newLocation .getY (), newLocation .getZ ());
127120 failed = true ;
@@ -320,36 +313,6 @@ public boolean getIsSubCraft() {
320313 return isSubCraft ;
321314 }
322315
323- private boolean checkChests (Material mBlock , MovecraftLocation newLoc ) {
324- Material testMaterial ;
325- MovecraftLocation aroundNewLoc ;
326- final World world = craft .getWorld ();
327-
328- aroundNewLoc = newLoc .translate (1 , 0 , 0 );
329- testMaterial = world .getBlockAt (aroundNewLoc .getX (), aroundNewLoc .getY (), aroundNewLoc .getZ ()).getType ();
330- if (checkOldHitBox (testMaterial , mBlock , aroundNewLoc ))
331- return false ;
332-
333- aroundNewLoc = newLoc .translate (-1 , 0 , 0 );
334- testMaterial = world .getBlockAt (aroundNewLoc .getX (), aroundNewLoc .getY (), aroundNewLoc .getZ ()).getType ();
335- if (checkOldHitBox (testMaterial , mBlock , aroundNewLoc ))
336- return false ;
337-
338- aroundNewLoc = newLoc .translate (0 , 0 , 1 );
339- testMaterial = world .getBlockAt (aroundNewLoc .getX (), aroundNewLoc .getY (), aroundNewLoc .getZ ()).getType ();
340-
341- if (checkOldHitBox (testMaterial , mBlock , aroundNewLoc ))
342- return false ;
343-
344- aroundNewLoc = newLoc .translate (0 , 0 , -1 );
345- testMaterial = world .getBlockAt (aroundNewLoc .getX (), aroundNewLoc .getY (), aroundNewLoc .getZ ()).getType ();
346- return !checkOldHitBox (testMaterial , mBlock , aroundNewLoc );
347- }
348-
349- private boolean checkOldHitBox (Material testMaterial , Material mBlock , MovecraftLocation aroundNewLoc ) {
350- return testMaterial .equals (mBlock ) && !oldHitBox .contains (aroundNewLoc );
351- }
352-
353316 public MutableHitBox getNewHitBox () {
354317 return newHitBox ;
355318 }
0 commit comments