Class ConnectingTextureType
java.lang.Object
com.supermartijn642.fusion.texture.types.connecting.ConnectingTextureType
- All Implemented Interfaces:
TextureType<ConnectingTextureLayout>,Serializer<ConnectingTextureLayout>
Created 26/04/2023 by SuperMartijn642
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.renderer.texture.TextureAtlasSpritecreateSprite(SpriteCreationContext context, ConnectingTextureLayout data) Creates the sprite from the custom texture data.deserialize(com.google.gson.JsonObject json) Deserializes the given json to some data.static intstatic int[]getStatePosition(ConnectingTextureLayout layout, boolean up, boolean upRight, boolean right, boolean bottomRight, boolean bottom, boolean bottomLeft, boolean left, boolean upLeft) static int[]getStatePositionFull(boolean up, boolean upRight, boolean right, boolean bottomRight, boolean bottom, boolean bottomLeft, boolean left, boolean upLeft) static int[]getStatePositionSimple(boolean up, boolean right, boolean bottom, boolean left) com.google.gson.JsonObjectserialize(ConnectingTextureLayout value) Serializes the given data to json.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.supermartijn642.fusion.api.texture.TextureType
getFrameSize
-
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:SerializerDeserializes the given json to some data.- Specified by:
deserializein interfaceSerializer<ConnectingTextureLayout>- Throws:
com.google.gson.JsonParseException- if the given json does not match the expected format
-
serialize
Description copied from interface:SerializerSerializes the given data to json.- Specified by:
serializein interfaceSerializer<ConnectingTextureLayout>
-
createSprite
public net.minecraft.client.renderer.texture.TextureAtlasSprite createSprite(SpriteCreationContext context, ConnectingTextureLayout data) Description copied from interface:TextureTypeCreates the sprite from the custom texture data.- Specified by:
createSpritein interfaceTextureType<ConnectingTextureLayout>- Parameters:
context- context for creating the spritedata- custom texture data- See Also:
-
getScaleFactor
-
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)
-