package mapped;

import java.util.ArrayList;
import java.util.List;
import net.runelite.api.DecorativeObject;
import net.runelite.api.GameState;
import net.runelite.api.GroundObject;
import net.runelite.api.Point;
import net.runelite.api.WallObject;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.DecorativeObjectChanged;
import net.runelite.api.events.DecorativeObjectDespawned;
import net.runelite.api.events.DecorativeObjectSpawned;
import net.runelite.api.events.GameObjectChanged;
import net.runelite.api.events.GameObjectDespawned;
import net.runelite.api.events.GameObjectSpawned;
import net.runelite.api.events.GroundObjectChanged;
import net.runelite.api.events.GroundObjectDespawned;
import net.runelite.api.events.GroundObjectSpawned;
import net.runelite.api.events.ItemDespawned;
import net.runelite.api.events.ItemSpawned;
import net.runelite.api.events.WallObjectChanged;
import net.runelite.api.events.WallObjectDespawned;
import net.runelite.api.events.WallObjectSpawned;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSActor;
import net.runelite.rs.api.RSBoundaryObject;
import net.runelite.rs.api.RSCollisionMap;
import net.runelite.rs.api.RSFloorDecoration;
import net.runelite.rs.api.RSGameObject;
import net.runelite.rs.api.RSGraphicsObject;
import net.runelite.rs.api.RSItemLayer;
import net.runelite.rs.api.RSNode;
import net.runelite.rs.api.RSNodeDeque;
import net.runelite.rs.api.RSProjectile;
import net.runelite.rs.api.RSRenderable;
import net.runelite.rs.api.RSTile;
import net.runelite.rs.api.RSTileItem;
import net.runelite.rs.api.RSWallDecoration;
import org.slf4j.Logger;

@ObfuscatedName("kv")
public final class Tile extends Node implements RSTile {
   public static RSNodeDeque[][][] lastGroundItems;
   @ObfuscatedName("at")
   @ObfuscatedGetter(
      intValue = -1542161315
   )
   int plane;
   @ObfuscatedName("ah")
   @ObfuscatedGetter(
      intValue = -794250693
   )
   int x;
   @ObfuscatedName("ar")
   @ObfuscatedGetter(
      intValue = -953310759
   )
   int y;
   @ObfuscatedName("ao")
   @ObfuscatedGetter(
      intValue = 1305070591
   )
   int originalPlane;
   @ObfuscatedName("ab")
   @ObfuscatedSignature(
      descriptor = "Lke;"
   )
   SceneTilePaint paint;
   @ObfuscatedName("au")
   @ObfuscatedSignature(
      descriptor = "Lkl;"
   )
   SceneTileModel model;
   @ObfuscatedName("aa")
   @ObfuscatedSignature(
      descriptor = "Llv;"
   )
   BoundaryObject boundaryObject;
   @ObfuscatedName("ac")
   @ObfuscatedSignature(
      descriptor = "Llj;"
   )
   WallDecoration wallDecoration;
   @ObfuscatedName("al")
   @ObfuscatedSignature(
      descriptor = "Lkm;"
   )
   FloorDecoration floorDecoration;
   @ObfuscatedName("az")
   @ObfuscatedSignature(
      descriptor = "Lkj;"
   )
   ItemLayer itemLayer;
   @ObfuscatedName("ap")
   @ObfuscatedGetter(
      intValue = 740733941
   )
   int gameObjectsCount;
   @ObfuscatedName("av")
   @ObfuscatedSignature(
      descriptor = "[Lle;"
   )
   GameObject[] gameObjects;
   @ObfuscatedName("ax")
   int[] gameObjectEdgeMasks;
   @ObfuscatedName("as")
   @ObfuscatedGetter(
      intValue = -227378737
   )
   int gameObjectsEdgeMask;
   @ObfuscatedName("ay")
   @ObfuscatedGetter(
      intValue = -1756345945
   )
   int minPlane;
   @ObfuscatedName("ak")
   boolean drawPrimary;
   @ObfuscatedName("aj")
   boolean drawSecondary;
   @ObfuscatedName("am")
   boolean drawGameObjects;
   @ObfuscatedName("aq")
   @ObfuscatedGetter(
      intValue = -321826469
   )
   int drawGameObjectEdges;
   @ObfuscatedName("ai")
   @ObfuscatedGetter(
      intValue = -675199519
   )
   int field2760;
   @ObfuscatedName("aw")
   @ObfuscatedGetter(
      intValue = 84209581
   )
   int field2747;
   @ObfuscatedName("ae")
   @ObfuscatedGetter(
      intValue = -2116343905
   )
   int field2762;
   @ObfuscatedName("an")
   @ObfuscatedSignature(
      descriptor = "Lkv;"
   )
   Tile linkedBelowTile;
   public WallObject previousWallObject;
   public DecorativeObject previousDecorativeObject;
   public GroundObject previousGroundObject;
   public RSGameObject[] previousGameObjects;

