Class ConnectingTextureType

java.lang.Object
com.supermartijn642.fusion.texture.types.connecting.ConnectingTextureType
All Implemented Interfaces:
TextureType<ConnectingTextureLayout>, Serializer<ConnectingTextureLayout>

public class ConnectingTextureType extends Object implements TextureType<ConnectingTextureLayout>
Created 26/04/2023 by SuperMartijn642
  • Constructor Details

    • ConnectingTextureType

      public ConnectingTextureType()
  • Method Details

    • deserialize

      public ConnectingTextureLayout deserialize(com.google.gson.JsonObject json) throws com.google.gson.JsonParseException
      Description copied from interface: Serializer
      Deserializes the given json to some data.
      Specified by:
      deserialize in interface Serializer<ConnectingTextureLayout>
      Throws:
      com.google.gson.JsonParseException - if the given json does not match the expected format
    • serialize

      public com.google.gson.JsonObject serialize(ConnectingTextureLayout value)
      Description copied from interface: Serializer
      Serializes the given data to json.
      Specified by:
      serialize in interface Serializer<ConnectingTextureLayout>
    • createSprite

      public net.minecraft.client.renderer.texture.TextureAtlasSprite createSprite(SpriteCreationContext context, ConnectingTextureLayout data)
      Description copied from interface: TextureType
      Creates the sprite from the custom texture data.
      Specified by:
      createSprite in interface TextureType<ConnectingTextureLayout>
      Parameters:
      context - context for creating the sprite
      data - custom texture data
      See Also:
    • getScaleFactor

      public static int getScaleFactor(ConnectingTextureLayout layout)
    • getStatePosition

      public static int[] getStatePosition(ConnectingTextureLayout layout, boolean up, boolean upRight, boolean right, boolean bottomRight, boolean bottom, boolean bottomLeft, boolean left, boolean upLeft)
    • getStatePositionFull

      public static int[] getStatePositionFull(boolean up, boolean upRight, boolean right, boolean bottomRight, boolean bottom, boolean bottomLeft, boolean left, boolean upLeft)
    • getStatePositionSimple

      public static int[] getStatePositionSimple(boolean up, boolean right, boolean bottom, boolean left)