//This JSON was modified by LateLag (@LateLagMC). Please do not use this document without permission.
{
  "format_version": "1.8.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:shulker",
      "min_engine_version": "1.8.0",
      "scripts": {
        "pre_animation": [
          "variable.Shulker.LidPositionFactor = 180 * (0.5 + variable.Shulker.PeekAmount);",
          "variable.Shulker.LidRotationFactor = -1 + Math.sin(180 * (0.5 + variable.Shulker.PeekAmount));",
          "variable.Shulker.UpFacing = variable.Shulker.FacingDirection == 1;",
          "variable.Shulker.NorthFacing = variable.Shulker.FacingDirection == 2;",
          "variable.Shulker.SouthFacing = variable.Shulker.FacingDirection == 3;",
          "variable.Shulker.WestFacing = variable.Shulker.FacingDirection == 4;",
          "variable.Shulker.EastFacing = variable.Shulker.FacingDirection == 5;",
          "variable.Shulker.XPreRotation = variable.Shulker.UpFacing * 180 + variable.Shulker.NorthFacing * 90 - variable.Shulker.SouthFacing * 90;",
          "variable.Shulker.ZPreRotation = variable.Shulker.NorthFacing * 180 + variable.Shulker.WestFacing * 90 - variable.Shulker.EastFacing * 90;",
          "variable.Shulker.XOffset = -variable.Shulker.WestFacing * 7.99 + variable.Shulker.EastFacing * 7.99;",
          "variable.Shulker.YOffset = variable.Shulker.UpFacing * 15.99 + variable.Shulker.NorthFacing * 7.99 + variable.Shulker.SouthFacing * 7.99 + variable.Shulker.WestFacing * 7.99 + variable.Shulker.EastFacing * 7.99;",
          "variable.Shulker.ZOffset = variable.Shulker.NorthFacing * 7.99 - variable.Shulker.SouthFacing * 7.99;"
        ]
      }
    }
  }
}