   static {
      lastGroundItems = new RSNodeDeque[4][104][104];
   }

   Tile(int var1, int var2, int var3) {
      this.gameObjects = new GameObject[5];
      this.gameObjectsChanged(-1);
      this.gameObjectEdgeMasks = new int[5];
      this.gameObjectsEdgeMask = 0;
      this.originalPlane = this.plane = var1;
      this.x = var2;
      this.y = var3;
   }

   public int getPlane() {
      return this.plane;
   }

   public net.runelite.api.ItemLayer getItemLayer() {
      return this.itemLayer;
   }

   public int getX() {
      return this.x;
   }

   public WallObject getWallObject() {
      return this.boundaryObject;
   }

   public DecorativeObject getDecorativeObject() {
      return this.wallDecoration;
   }

   public GroundObject getGroundObject() {
      return this.floorDecoration;
   }

   public int getY() {
      return this.y;
   }

   public void gameObjectsChanged(int var1) {
      if(var1 != -1) {
         if(this.previousGameObjects == null) {
            this.previousGameObjects = new GameObject[5];
         }

         RSGameObject var2 = this.previousGameObjects[var1];
         RSGameObject var3 = (RSGameObject)this.getGameObjects()[var1];
         this.previousGameObjects[var1] = var3;
         if(var3 != null) {
            int var4 = this.getRenderLevel();
            if((SpriteMask.client.getTileSettings()[1][this.getX()][this.getY()] & 2) == 2) {
               --var4;
            }

            var3.setPlane(var4);
         }

         if(var3 != var2) {
            boolean var8 = false;
            boolean var5 = false;
            RSRenderable var6;
            if(var3 != null) {
               var6 = var3.getRenderable();
               var8 = var6 instanceof RSActor || var6 instanceof RSProjectile || var6 instanceof RSGraphicsObject;
               var8 |= var3.getStartX() != this.getX() || var3.getStartY() != this.getY();
            }

            if(var2 != null) {
               var6 = var2.getRenderable();
               var5 = var6 instanceof RSActor || var6 instanceof RSProjectile || var6 instanceof RSGraphicsObject;
               var5 |= var2.getStartX() != this.getX() || var2.getStartY() != this.getY();
            }

            Logger var9 = SpriteMask.client.getLogger();
            if(var3 == null) {
               if(var5) {
                  return;
               }

               var9.trace("Game object despawn: {}", Integer.valueOf(var2.getId()));
               GameObjectDespawned var7 = new GameObjectDespawned();
               var7.setTile(this);
               var7.setGameObject(var2);
               SpriteMask.client.getCallbacks().post(var7);
            } else if(var2 == null) {
               if(var8) {
                  return;
               }

               var9.trace("Game object spawn: {}", Integer.valueOf(var3.getId()));
               GameObjectSpawned var10 = new GameObjectSpawned();
               var10.setTile(this);
               var10.setGameObject(var3);
               SpriteMask.client.getCallbacks().post(var10);
            } else {
               if(var8 && var5) {
                  return;
               }

               var9.trace("Game object change: {} -> {}", Integer.valueOf(var2.getId()), Integer.valueOf(var3.getId()));
               GameObjectChanged var11 = new GameObjectChanged();
               var11.setTile(this);
               var11.setPrevious(var2);
               var11.setGameObject(var3);
               SpriteMask.client.getCallbacks().post(var11);
            }

         }
      }
   }

   public net.runelite.api.GameObject[] getGameObjects() {
      return this.gameObjects;
   }

   public int getRenderLevel() {
      return this.originalPlane;
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public void itemLayerChanged(int var1) {
      int var2 = this.getX();
      int var3 = this.getY();
      int var4 = SpriteMask.client.getPlane();
      RSNodeDeque[][][] var5 = SpriteMask.client.getGroundItemDeque();
      RSNodeDeque var6 = lastGroundItems[var4][var2][var3];
      RSNodeDeque var7 = var5[var4][var2][var3];
      if(SpriteMask.client.getGameState() != GameState.LOGGED_IN) {
         lastGroundItems[var4][var2][var3] = var7;
         SpriteMask.client.setLastItemDespawn((RSTileItem)null);
      } else {
         if(var6 != var7) {
            if(var6 != null) {
               RSNode var8 = var6.getSentinel();

               for(RSNode var9 = var8.getNext(); var9 != var8; var9 = var9.getNext()) {
                  RSTileItem var10 = (RSTileItem)var9;
                  ItemDespawned var11 = new ItemDespawned(this, var10);
                  SpriteMask.client.getCallbacks().post(var11);
               }
            }

            lastGroundItems[var4][var2][var3] = var7;
         }

         RSTileItem var21 = SpriteMask.client.getLastItemDespawn();
         if(var21 != null) {
            SpriteMask.client.setLastItemDespawn((RSTileItem)null);
         }

         RSItemLayer var22 = (RSItemLayer)this.getItemLayer();
         ItemDespawned var16;
         if(var22 == null) {
            if(var21 != null) {
               var16 = new ItemDespawned(this, var21);
               SpriteMask.client.getCallbacks().post(var16);
            }

         } else if(var7 == null) {
            if(var21 != null) {
               var16 = new ItemDespawned(this, var21);
               SpriteMask.client.getCallbacks().post(var16);
            }

         } else {
            RSNode var15 = var7.getSentinel();
            RSTileItem var17 = null;
            RSNode var12 = var15.getPrevious();
            if(var15 != var12) {
               RSTileItem var13 = (RSTileItem)var12;
               if(var2 != var13.getX() || var3 != var13.getY()) {
                  var17 = var13;
               }
            }

            RSNode var18 = var15.getNext();
            if(var17 == null && var15 != var18) {
               RSTileItem var14 = (RSTileItem)var18;
               if(var2 != var14.getX() || var3 != var14.getY()) {
                  var17 = var14;
               }
            }

            if(var21 != null && var21 != var12 && var21 != var18) {
               ItemDespawned var19 = new ItemDespawned(this, var21);
               SpriteMask.client.getCallbacks().post(var19);
            }

            if(var17 != null) {
               var17.setX(var2);
               var17.setY(var3);
               ItemSpawned var20 = new ItemSpawned(this, var17);
               SpriteMask.client.getCallbacks().post(var20);
            }

         }
      }
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public void wallObjectChanged(int var1) {
      WallObject var2 = this.previousWallObject;
      RSBoundaryObject var3 = (RSBoundaryObject)this.getWallObject();
      this.previousWallObject = var3;
      if(var3 != null) {
         int var4 = this.getRenderLevel();
         if((SpriteMask.client.getTileSettings()[1][this.getX()][this.getY()] & 2) == 2) {
            --var4;
         }

         var3.setPlane(var4);
      }

      if(var3 == null && var2 != null) {
         WallObjectDespawned var7 = new WallObjectDespawned();
         var7.setTile(this);
         var7.setWallObject(var2);
         SpriteMask.client.getCallbacks().post(var7);
      } else if(var3 != null && var2 == null) {
         WallObjectSpawned var6 = new WallObjectSpawned();
         var6.setTile(this);
         var6.setWallObject(var3);
         SpriteMask.client.getCallbacks().post(var6);
      } else if(var3 != null) {
         WallObjectChanged var5 = new WallObjectChanged();
         var5.setTile(this);
         var5.setPrevious(var2);
         var5.setWallObject(var3);
         SpriteMask.client.getCallbacks().post(var5);
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public void groundObjectChanged(int var1) {
      GroundObject var2 = this.previousGroundObject;
      RSFloorDecoration var3 = (RSFloorDecoration)this.getGroundObject();
      this.previousGroundObject = var3;
      if(var3 != null) {
         int var4 = this.getRenderLevel();
         if((SpriteMask.client.getTileSettings()[1][this.getX()][this.getY()] & 2) == 2) {
            --var4;
         }

         var3.setPlane(var4);
      }

      if(var3 == null && var2 != null) {
         GroundObjectDespawned var7 = new GroundObjectDespawned();
         var7.setTile(this);
         var7.setGroundObject(var2);
         SpriteMask.client.getCallbacks().post(var7);
      } else if(var3 != null && var2 == null) {
         GroundObjectSpawned var6 = new GroundObjectSpawned();
         var6.setTile(this);
         var6.setGroundObject(var3);
         SpriteMask.client.getCallbacks().post(var6);
      } else if(var3 != null) {
         GroundObjectChanged var5 = new GroundObjectChanged();
         var5.setTile(this);
         var5.setPrevious(var2);
         var5.setGroundObject(var3);
         SpriteMask.client.getCallbacks().post(var5);
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public void decorativeObjectChanged(int var1) {
      DecorativeObject var2 = this.previousDecorativeObject;
      RSWallDecoration var3 = (RSWallDecoration)this.getDecorativeObject();
      this.previousDecorativeObject = var3;
      if(var3 != null) {
         int var4 = this.getRenderLevel();
         if((SpriteMask.client.getTileSettings()[1][this.getX()][this.getY()] & 2) == 2) {
            --var4;
         }

         var3.setPlane(var4);
      }

      if(var3 == null && var2 != null) {
         DecorativeObjectDespawned var7 = new DecorativeObjectDespawned();
         var7.setTile(this);
         var7.setDecorativeObject(var2);
         SpriteMask.client.getCallbacks().post(var7);
      } else if(var3 != null && var2 == null) {
         DecorativeObjectSpawned var6 = new DecorativeObjectSpawned();
         var6.setTile(this);
         var6.setDecorativeObject(var3);
         SpriteMask.client.getCallbacks().post(var6);
      } else if(var3 != null) {
         DecorativeObjectChanged var5 = new DecorativeObjectChanged();
         var5.setTile(this);
         var5.setPrevious(var2);
         var5.setDecorativeObject(var3);
         SpriteMask.client.getCallbacks().post(var5);
      }

   }

   public Point getSceneLocation() {
      return new Point(this.getX(), this.getY());
   }

   public WorldPoint getWorldLocation() {
      return WorldPoint.fromScene(SpriteMask.client, this.getX(), this.getY(), this.getPlane());
   }

   public LocalPoint getLocalLocation() {
      return LocalPoint.fromScene(this.getX(), this.getY());
   }

   public List pathTo(net.runelite.api.Tile var1) {
      int var2 = this.getPlane();
      if(var2 != var1.getPlane()) {
         return null;
      } else {
         RSCollisionMap[] var3 = SpriteMask.client.getCollisionMaps();
         if(var3 == null) {
            return null;
         } else {
            int[][] var4 = new int[128][128];
            int[][] var5 = new int[128][128];
            int[] var6 = new int[4096];
            int[] var7 = new int[4096];

            for(int var8 = 0; var8 < 128; ++var8) {
               for(int var9 = 0; var9 < 128; ++var9) {
                  var4[var8][var9] = 0;
                  var5[var8][var9] = Integer.MAX_VALUE;
               }
            }

            Point var32 = this.getSceneLocation();
            Point var33 = var1.getSceneLocation();
            int var10 = var32.getX();
            int var11 = var32.getY();
            int var12 = var10;
            int var13 = var11;
            byte var14 = 64;
            byte var15 = 64;
            var4[var14][var15] = 99;
            var5[var14][var15] = 0;
            int var16 = 0;
            var6[0] = var10;
            int var17 = 1;
            var7[0] = var11;
            int[][] var18 = var3[var2].getFlags();
            boolean var19 = false;

            int var20;
            int var21;
            int var22;
            while(var16 != var17) {
               var12 = var6[var16];
               var13 = var7[var16];
               var16 = var16 + 1 & 4095;
               var20 = var14 + (var12 - var10);
               var21 = var15 + (var13 - var11);
               if(var12 == var33.getX() && var13 == var33.getY()) {
                  var19 = true;
                  break;
               }

               var22 = var5[var20][var21] + 1;
               if(var20 > 0 && var4[var20 - 1][var21] == 0 && (var18[var12 - 1][var13] & 19136776) == 0) {
                  var6[var17] = var12 - 1;
                  var7[var17] = var13;
                  var17 = var17 + 1 & 4095;
                  var4[var20 - 1][var21] = 2;
                  var5[var20 - 1][var21] = var22;
               }

               if(var20 < 127 && var4[var20 + 1][var21] == 0 && (var18[var12 + 1][var13] & 19136896) == 0) {
                  var6[var17] = var12 + 1;
                  var7[var17] = var13;
                  var17 = var17 + 1 & 4095;
                  var4[var20 + 1][var21] = 8;
                  var5[var20 + 1][var21] = var22;
               }

               if(var21 > 0 && var4[var20][var21 - 1] == 0 && (var18[var12][var13 - 1] & 19136770) == 0) {
                  var6[var17] = var12;
                  var7[var17] = var13 - 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20][var21 - 1] = 1;
                  var5[var20][var21 - 1] = var22;
               }

               if(var21 < 127 && var4[var20][var21 + 1] == 0 && (var18[var12][var13 + 1] & 19136800) == 0) {
                  var6[var17] = var12;
                  var7[var17] = var13 + 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20][var21 + 1] = 4;
                  var5[var20][var21 + 1] = var22;
               }

               if(var20 > 0 && var21 > 0 && var4[var20 - 1][var21 - 1] == 0 && (var18[var12 - 1][var13 - 1] & 19136782) == 0 && (var18[var12 - 1][var13] & 19136776) == 0 && (var18[var12][var13 - 1] & 19136770) == 0) {
                  var6[var17] = var12 - 1;
                  var7[var17] = var13 - 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20 - 1][var21 - 1] = 3;
                  var5[var20 - 1][var21 - 1] = var22;
               }

               if(var20 < 127 && var21 > 0 && var4[var20 + 1][var21 - 1] == 0 && (var18[var12 + 1][var13 - 1] & 19136899) == 0 && (var18[var12 + 1][var13] & 19136896) == 0 && (var18[var12][var13 - 1] & 19136770) == 0) {
                  var6[var17] = var12 + 1;
                  var7[var17] = var13 - 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20 + 1][var21 - 1] = 9;
                  var5[var20 + 1][var21 - 1] = var22;
               }

               if(var20 > 0 && var21 < 127 && var4[var20 - 1][var21 + 1] == 0 && (var18[var12 - 1][var13 + 1] & 19136824) == 0 && (var18[var12 - 1][var13] & 19136776) == 0 && (var18[var12][var13 + 1] & 19136800) == 0) {
                  var6[var17] = var12 - 1;
                  var7[var17] = var13 + 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20 - 1][var21 + 1] = 6;
                  var5[var20 - 1][var21 + 1] = var22;
               }

               if(var20 < 127 && var21 < 127 && var4[var20 + 1][var21 + 1] == 0 && (var18[var12 + 1][var13 + 1] & 19136992) == 0 && (var18[var12 + 1][var13] & 19136896) == 0 && (var18[var12][var13 + 1] & 19136800) == 0) {
                  var6[var17] = var12 + 1;
                  var7[var17] = var13 + 1;
                  var17 = var17 + 1 & 4095;
                  var4[var20 + 1][var21 + 1] = 12;
                  var5[var20 + 1][var21 + 1] = var22;
               }
            }

            int var23;
            if(!var19) {
               var20 = Integer.MAX_VALUE;
               var21 = Integer.MAX_VALUE;
               byte var36 = 10;
               var23 = var33.getX();
               int var24 = var33.getY();

               for(int var25 = var23 - var36; var25 <= var36 + var23; ++var25) {
                  for(int var26 = var24 - var36; var26 <= var36 + var24; ++var26) {
                     int var27 = var14 + (var25 - var10);
                     int var28 = var15 + (var26 - var11);
                     if(var27 >= 0 && var28 >= 0 && var27 < 128 && var28 < 128 && var5[var27][var28] < 100) {
                        int var29 = 0;
                        if(var25 < var23) {
                           var29 = var23 - var25;
                        } else if(var25 > var23) {
                           var29 = var25 - var23;
                        }

                        int var30 = 0;
                        if(var26 < var24) {
                           var30 = var24 - var26;
                        } else if(var26 > var24) {
                           var30 = var26 - var24;
                        }

                        int var31 = var29 * var29 + var30 * var30;
                        if(var31 < var20 || var31 == var20 && var5[var27][var28] < var21) {
                           var20 = var31;
                           var21 = var5[var27][var28];
                           var12 = var25;
                           var13 = var26;
                        }
                     }
                  }
               }

               if(var20 == Integer.MAX_VALUE) {
                  return null;
               }
            }

            var6[0] = var12;
            var7[0] = var13;
            var20 = 1;

            for(var21 = var22 = var4[var14 + (var12 - var10)][var15 + (var13 - var11)]; var32.getX() != var12 || var32.getY() != var13; var21 = var4[var14 + (var12 - var10)][var15 + (var13 - var11)]) {
               if(var21 != var22) {
                  var22 = var21;
                  var6[var20] = var12;
                  var7[var20++] = var13;
               }

               if((var21 & 2) != 0) {
                  ++var12;
               } else if((var21 & 8) != 0) {
                  --var12;
               }

               if((var21 & 1) != 0) {
                  ++var13;
               } else if((var21 & 4) != 0) {
                  --var13;
               }
            }

            var23 = 1;
            RSTile[][][] var34 = SpriteMask.client.getScene().getTiles();

            ArrayList var35;
            for(var35 = new ArrayList(); var20-- > 0; ++var23) {
               var35.add(var34[this.getPlane()][var6[var20]][var7[var20]]);
               if(var23 == 25) {
                  break;
               }
            }

            return var35;
         }
      }
   }

   public List getGroundItems() {
      net.runelite.api.ItemLayer var1 = this.getItemLayer();
      if(var1 == null) {
         return null;
      } else {
         ArrayList var2 = new ArrayList();

         for(Object var3 = var1.getTop(); var3 instanceof RSTileItem; var3 = ((net.runelite.api.Node)var3).getNext()) {
            RSTileItem var4 = (RSTileItem)var3;
            var4.setX(this.getX());
            var4.setY(this.getY());
            var2.add(var4);
         }

         return var2;
      }
   }

   public net.runelite.api.SceneTilePaint getSceneTilePaint() {
      return this.paint;
   }

   public void setSceneTilePaint(net.runelite.api.SceneTilePaint var1) {
      this.paint = (SceneTilePaint)var1;
   }

   public net.runelite.api.SceneTileModel getSceneTileModel() {
      return this.model;
   }

   public void setWallObject(WallObject var1) {
      this.boundaryObject = (BoundaryObject)var1;
   }

   public void setDecorativeObject(DecorativeObject var1) {
      this.wallDecoration = (WallDecoration)var1;
   }

   public void setGroundObject(GroundObject var1) {
      this.floorDecoration = (FloorDecoration)var1;
   }

   public int getFlags() {
      return this.gameObjectsEdgeMask;
   }

   public int getPhysicalLevel() {
      return this.minPlane;
   }

   public boolean isDraw() {
      return this.drawPrimary;
   }

   public void setDraw(boolean var1) {
      this.drawPrimary = var1;
   }

   public boolean isVisible() {
      return this.drawSecondary;
   }

   public void setVisible(boolean var1) {
      this.drawSecondary = var1;
   }

   public void setDrawEntities(boolean var1) {
      this.drawGameObjects = var1;
   }

   public void setWallCullDirection(int var1) {
      this.drawGameObjectEdges = var1;
   }

   public RSTile getBridge() {
      return this.linkedBelowTile;
   }

   @ObfuscatedName("jh")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "1636778707"
   )
   static void method5187_base() {
      for(class222 var0 = (class222)Client.field682.method7265(); var0 != null; var0 = (class222)Client.field682.method7235()) {
         var0.remove_base();
      }

   }
}
