From f7f6394b47ccb8dcbc60ae7d9d32ed7f0c55af93 Mon Sep 17 00:00:00 2001 From: Redox Date: Sun, 1 Sep 2024 00:07:46 -0700 Subject: [PATCH] Refactor texture. --- .../chunky/block/AbstractModelBlock.java | 4 +- .../src/java/se/llbit/chunky/block/Block.java | 6 +- .../FixedTopBottomRotatableTexturedBlock.java | 8 +- .../se/llbit/chunky/block/MinecraftBlock.java | 3 +- .../chunky/block/MinecraftBlockProvider.java | 62 +- .../block/MinecraftBlockTranslucent.java | 4 +- .../chunky/block/SolidNonOpaqueBlock.java | 4 +- .../se/llbit/chunky/block/TexturedBlock.java | 10 +- .../block/TopBottomOrientedTexturedBlock.java | 8 +- .../se/llbit/chunky/block/UntintedLeaves.java | 4 +- .../block/minecraft/AmethystCluster.java | 4 +- .../llbit/chunky/block/minecraft/Azalea.java | 4 +- .../llbit/chunky/block/minecraft/Banner.java | 4 +- .../se/llbit/chunky/block/minecraft/Bed.java | 4 +- .../chunky/block/minecraft/Beetroots.java | 3 +- .../llbit/chunky/block/minecraft/Button.java | 4 +- .../block/minecraft/CakeWithCandle.java | 3 +- .../llbit/chunky/block/minecraft/Candle.java | 3 +- .../llbit/chunky/block/minecraft/Carpet.java | 4 +- .../llbit/chunky/block/minecraft/Carrots.java | 3 +- .../chunky/block/minecraft/CaveVines.java | 3 +- .../llbit/chunky/block/minecraft/Chain.java | 4 +- .../chunky/block/minecraft/CopperBulb.java | 4 +- .../chunky/block/minecraft/CoralFan.java | 3 +- .../llbit/chunky/block/minecraft/Crafter.java | 6 +- .../chunky/block/minecraft/Dispenser.java | 5 +- .../se/llbit/chunky/block/minecraft/Door.java | 6 +- .../llbit/chunky/block/minecraft/Fence.java | 4 +- .../chunky/block/minecraft/FenceGate.java | 6 +- .../chunky/block/minecraft/FrostedIce.java | 3 +- .../llbit/chunky/block/minecraft/Glass.java | 4 +- .../chunky/block/minecraft/GlassPane.java | 6 +- .../block/minecraft/GlazedTerracotta.java | 4 +- .../se/llbit/chunky/block/minecraft/Head.java | 4 +- .../llbit/chunky/block/minecraft/Lantern.java | 4 +- .../llbit/chunky/block/minecraft/Leaves.java | 6 +- .../se/llbit/chunky/block/minecraft/Log.java | 4 +- .../chunky/block/minecraft/NetherWart.java | 3 +- .../block/minecraft/PointedDripstone.java | 3 +- .../chunky/block/minecraft/Potatoes.java | 3 +- .../chunky/block/minecraft/PressurePlate.java | 4 +- .../se/llbit/chunky/block/minecraft/Rail.java | 5 +- .../chunky/block/minecraft/RespawnAnchor.java | 3 +- .../chunky/block/minecraft/ShulkerBox.java | 4 +- .../se/llbit/chunky/block/minecraft/Slab.java | 6 +- .../chunky/block/minecraft/SnifferEgg.java | 3 +- .../chunky/block/minecraft/SpriteBlock.java | 6 +- .../llbit/chunky/block/minecraft/Stairs.java | 6 +- .../block/minecraft/SweetBerryBush.java | 3 +- .../llbit/chunky/block/minecraft/Torch.java | 4 +- .../block/minecraft/TorchflowerCrop.java | 3 +- .../chunky/block/minecraft/Trapdoor.java | 4 +- .../se/llbit/chunky/block/minecraft/Wall.java | 6 +- .../chunky/block/minecraft/WallBanner.java | 4 +- .../chunky/block/minecraft/WallHead.java | 4 +- .../chunky/block/minecraft/WallTorch.java | 4 +- .../llbit/chunky/block/minecraft/Water.java | 4 +- .../llbit/chunky/block/minecraft/Wheat.java | 3 +- .../se/llbit/chunky/entity/BannerDesign.java | 5 +- .../java/se/llbit/chunky/entity/Campfire.java | 15 +- .../llbit/chunky/entity/CoralFanEntity.java | 4 +- .../chunky/entity/HangingSignEntity.java | 9 +- .../java/se/llbit/chunky/entity/Lectern.java | 3 +- .../llbit/chunky/entity/PaintingEntity.java | 3 +- .../se/llbit/chunky/entity/PlayerEntity.java | 30 +- .../se/llbit/chunky/entity/SignEntity.java | 9 +- .../llbit/chunky/entity/StandingBanner.java | 6 +- .../chunky/entity/WallCoralFanEntity.java | 4 +- .../chunky/entity/WallHangingSignEntity.java | 8 +- .../llbit/chunky/entity/WallSignEntity.java | 8 +- .../java/se/llbit/chunky/model/AABBModel.java | 9 +- .../llbit/chunky/model/AnimatedQuadModel.java | 2 +- .../chunky/model/DirectionalBlockModel.java | 10 +- ...dTopBottomRotatableTexturedBlockModel.java | 12 +- .../chunky/model/GrassTintedSpriteModel.java | 4 +- .../java/se/llbit/chunky/model/QuadModel.java | 8 +- .../chunky/model/RotatableBlockModel.java | 12 +- .../chunky/model/TexturedBlockModel.java | 10 +- .../TopBottomOrientedTexturedBlockModel.java | 12 +- .../chunky/model/minecraft/AnvilModel.java | 13 +- .../model/minecraft/AttachedStemModel.java | 5 +- .../chunky/model/minecraft/AzaleaModel.java | 11 +- .../chunky/model/minecraft/BambooModel.java | 17 +- .../chunky/model/minecraft/BarrelModel.java | 7 +- .../chunky/model/minecraft/BeaconModel.java | 5 +- .../chunky/model/minecraft/BedModel.java | 10 +- .../chunky/model/minecraft/BellModel.java | 19 +- .../model/minecraft/BigDripleafModel.java | 15 +- .../model/minecraft/BigDripleafStemModel.java | 5 +- .../model/minecraft/BrewingStandModel.java | 9 +- .../chunky/model/minecraft/ButtonModel.java | 10 +- .../chunky/model/minecraft/CactusModel.java | 5 +- .../chunky/model/minecraft/CakeModel.java | 15 +- .../model/minecraft/CakeWithCandleModel.java | 17 +- .../minecraft/CalibratedSculkSensorModel.java | 17 +- .../chunky/model/minecraft/CandleModel.java | 10 +- .../chunky/model/minecraft/CarpetModel.java | 10 +- .../chunky/model/minecraft/CauldronModel.java | 15 +- .../chunky/model/minecraft/ChainModel.java | 5 +- .../chunky/model/minecraft/ChestModel.java | 11 +- .../model/minecraft/ChorusFlowerModel.java | 9 +- .../model/minecraft/ChorusPlantModel.java | 7 +- .../model/minecraft/CocoaPlantModel.java | 9 +- .../model/minecraft/ComparatorModel.java | 11 +- .../model/minecraft/ComposterModel.java | 19 +- .../chunky/model/minecraft/ConduitModel.java | 5 +- .../chunky/model/minecraft/CropsModel.java | 10 +- .../model/minecraft/DaylightSensorModel.java | 11 +- .../model/minecraft/DecoratedPotModel.java | 7 +- .../model/minecraft/DispenserModel.java | 22 +- .../chunky/model/minecraft/DoorModel.java | 10 +- .../model/minecraft/DragonEggModel.java | 5 +- .../minecraft/EnchantmentTableModel.java | 13 +- .../model/minecraft/EndPortalFrameModel.java | 9 +- .../model/minecraft/EndPortalModel.java | 9 +- .../chunky/model/minecraft/EndRodModel.java | 5 +- .../model/minecraft/FenceGateModel.java | 12 +- .../chunky/model/minecraft/FenceModel.java | 12 +- .../chunky/model/minecraft/FireModel.java | 2 +- .../model/minecraft/FlowerPotModel.java | 34 +- .../chunky/model/minecraft/Flowerbed.java | 20 +- .../model/minecraft/FrogspawnModel.java | 5 +- .../model/minecraft/GlassPaneModel.java | 12 +- .../model/minecraft/GlowLichenModel.java | 7 +- .../model/minecraft/GrassBlockModel.java | 5 +- .../model/minecraft/GrassPathModel.java | 5 +- .../model/minecraft/GrindstoneModel.java | 13 +- .../model/minecraft/HeavyCoreModel.java | 5 +- .../model/minecraft/HoneyBlockModel.java | 3 +- .../chunky/model/minecraft/HopperModel.java | 11 +- .../chunky/model/minecraft/IronBarsModel.java | 7 +- .../chunky/model/minecraft/JigsawModel.java | 9 +- .../chunky/model/minecraft/LadderModel.java | 5 +- .../chunky/model/minecraft/LanternModel.java | 10 +- .../chunky/model/minecraft/LeafModel.java | 14 +- .../chunky/model/minecraft/LeverModel.java | 5 +- .../model/minecraft/LightBlockModel.java | 5 +- .../model/minecraft/LightningRodModel.java | 9 +- .../chunky/model/minecraft/LogModel.java | 10 +- .../minecraft/MangrovePropaguleModel.java | 9 +- .../model/minecraft/MangroveRootsModel.java | 9 +- .../model/minecraft/NetherPortalModel.java | 5 +- .../chunky/model/minecraft/ObserverModel.java | 9 +- .../model/minecraft/PistonExtensionModel.java | 9 +- .../chunky/model/minecraft/PistonModel.java | 7 +- .../minecraft/PitcherCropBottomModel.java | 29 +- .../model/minecraft/PitcherCropTopModel.java | 23 +- .../minecraft/PitcherPlantBottomModel.java | 9 +- .../model/minecraft/PitcherPlantTopModel.java | 7 +- .../model/minecraft/PressurePlateModel.java | 8 +- .../chunky/model/minecraft/RailModel.java | 10 +- .../minecraft/RedstoneRepeaterModel.java | 11 +- .../model/minecraft/RedstoneWireModel.java | 9 +- .../model/minecraft/ScaffoldingModel.java | 11 +- .../model/minecraft/SculkSensorModel.java | 15 +- .../model/minecraft/SculkShriekerModel.java | 15 +- .../model/minecraft/SculkVeinModel.java | 7 +- .../model/minecraft/SeaPickleModel.java | 7 +- .../chunky/model/minecraft/SlabModel.java | 10 +- .../model/minecraft/SlimeBlockModel.java | 3 +- .../model/minecraft/SmallDripleafModel.java | 21 +- .../model/minecraft/SnifferEggModel.java | 11 +- .../chunky/model/minecraft/SnowModel.java | 5 +- .../chunky/model/minecraft/SpriteModel.java | 16 +- .../chunky/model/minecraft/StairModel.java | 16 +- .../chunky/model/minecraft/StemModel.java | 5 +- .../model/minecraft/StonecutterModel.java | 13 +- .../model/minecraft/SunFlowerModel.java | 9 +- .../model/minecraft/TerracottaModel.java | 10 +- .../chunky/model/minecraft/TorchModel.java | 10 +- .../chunky/model/minecraft/TrapdoorModel.java | 10 +- .../model/minecraft/TrialSpawnerModel.java | 15 +- .../model/minecraft/TripwireHookModel.java | 15 +- .../chunky/model/minecraft/TripwireModel.java | 7 +- .../model/minecraft/TurtleEggModel.java | 9 +- .../chunky/model/minecraft/VaultModel.java | 15 +- .../chunky/model/minecraft/VineModel.java | 7 +- .../chunky/model/minecraft/WallModel.java | 12 +- .../chunky/model/minecraft/WaterModel.java | 9 +- .../llbit/chunky/renderer/scene/sky/Sky.java | 25 +- .../llbit/chunky/renderer/scene/sky/Sun.java | 4 +- .../resources/ChiseledBookshelfTexture.java | 62 +- .../llbit/chunky/resources/EntityTexture.java | 3 +- .../se/llbit/chunky/resources/HDRTexture.java | 1 + .../resources/ResourcePackPaintingLoader.java | 3 +- .../chunky/resources/ShulkerTexture.java | 8 +- .../llbit/chunky/resources/SignTexture.java | 8 +- .../chunky/resources/SolidColorTexture.java | 35 - .../se/llbit/chunky/resources/Texture.java | 2502 ++++++++--------- .../llbit/chunky/resources/TextureCache.java | 8 +- .../chunky/resources/TexturePackLoader.java | 7 +- .../{ => texture}/AbstractHdriTexture.java | 35 +- .../texture/AbstractNonlinearTexture.java | 48 + .../resources/texture/AbstractTexture.java | 203 ++ .../{ => texture}/AnimatedTexture.java | 5 +- .../resources/texture/BitmapTexture.java | 96 + .../resources/texture/EmptyTexture.java | 46 + .../resources/{ => texture}/PFMTexture.java | 2 +- .../resources/texture/SolidColorTexture.java | 49 + .../texturepack/AnimatedTextureLoader.java | 7 +- .../texturepack/BedTextureAdapter.java | 18 +- .../resources/texturepack/ChestTexture.java | 45 +- .../resources/texturepack/ColoredTexture.java | 7 +- .../resources/texturepack/IndexedTexture.java | 7 +- .../texturepack/LargeChestTexture.java | 43 +- .../texturepack/LayeredTextureLoader.java | 7 +- .../texturepack/PaintingBackTexture.java | 6 +- .../texturepack/PaintingTexture.java | 7 +- .../texturepack/PaintingTextureAdapter.java | 4 +- .../texturepack/RotatedTextureLoader.java | 7 +- .../resources/texturepack/SimpleTexture.java | 7 +- .../texturepack/SplitLargeChestTexture.java | 27 +- .../chunky/ui/render/tabs/TexturesTab.java | 4 +- .../src/java/se/llbit/chunky/world/Icon.java | 12 +- .../java/se/llbit/chunky/world/Material.java | 6 +- .../se/llbit/chunky/world/SkymapTexture.java | 8 +- .../world/material/TextureMaterial.java | 4 +- .../llbit/chunky/world/model/CubeModel.java | 15 +- chunky/src/java/se/llbit/math/ColorUtil.java | 21 + .../src/java/se/llbit/math/primitive/Box.java | 14 +- .../{ => texture}/AnimatedTextureTest.java | 2 +- 221 files changed, 2651 insertions(+), 2319 deletions(-) delete mode 100644 chunky/src/java/se/llbit/chunky/resources/SolidColorTexture.java rename chunky/src/java/se/llbit/chunky/resources/{ => texture}/AbstractHdriTexture.java (79%) create mode 100644 chunky/src/java/se/llbit/chunky/resources/texture/AbstractNonlinearTexture.java create mode 100644 chunky/src/java/se/llbit/chunky/resources/texture/AbstractTexture.java rename chunky/src/java/se/llbit/chunky/resources/{ => texture}/AnimatedTexture.java (92%) create mode 100644 chunky/src/java/se/llbit/chunky/resources/texture/BitmapTexture.java create mode 100644 chunky/src/java/se/llbit/chunky/resources/texture/EmptyTexture.java rename chunky/src/java/se/llbit/chunky/resources/{ => texture}/PFMTexture.java (98%) create mode 100644 chunky/src/java/se/llbit/chunky/resources/texture/SolidColorTexture.java rename chunky/src/test/se/llbit/chunky/resources/{ => texture}/AnimatedTextureTest.java (96%) diff --git a/chunky/src/java/se/llbit/chunky/block/AbstractModelBlock.java b/chunky/src/java/se/llbit/chunky/block/AbstractModelBlock.java index 6c7341c91c..ed21fe5027 100644 --- a/chunky/src/java/se/llbit/chunky/block/AbstractModelBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/AbstractModelBlock.java @@ -3,7 +3,7 @@ import se.llbit.chunky.model.BlockModel; import se.llbit.chunky.plugin.PluginApi; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -14,7 +14,7 @@ public abstract class AbstractModelBlock extends MinecraftBlock implements Model protected BlockModel model; - public AbstractModelBlock(String name, Texture texture) { + public AbstractModelBlock(String name, AbstractTexture texture) { super(name, texture); localIntersect = true; opaque = false; diff --git a/chunky/src/java/se/llbit/chunky/block/Block.java b/chunky/src/java/se/llbit/chunky/block/Block.java index f7b507f4f1..2c4a10c96f 100644 --- a/chunky/src/java/se/llbit/chunky/block/Block.java +++ b/chunky/src/java/se/llbit/chunky/block/Block.java @@ -1,9 +1,8 @@ package se.llbit.chunky.block; import se.llbit.chunky.entity.Entity; -import se.llbit.chunky.model.TexturedBlockModel; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.json.JsonString; import se.llbit.json.JsonValue; @@ -13,7 +12,6 @@ import se.llbit.nbt.CompoundTag; import se.llbit.nbt.Tag; -import java.util.List; import java.util.Random; public abstract class Block extends Material { @@ -33,7 +31,7 @@ public abstract class Block extends Material { */ public boolean invisible = false; - public Block(String name, Texture texture) { + public Block(String name, AbstractTexture texture) { super(name, texture); } diff --git a/chunky/src/java/se/llbit/chunky/block/FixedTopBottomRotatableTexturedBlock.java b/chunky/src/java/se/llbit/chunky/block/FixedTopBottomRotatableTexturedBlock.java index 5132017cc9..89a19d8f1e 100644 --- a/chunky/src/java/se/llbit/chunky/block/FixedTopBottomRotatableTexturedBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/FixedTopBottomRotatableTexturedBlock.java @@ -1,7 +1,7 @@ package se.llbit.chunky.block; import se.llbit.chunky.model.FixedTopBottomRotatableTexturedBlockModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * A textured block that can have one of four orientations but have a fixed top and bottom that does NOT rotate. @@ -9,15 +9,15 @@ * If the top and bottom should rotate with the rest of the block, use TopBottomOrientedTexturedBlock. */ public class FixedTopBottomRotatableTexturedBlock extends AbstractModelBlock { - public FixedTopBottomRotatableTexturedBlock(String name, String facing, Texture front, Texture side, Texture top) { + public FixedTopBottomRotatableTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture side, AbstractTexture top) { this(name, facing, front, side, side, side, top, top); } - public FixedTopBottomRotatableTexturedBlock(String name, String facing, Texture front, Texture side, Texture top, Texture bottom) { + public FixedTopBottomRotatableTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture side, AbstractTexture top, AbstractTexture bottom) { this(name, facing, front, side, side, side, top, bottom); } - public FixedTopBottomRotatableTexturedBlock(String name, String facing, Texture front, Texture south, Texture east, Texture west, Texture top, Texture bottom) { + public FixedTopBottomRotatableTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture south, AbstractTexture east, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { super(name, front); this.model = new FixedTopBottomRotatableTexturedBlockModel(facing, front, south, east, west, top, bottom); solid = true; diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlock.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlock.java index 951d0517fd..c1983572f5 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlock.java @@ -1,6 +1,7 @@ package se.llbit.chunky.block; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; /** @@ -9,7 +10,7 @@ public class MinecraftBlock extends Block { public static final Material STONE = new MinecraftBlock("stone", Texture.stone); - public MinecraftBlock(String name, Texture texture) { + public MinecraftBlock(String name, AbstractTexture texture) { super("minecraft:" + name, texture); opaque = true; solid = true; diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java index d64ca3aa22..de8828c950 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java @@ -10,6 +10,8 @@ import se.llbit.chunky.model.minecraft.FlowerPotModel.Kind; import se.llbit.chunky.resources.ShulkerTexture; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.nbt.ListTag; import se.llbit.nbt.Tag; @@ -931,11 +933,11 @@ private static void addBlocks(BiFunction factory, String... } } - private static void addBlock(String name, Texture texture) { + private static void addBlock(String name, BitmapTexture texture) { addBlock(name, (n, tag) -> new MinecraftBlock(n, texture)); } - private static void addBlocks(Texture texture, String... names) { + private static void addBlocks(BitmapTexture texture, String... names) { addBlocks((name, tag) -> new MinecraftBlock(name, texture), names); } @@ -1302,7 +1304,7 @@ public Block getBlockByTag(String namespacedName, Tag tag) { case "detector_rail": { Tag properties = tag.get("Properties"); String powered = properties.get("powered").stringValue("false"); - Texture straightTrack = + AbstractTexture straightTrack = powered.equals("true") ? Texture.detectorRailOn : Texture.detectorRail; return rail(tag, straightTrack); } @@ -1744,7 +1746,7 @@ public Block getBlockByTag(String namespacedName, Tag tag) { case "activator_rail": { Tag properties = tag.get("Properties"); String powered = properties.get("powered").stringValue("false"); - Texture straightTrack = + AbstractTexture straightTrack = powered.equals("true") ? Texture.activatorRailPowered : Texture.activatorRail; return rail(tag, straightTrack); } @@ -3096,31 +3098,31 @@ public Block getBlockByTag(String namespacedName, Tag tag) { } } - public static Block largeFlower(Tag tag, Texture top, Texture bottom) { + public static Block largeFlower(Tag tag, AbstractTexture top, AbstractTexture bottom) { String name = BlockProvider.blockName(tag); String half = tag.get("Properties").get("half").stringValue("lower"); return new SpriteBlock(name, half.equals("upper") ? top : bottom); } - public static Block log(Tag tag, Texture side, Texture top) { + public static Block log(Tag tag, AbstractTexture side, AbstractTexture top) { String name = BlockProvider.blockName(tag); String axis = tag.get("Properties").get("axis").stringValue("y"); return new Log(name, side, top, axis); } - public static Block slab(Tag tag, Texture texture) { + public static Block slab(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); String type = tag.get("Properties").get("type").stringValue("bottom"); return new Slab(name, texture, type); } - public static Block slab(Tag tag, Texture sideTexture, Texture topTexture) { + public static Block slab(Tag tag, AbstractTexture sideTexture, AbstractTexture topTexture) { String name = BlockProvider.blockName(tag); String type = tag.get("Properties").get("type").stringValue("bottom"); return new Slab(name, sideTexture, topTexture, type); } - public static Block stairs(Tag tag, Texture texture) { + public static Block stairs(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String half = properties.get("half").stringValue("bottom"); @@ -3129,7 +3131,7 @@ public static Block stairs(Tag tag, Texture texture) { return new Stairs(name, texture, half, shape, facing); } - public static Block stairs(Tag tag, Texture side, Texture top, Texture bottom) { + public static Block stairs(Tag tag, AbstractTexture side, AbstractTexture top, AbstractTexture bottom) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String half = properties.get("half").stringValue("bottom"); @@ -3138,20 +3140,20 @@ public static Block stairs(Tag tag, Texture side, Texture top, Texture bottom) { return new Stairs(name, side, top, bottom, half, shape, facing); } - private static Block glazedTerracotta(Tag tag, Texture texture) { + private static Block glazedTerracotta(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); String facing = BlockProvider.facing(tag, "south"); return new GlazedTerracotta(name, texture, facing); } - private static Block bed(Tag tag, Texture texture) { + private static Block bed(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); String part = tag.get("Properties").get("part").stringValue("head"); String facing = BlockProvider.facing(tag, "south"); return new Bed(name, texture, part, facing); } - private static Block hugeMushroom(Tag tag, Texture skin) { + private static Block hugeMushroom(Tag tag, AbstractTexture skin) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String east = properties.get("east").stringValue("true"); @@ -3194,7 +3196,7 @@ private static Block pistonHead(Tag tag) { return new PistonHead(name, type.equals("sticky"), facing); } - private static Block rail(Tag tag, Texture straightTrack) { + private static Block rail(Tag tag, AbstractTexture straightTrack) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String shape = properties.get("shape").stringValue("north-south"); @@ -3204,7 +3206,7 @@ private static Block rail(Tag tag, Texture straightTrack) { private static Block poweredRail(Tag tag) { Tag properties = tag.get("Properties"); String powered = properties.get("powered").stringValue("false"); - Texture straightTrack = powered.equals("true") ? Texture.poweredRailOn : Texture.poweredRailOff; + AbstractTexture straightTrack = powered.equals("true") ? Texture.poweredRailOn : Texture.poweredRailOff; return rail(tag, straightTrack); } @@ -3235,7 +3237,7 @@ private static Block chest(Tag tag, boolean trapped) { return new Chest(name, type, facing, trapped); } - private static Block chain(Tag tag, String name, Texture texture) { + private static Block chain(Tag tag, String name, AbstractTexture texture) { String axis = tag.get("Properties").get("axis").stringValue("y"); return new Chain(name, texture, axis); } @@ -3311,7 +3313,7 @@ private static Block beehive(Tag tag) { Texture.beehiveEnd); } - private static Block door(Tag tag, Texture upper, Texture lower) { + private static Block door(Tag tag, AbstractTexture upper, AbstractTexture lower) { Tag properties = tag.get("Properties"); String name = BlockProvider.blockName(tag); String facing = BlockProvider.facing(tag); @@ -3345,13 +3347,13 @@ private static Block wallHangingSign(Tag tag, String material) { return new WallHangingSign(BlockProvider.blockName(tag), material, BlockProvider.facing(tag)); } - private static Block banner(Tag tag, Texture texture, BannerDesign.Color color) { + private static Block banner(Tag tag, AbstractTexture texture, BannerDesign.Color color) { String name = BlockProvider.blockName(tag); int rotation = BlockProvider.stringToInt(tag.get("Properties").get("rotation"), 0); return new Banner(name, texture, rotation, color); } - private static Block wallBanner(Tag tag, Texture texture, BannerDesign.Color color) { + private static Block wallBanner(Tag tag, AbstractTexture texture, BannerDesign.Color color) { String name = BlockProvider.blockName(tag); String facing = BlockProvider.facing(tag); return new WallBanner(name, texture, facing, color); @@ -3371,7 +3373,7 @@ private static Block lever(Tag tag) { return new Lever(face, facing, powered.equals("true")); } - private static Block button(Tag tag, Texture texture) { + private static Block button(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String face = properties.get("face").stringValue("floor"); @@ -3397,7 +3399,7 @@ private static Block comparator(Tag tag) { return new Comparator(facing, mode, powered.equals("true")); } - private static Block fence(Tag tag, Texture texture) { + private static Block fence(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String north = properties.get("north").stringValue("false"); @@ -3413,7 +3415,7 @@ private static Block fence(Tag tag, Texture texture) { west.equals("true")); } - private static Block fenceGate(Tag tag, Texture texture) { + private static Block fenceGate(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String facing = BlockProvider.facing(tag); @@ -3422,7 +3424,7 @@ private static Block fenceGate(Tag tag, Texture texture) { return new FenceGate(name, texture, facing, in_wall.equals("true"), open.equals("true")); } - private Block glassPane(Tag tag, Texture side, Texture top) { + private Block glassPane(Tag tag, AbstractTexture side, AbstractTexture top) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String north = properties.get("north").stringValue("false"); @@ -3449,7 +3451,7 @@ private Block ironBars(Tag tag) { north.equals("true"), south.equals("true"), east.equals("true"), west.equals("true")); } - private static Block trapdoor(Tag tag, Texture texture) { + private static Block trapdoor(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String half = properties.get("half").stringValue("bottom"); @@ -3498,7 +3500,7 @@ private Block cocoa(Tag tag) { return new Cocoa(facing, age); } - private static Block wall(Tag tag, Texture texture) { + private static Block wall(Tag tag, AbstractTexture texture) { String name = BlockProvider.blockName(tag); Tag properties = tag.get("Properties"); String north = properties.get("north").stringValue("false"); @@ -3509,13 +3511,13 @@ private static Block wall(Tag tag, Texture texture) { return new Wall(name, texture, north, south, east, west, up.equals("true")); } - private Block skull(Tag tag, Texture texture, SkullEntity.Kind type) { + private Block skull(Tag tag, AbstractTexture texture, SkullEntity.Kind type) { String name = BlockProvider.blockName(tag); int rotation = BlockProvider.stringToInt(tag.get("Properties").get("rotation"), 0); return new Head(name, texture, type, rotation); } - private Block wallSkull(Tag tag, Texture texture, SkullEntity.Kind type) { + private Block wallSkull(Tag tag, AbstractTexture texture, SkullEntity.Kind type) { String name = BlockProvider.blockName(tag); String facing = BlockProvider.facing(tag); return new WallHead(name, texture, type, facing); @@ -3542,7 +3544,7 @@ private static Block seaPickle(Tag tag) { private static Block structureBlock(Tag tag) { Tag properties = tag.get("Properties"); - Texture texture = Texture.structureBlock; + AbstractTexture texture = Texture.structureBlock; String mode = properties.get("mode").stringValue(""); switch (mode) { case "corner": @@ -3561,14 +3563,14 @@ private static Block structureBlock(Tag tag) { return new MinecraftBlock("structure_block", texture); } - private static Block candle(Tag tag, Texture candleTexture, Texture candleTextureLit) { + private static Block candle(Tag tag, AbstractTexture candleTexture, AbstractTexture candleTextureLit) { Tag properties = tag.get("Properties"); return new Candle(BlockProvider.blockName(tag), candleTexture, candleTextureLit, BlockProvider.stringToInt(properties.get("candles"), 1), properties.get("lit").stringValue("false").equals("true")); } - private static Block candleCake(Tag tag, Texture candleTexture, Texture candleTextureLit) { + private static Block candleCake(Tag tag, AbstractTexture candleTexture, AbstractTexture candleTextureLit) { Tag properties = tag.get("Properties"); return new CakeWithCandle(BlockProvider.blockName(tag), candleTexture, candleTextureLit, properties.get("lit").stringValue("false").equals("true")); diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockTranslucent.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockTranslucent.java index 61824b60ac..99d325a3c4 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockTranslucent.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockTranslucent.java @@ -1,12 +1,12 @@ package se.llbit.chunky.block; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * Non-opaque block. */ public class MinecraftBlockTranslucent extends MinecraftBlock { - public MinecraftBlockTranslucent(String name, Texture texture) { + public MinecraftBlockTranslucent(String name, AbstractTexture texture) { super(name, texture); opaque = false; solid = false; diff --git a/chunky/src/java/se/llbit/chunky/block/SolidNonOpaqueBlock.java b/chunky/src/java/se/llbit/chunky/block/SolidNonOpaqueBlock.java index 1fab2c7711..f388b4453a 100644 --- a/chunky/src/java/se/llbit/chunky/block/SolidNonOpaqueBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/SolidNonOpaqueBlock.java @@ -1,10 +1,10 @@ package se.llbit.chunky.block; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class SolidNonOpaqueBlock extends Block { - public SolidNonOpaqueBlock(String name, Texture texture) { + public SolidNonOpaqueBlock(String name, AbstractTexture texture) { super(name, texture); solid = true; opaque = false; diff --git a/chunky/src/java/se/llbit/chunky/block/TexturedBlock.java b/chunky/src/java/se/llbit/chunky/block/TexturedBlock.java index 7ba68d4adb..b079d24e91 100644 --- a/chunky/src/java/se/llbit/chunky/block/TexturedBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/TexturedBlock.java @@ -1,21 +1,21 @@ package se.llbit.chunky.block; import se.llbit.chunky.model.TexturedBlockModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class TexturedBlock extends AbstractModelBlock { - public TexturedBlock(String name, Texture side, Texture topBottom) { + public TexturedBlock(String name, AbstractTexture side, AbstractTexture topBottom) { this(name, side, side, side, side, topBottom, topBottom); } - public TexturedBlock(String name, Texture side, Texture top, Texture bottom) { + public TexturedBlock(String name, AbstractTexture side, AbstractTexture top, AbstractTexture bottom) { this(name, side, side, side, side, top, bottom); } public TexturedBlock(String name, - Texture north, Texture south, Texture east, Texture west, - Texture top, Texture bottom) { + AbstractTexture north, AbstractTexture south, AbstractTexture east, AbstractTexture west, + AbstractTexture top, AbstractTexture bottom) { super(name, north); this.model = new TexturedBlockModel(north, east, south, west, top, bottom); opaque = true; diff --git a/chunky/src/java/se/llbit/chunky/block/TopBottomOrientedTexturedBlock.java b/chunky/src/java/se/llbit/chunky/block/TopBottomOrientedTexturedBlock.java index e5f5e271c3..4b40754e20 100644 --- a/chunky/src/java/se/llbit/chunky/block/TopBottomOrientedTexturedBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/TopBottomOrientedTexturedBlock.java @@ -1,7 +1,7 @@ package se.llbit.chunky.block; import se.llbit.chunky.model.TopBottomOrientedTexturedBlockModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * A textured block that can have one of four orientations but have a fixed top and bottom that rotates, too. @@ -9,15 +9,15 @@ * If the top and bottom should NOT rotate with the rest of the block, use FixedTopBottomRotatableTexturedBlock. */ public class TopBottomOrientedTexturedBlock extends AbstractModelBlock { - public TopBottomOrientedTexturedBlock(String name, String facing, Texture front, Texture side, Texture top) { + public TopBottomOrientedTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture side, AbstractTexture top) { this(name, facing, front, side, side, side, top, top); } - public TopBottomOrientedTexturedBlock(String name, String facing, Texture front, Texture side, Texture top, Texture bottom) { + public TopBottomOrientedTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture side, AbstractTexture top, AbstractTexture bottom) { this(name, facing, front, side, side, side, top, bottom); } - public TopBottomOrientedTexturedBlock(String name, String facing, Texture front, Texture south, Texture east, Texture west, Texture top, Texture bottom) { + public TopBottomOrientedTexturedBlock(String name, String facing, AbstractTexture front, AbstractTexture south, AbstractTexture east, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { super(name, front); this.model = new TopBottomOrientedTexturedBlockModel(facing, front, south, east, west, top, bottom); solid = true; diff --git a/chunky/src/java/se/llbit/chunky/block/UntintedLeaves.java b/chunky/src/java/se/llbit/chunky/block/UntintedLeaves.java index 09e7b1e2e3..2b3c2f665a 100644 --- a/chunky/src/java/se/llbit/chunky/block/UntintedLeaves.java +++ b/chunky/src/java/se/llbit/chunky/block/UntintedLeaves.java @@ -1,9 +1,9 @@ package se.llbit.chunky.block; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class UntintedLeaves extends MinecraftBlockTranslucent { - public UntintedLeaves(String name, Texture texture) { + public UntintedLeaves(String name, AbstractTexture texture) { super(name, texture); } } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/AmethystCluster.java b/chunky/src/java/se/llbit/chunky/block/minecraft/AmethystCluster.java index 7e276c0c54..182d3f9406 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/AmethystCluster.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/AmethystCluster.java @@ -18,13 +18,13 @@ package se.llbit.chunky.block.minecraft; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class AmethystCluster extends SpriteBlock { private final boolean lit; - public AmethystCluster(String name, Texture texture, String facing, boolean lit) { + public AmethystCluster(String name, AbstractTexture texture, String facing, boolean lit) { super(name, texture, facing); this.lit = lit; } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Azalea.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Azalea.java index a0b6d0d49a..0696285ef6 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Azalea.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Azalea.java @@ -20,11 +20,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.AzaleaModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Azalea extends AbstractModelBlock { - public Azalea(String name, Texture top, Texture side) { + public Azalea(String name, AbstractTexture top, AbstractTexture side) { super(name, top); solid = false; model = new AzaleaModel(top, side); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Banner.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Banner.java index e9a204e6b2..aaec60e180 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Banner.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Banner.java @@ -23,7 +23,7 @@ import se.llbit.chunky.entity.Entity; import se.llbit.chunky.entity.StandingBanner; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.json.Json; import se.llbit.json.JsonObject; import se.llbit.math.Ray; @@ -37,7 +37,7 @@ public class Banner extends MinecraftBlockTranslucent { private final int rotation; private final BannerDesign.Color color; - public Banner(String name, Texture texture, int rotation, BannerDesign.Color color) { + public Banner(String name, AbstractTexture texture, int rotation, BannerDesign.Color color) { super(name, texture); invisible = true; opaque = false; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Bed.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Bed.java index 9160c0943a..1eaa9e8c8a 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Bed.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Bed.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.BedModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Bed extends AbstractModelBlock { private final String description; - public Bed(String name, Texture texture, String part, String facing) { + public Bed(String name, AbstractTexture texture, String part, String facing) { super(name, texture); this.description = String.format("part=%s, facing=%s", part, facing); boolean head = part.equals("head"); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Beetroots.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Beetroots.java index 21e77152fd..4f9e46ad60 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Beetroots.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Beetroots.java @@ -21,10 +21,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CropsModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Beetroots extends AbstractModelBlock { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.beets0, Texture.beets1, Texture.beets2, Texture.beets3 }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Button.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Button.java index 7c2465dccb..d6a7996a4a 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Button.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Button.java @@ -20,14 +20,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.ButtonModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Button extends AbstractModelBlock { private final String description; // TODO(llbit): render powered buttons - public Button(String name, Texture texture, String face, String facing, boolean powered) { + public Button(String name, AbstractTexture texture, String face, String facing, boolean powered) { super(name, texture); this.description = String.format("face=%s, facing=%s, powered=%s", face, facing, powered); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/CakeWithCandle.java b/chunky/src/java/se/llbit/chunky/block/minecraft/CakeWithCandle.java index c6cdb2f976..66ce8051c4 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/CakeWithCandle.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/CakeWithCandle.java @@ -23,6 +23,7 @@ import se.llbit.chunky.entity.FlameParticles; import se.llbit.chunky.model.minecraft.CakeWithCandleModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Vector3; import java.util.Random; @@ -32,7 +33,7 @@ public class CakeWithCandle extends AbstractModelBlock { private final boolean lit; private final FlameParticles entity; - public CakeWithCandle(String name, Texture candle, Texture candleLit, boolean lit) { + public CakeWithCandle(String name, AbstractTexture candle, AbstractTexture candleLit, boolean lit) { super(name, Texture.cakeTop); this.lit = lit; this.model = new CakeWithCandleModel(lit ? candleLit : candle); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Candle.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Candle.java index 6c41351fcb..1aca3805d7 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Candle.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Candle.java @@ -23,6 +23,7 @@ import se.llbit.chunky.entity.FlameParticles; import se.llbit.chunky.model.minecraft.CandleModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.math.Vector3; @@ -37,7 +38,7 @@ public class Candle extends AbstractModelBlock { private final boolean lit; private final FlameParticles entity; - public Candle(String name, Texture candle, Texture candleLit, int candles, boolean lit) { + public Candle(String name, AbstractTexture candle, AbstractTexture candleLit, int candles, boolean lit) { super(name, candle); this.candles = Math.max(1, Math.min(4, candles)); this.lit = lit; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Carpet.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Carpet.java index 3169f6cff2..9e54fcad7f 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Carpet.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Carpet.java @@ -20,11 +20,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CarpetModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Carpet extends AbstractModelBlock { - public Carpet(String name, Texture texture) { + public Carpet(String name, AbstractTexture texture) { super(name, texture); solid = false; this.model = new CarpetModel(texture); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Carrots.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Carrots.java index 6f69dd48cc..df448448e9 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Carrots.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Carrots.java @@ -21,10 +21,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CropsModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Carrots extends AbstractModelBlock { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.carrots0, Texture.carrots0, Texture.carrots1, Texture.carrots1, Texture.carrots2, Texture.carrots2, Texture.carrots2, Texture.carrots3 }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/CaveVines.java b/chunky/src/java/se/llbit/chunky/block/minecraft/CaveVines.java index 7951dc556d..8399491d65 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/CaveVines.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/CaveVines.java @@ -19,6 +19,7 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class CaveVines extends SpriteBlock { @@ -29,7 +30,7 @@ public CaveVines(String name, boolean berries, boolean body) { this.berries = berries; } - private static Texture getTexture(boolean body, boolean lit) { + private static AbstractTexture getTexture(boolean body, boolean lit) { if (body) { return lit ? Texture.caveVinesPlantLit : Texture.caveVinesPlant; } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Chain.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Chain.java index 8d91ad93d5..c8d5b3690b 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Chain.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Chain.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.ChainModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Chain extends AbstractModelBlock { private final String description; - public Chain(String name, Texture texture, String axis) { + public Chain(String name, AbstractTexture texture, String axis) { super(name, texture); model = new ChainModel(axis); description = "axis=" + axis; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/CopperBulb.java b/chunky/src/java/se/llbit/chunky/block/minecraft/CopperBulb.java index 31cc91ccae..bcb80f63b0 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/CopperBulb.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/CopperBulb.java @@ -19,13 +19,13 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.block.MinecraftBlock; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class CopperBulb extends MinecraftBlock { private final boolean lit; private final boolean powered; - public CopperBulb(String name, boolean lit, boolean powered, Texture lp, Texture lnp, Texture nlp, Texture nlnp) { + public CopperBulb(String name, boolean lit, boolean powered, AbstractTexture lp, AbstractTexture lnp, AbstractTexture nlp, AbstractTexture nlnp) { super(name, lit ? (powered ? lp : lnp) : (powered ? nlp : nlnp)); this.lit = lit; this.powered = powered; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/CoralFan.java b/chunky/src/java/se/llbit/chunky/block/minecraft/CoralFan.java index d68a3111c7..f2a87cc286 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/CoralFan.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/CoralFan.java @@ -23,6 +23,7 @@ import se.llbit.chunky.entity.Entity; import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -38,7 +39,7 @@ public CoralFan(String name, String coralType) { invisible = true; } - public static Texture coralTexture(String coralType) { + public static AbstractTexture coralTexture(String coralType) { switch (coralType) { default: case "tube": diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Crafter.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Crafter.java index ea389a8122..c33607aba7 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Crafter.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Crafter.java @@ -20,7 +20,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.RotatableBlockModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -29,8 +29,8 @@ public class Crafter extends AbstractModelBlock { private final String description; - public Crafter(String name, String orientation, boolean crafting, boolean triggered, Texture north, Texture northCrafting, Texture east, Texture eastCrafting, Texture eastTriggered, - Texture south, Texture southTriggered, Texture west, Texture westCrafting, Texture westTriggered, Texture top, Texture topCrafting, Texture topTriggered, Texture bottom) { + public Crafter(String name, String orientation, boolean crafting, boolean triggered, AbstractTexture north, AbstractTexture northCrafting, AbstractTexture east, AbstractTexture eastCrafting, AbstractTexture eastTriggered, + AbstractTexture south, AbstractTexture southTriggered, AbstractTexture west, AbstractTexture westCrafting, AbstractTexture westTriggered, AbstractTexture top, AbstractTexture topCrafting, AbstractTexture topTriggered, AbstractTexture bottom) { super(name, north); this.description = "orientation=" + orientation + ", crafting=" + crafting + ", triggered=" + triggered; RotatableBlockModel m = new RotatableBlockModel(crafting ? northCrafting : north, diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Dispenser.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Dispenser.java index 6fd60dfbe8..d0a95a683d 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Dispenser.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Dispenser.java @@ -21,6 +21,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.DispenserModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * The dispenser behaves almost like a TopBottomOrientedTexturedBlock. If it's facing up or down, it @@ -35,8 +36,8 @@ public Dispenser(String facing) { Texture.furnaceSide, Texture.furnaceTop); } - public Dispenser(String name, String facing, Texture front, Texture frontVertical, Texture side, - Texture back) { + public Dispenser(String name, String facing, AbstractTexture front, AbstractTexture frontVertical, AbstractTexture side, + AbstractTexture back) { super(name, front); opaque = true; solid = true; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Door.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Door.java index 7709d015ac..5a025c4539 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Door.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Door.java @@ -21,7 +21,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.block.BlockFace; import se.llbit.chunky.model.minecraft.DoorModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; // TODO: hinge placement is wrong for some variants. public class Door extends AbstractModelBlock { @@ -30,8 +30,8 @@ public class Door extends AbstractModelBlock { public final boolean open; private final String description; - public Door(String name, Texture texture, String facingString, String half, - String hinge, boolean open) { + public Door(String name, AbstractTexture texture, String facingString, String half, + String hinge, boolean open) { super(name, texture); this.description = String.format("facing=%s, half=%s, hinge=%s, open=%s", facingString, half, hinge, open); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Fence.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Fence.java index d94984a4f1..30b1242eac 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Fence.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Fence.java @@ -20,14 +20,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.FenceModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.BlockData; public class Fence extends AbstractModelBlock { private final String description; - public Fence(String name, Texture texture, + public Fence(String name, AbstractTexture texture, boolean north, boolean south, boolean east, boolean west) { super(name, texture); solid = false; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/FenceGate.java b/chunky/src/java/se/llbit/chunky/block/minecraft/FenceGate.java index 166a4706f7..625da356d7 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/FenceGate.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/FenceGate.java @@ -21,14 +21,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.block.BlockFace; import se.llbit.chunky.model.minecraft.FenceGateModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class FenceGate extends AbstractModelBlock { private final BlockFace facing; private final String description; - public FenceGate(String name, Texture texture, String facingString, boolean inWall, - boolean open) { + public FenceGate(String name, AbstractTexture texture, String facingString, boolean inWall, + boolean open) { super(name, texture); this.description = String.format("facing=%s, in_wall=%s, open=%s", facingString, inWall, open); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/FrostedIce.java b/chunky/src/java/se/llbit/chunky/block/minecraft/FrostedIce.java index 80b657d009..a864dad05b 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/FrostedIce.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/FrostedIce.java @@ -20,9 +20,10 @@ import se.llbit.chunky.block.MinecraftBlockTranslucent; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class FrostedIce extends MinecraftBlockTranslucent { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.frostedIce0, Texture.frostedIce1, Texture.frostedIce2, Texture.frostedIce3 }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Glass.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Glass.java index b83715d8c2..8fd8f44db0 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Glass.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Glass.java @@ -19,11 +19,11 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.block.MinecraftBlockTranslucent; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; public class Glass extends MinecraftBlockTranslucent { - public Glass(String name, Texture texture) { + public Glass(String name, AbstractTexture texture) { super(name, texture); ior = 1.52f; } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/GlassPane.java b/chunky/src/java/se/llbit/chunky/block/minecraft/GlassPane.java index 9864da8433..afc1d7c8c8 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/GlassPane.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/GlassPane.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.GlassPaneModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class GlassPane extends AbstractModelBlock { private final String description; - public GlassPane(String name, Texture side, Texture top, - boolean north, boolean south, boolean east, boolean west) { + public GlassPane(String name, AbstractTexture side, AbstractTexture top, + boolean north, boolean south, boolean east, boolean west) { super(name, side); localIntersect = true; this.description = String.format("north=%s, south=%s, east=%s, west=%s", diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/GlazedTerracotta.java b/chunky/src/java/se/llbit/chunky/block/minecraft/GlazedTerracotta.java index 05e6ed79ca..2519ef24a2 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/GlazedTerracotta.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/GlazedTerracotta.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.TerracottaModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class GlazedTerracotta extends AbstractModelBlock { private final String description; - public GlazedTerracotta(String name, Texture texture, String facingString) { + public GlazedTerracotta(String name, AbstractTexture texture, String facingString) { super(name, texture); this.description = "facing=" + facingString; int facing; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Head.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Head.java index df18771935..be8cb8c5a4 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Head.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Head.java @@ -23,7 +23,7 @@ import se.llbit.chunky.entity.SkullEntity; import se.llbit.chunky.entity.SkullEntity.Kind; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.log.Log; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -42,7 +42,7 @@ public class Head extends MinecraftBlockTranslucent { private final int rotation; private final SkullEntity.Kind type; - public Head(String name, Texture texture, SkullEntity.Kind type, int rotation) { + public Head(String name, AbstractTexture texture, SkullEntity.Kind type, int rotation) { super(name, texture); localIntersect = true; invisible = true; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Lantern.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Lantern.java index 32e590728a..a2e183d315 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Lantern.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Lantern.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.LanternModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Lantern extends AbstractModelBlock { private final boolean hanging; - public Lantern(String name, Texture texture, boolean hanging) { + public Lantern(String name, AbstractTexture texture, boolean hanging) { super(name, texture); this.hanging = hanging; this.model = new LanternModel(texture, hanging); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Leaves.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Leaves.java index 71e02f22fb..77331d6108 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Leaves.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Leaves.java @@ -20,17 +20,17 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.LeafModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Leaves extends AbstractModelBlock { - public Leaves(String name, Texture texture) { + public Leaves(String name, AbstractTexture texture) { super(name, texture); solid = false; this.model = new LeafModel(texture); } - public Leaves(String name, Texture texture, int tint) { + public Leaves(String name, AbstractTexture texture, int tint) { super(name, texture); solid = false; this.model = new LeafModel(texture, tint); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Log.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Log.java index 93bc901250..8dfb3eff50 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Log.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Log.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.LogModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Log extends AbstractModelBlock { private final String description; - public Log(String name, Texture side, Texture top, String axis) { + public Log(String name, AbstractTexture side, AbstractTexture top, String axis) { super(name, side); this.description = "axis=" + axis; this.model = new LogModel(axis, side, top); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/NetherWart.java b/chunky/src/java/se/llbit/chunky/block/minecraft/NetherWart.java index ebfc44a331..6e24a71f32 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/NetherWart.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/NetherWart.java @@ -21,10 +21,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CropsModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class NetherWart extends AbstractModelBlock { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.netherWart0, Texture.netherWart1, Texture.netherWart1, Texture.netherWart2 }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/PointedDripstone.java b/chunky/src/java/se/llbit/chunky/block/minecraft/PointedDripstone.java index f8d0ef8d68..78c40c1423 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/PointedDripstone.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/PointedDripstone.java @@ -19,6 +19,7 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class PointedDripstone extends SpriteBlock { @@ -27,7 +28,7 @@ public PointedDripstone(String thickness, String verticalDirection, boolean wate this.waterlogged = waterlogged; } - private static Texture getTexture(String thickness, String verticalDirection) { + private static AbstractTexture getTexture(String thickness, String verticalDirection) { if (verticalDirection.equals("down")) { switch (thickness) { case "tip_merge": diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Potatoes.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Potatoes.java index f3018fd7ca..b843f4a8de 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Potatoes.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Potatoes.java @@ -21,10 +21,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CropsModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Potatoes extends AbstractModelBlock { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.potatoes0, Texture.potatoes0, Texture.potatoes1, Texture.potatoes1, Texture.potatoes2, Texture.potatoes2, Texture.potatoes2, Texture.potatoes3 }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/PressurePlate.java b/chunky/src/java/se/llbit/chunky/block/minecraft/PressurePlate.java index 80669f152a..0a210df3a2 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/PressurePlate.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/PressurePlate.java @@ -20,11 +20,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.PressurePlateModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class PressurePlate extends AbstractModelBlock { - public PressurePlate(String name, Texture texture) { + public PressurePlate(String name, AbstractTexture texture) { super(name, texture); model = new PressurePlateModel(texture); } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Rail.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Rail.java index d3f36a2b03..0c1a3e6379 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Rail.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Rail.java @@ -21,14 +21,15 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.RailModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Rail extends AbstractModelBlock { private final String description; - public Rail(String name, Texture straightTrack, String shape) { + public Rail(String name, AbstractTexture straightTrack, String shape) { super(name, Texture.dispenserFront); - Texture[] texture = new Texture[]{ + AbstractTexture[] texture = new AbstractTexture[]{ straightTrack, straightTrack, straightTrack, straightTrack, straightTrack, straightTrack, Texture.railsCurved, Texture.railsCurved, Texture.railsCurved, Texture.railsCurved }; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/RespawnAnchor.java b/chunky/src/java/se/llbit/chunky/block/minecraft/RespawnAnchor.java index 83de2a8a24..b0c9815005 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/RespawnAnchor.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/RespawnAnchor.java @@ -20,9 +20,10 @@ import se.llbit.chunky.block.TexturedBlock; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class RespawnAnchor extends TexturedBlock { - private static final Texture[] sideTextures = new Texture[]{ + private static final AbstractTexture[] sideTextures = new AbstractTexture[]{ Texture.respawnAnchorSide0, Texture.respawnAnchorSide1, Texture.respawnAnchorSide2, diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/ShulkerBox.java b/chunky/src/java/se/llbit/chunky/block/minecraft/ShulkerBox.java index d9c2184e36..824fc06ab4 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/ShulkerBox.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/ShulkerBox.java @@ -20,13 +20,13 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.DirectionalBlockModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class ShulkerBox extends AbstractModelBlock { private final String description; - public ShulkerBox(String name, Texture side, Texture top, Texture bottom, String facing) { + public ShulkerBox(String name, AbstractTexture side, AbstractTexture top, AbstractTexture bottom, String facing) { super(name, side); this.description = "facing=" + facing; this.model = new DirectionalBlockModel(facing, top, bottom, side); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Slab.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Slab.java index de457f18ad..2bdd15e8e1 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Slab.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Slab.java @@ -20,20 +20,20 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.SlabModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Slab extends AbstractModelBlock { private final String description; - public Slab(String name, Texture sideTexture, Texture topTexture, String type) { + public Slab(String name, AbstractTexture sideTexture, AbstractTexture topTexture, String type) { super(name, sideTexture); this.description = String.format("type=%s", type); this.model = new SlabModel(sideTexture, topTexture, type); solid = type.equals("double"); } - public Slab(String name, Texture texture, String type) { + public Slab(String name, AbstractTexture texture, String type) { this(name, texture, texture, type); } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/SnifferEgg.java b/chunky/src/java/se/llbit/chunky/block/minecraft/SnifferEgg.java index 78b540d762..796598bac8 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/SnifferEgg.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/SnifferEgg.java @@ -21,6 +21,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.SnifferEggModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class SnifferEgg extends AbstractModelBlock { @@ -37,7 +38,7 @@ public String description() { return description; } - private static Texture getTopTexture(int hatch) { + private static AbstractTexture getTopTexture(int hatch) { switch (hatch) { case 1: return Texture.snifferEggSlightlyCrackedTop; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/SpriteBlock.java b/chunky/src/java/se/llbit/chunky/block/minecraft/SpriteBlock.java index 9a795fd913..cb19f36c6a 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/SpriteBlock.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/SpriteBlock.java @@ -20,19 +20,19 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.SpriteModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class SpriteBlock extends AbstractModelBlock { protected String facing; - public SpriteBlock(String name, Texture texture) { + public SpriteBlock(String name, AbstractTexture texture) { super(name, texture); solid = false; model = new SpriteModel(texture); } - public SpriteBlock(String name, Texture texture, String facing) { + public SpriteBlock(String name, AbstractTexture texture, String facing) { super(name, texture); solid = false; model = new SpriteModel(texture, facing); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Stairs.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Stairs.java index 875ca0ad12..00e8cb631b 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Stairs.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Stairs.java @@ -21,7 +21,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.block.BlockFace; import se.llbit.chunky.model.minecraft.StairModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Stairs extends AbstractModelBlock { @@ -29,11 +29,11 @@ public class Stairs extends AbstractModelBlock { private final BlockFace facing; private final String description; - public Stairs(String name, Texture texture, String half, String shape, String facing) { + public Stairs(String name, AbstractTexture texture, String half, String shape, String facing) { this(name, texture, texture, texture, half, shape, facing); } - public Stairs(String name, Texture side, Texture top, Texture bottom, + public Stairs(String name, AbstractTexture side, AbstractTexture top, AbstractTexture bottom, String half, String shape, String facing) { super(name, side); this.description = String.format("half=%s, shape=%s, facing=%s", half, shape, facing); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/SweetBerryBush.java b/chunky/src/java/se/llbit/chunky/block/minecraft/SweetBerryBush.java index 70dfa40131..740727f62f 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/SweetBerryBush.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/SweetBerryBush.java @@ -19,13 +19,14 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class SweetBerryBush extends SpriteBlock { public SweetBerryBush(int age) { super("sweet_berry_bush", getTextureByAge(age)); } - protected static Texture getTextureByAge(int age) { + protected static AbstractTexture getTextureByAge(int age) { switch (age) { case 0: return Texture.sweetBerryBushStage0; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Torch.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Torch.java index de080848a2..a2fcfaa557 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Torch.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Torch.java @@ -20,14 +20,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.TorchModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * A standing torch (on ground). */ public class Torch extends AbstractModelBlock { - public Torch(String name, Texture texture) { + public Torch(String name, AbstractTexture texture) { super(name, texture); solid = false; model = new TorchModel(texture, 5); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/TorchflowerCrop.java b/chunky/src/java/se/llbit/chunky/block/minecraft/TorchflowerCrop.java index 70c8a1d51b..d8c96a8d90 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/TorchflowerCrop.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/TorchflowerCrop.java @@ -19,13 +19,14 @@ package se.llbit.chunky.block.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class TorchflowerCrop extends SpriteBlock { public TorchflowerCrop(int age) { super("torchflower_crop", getTextureByAge(age)); } - protected static Texture getTextureByAge(int age) { + protected static AbstractTexture getTextureByAge(int age) { switch (age) { case 1: return Texture.torchflowerCropStage1; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Trapdoor.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Trapdoor.java index 722a56cc23..f37ec837db 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Trapdoor.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Trapdoor.java @@ -20,14 +20,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.TrapdoorModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; // TODO: fix rendering/texturing bugs. public class Trapdoor extends AbstractModelBlock { private final String description; - public Trapdoor(String name, Texture texture, + public Trapdoor(String name, AbstractTexture texture, String half, String facing, boolean open) { super(name, texture); solid = false; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Wall.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Wall.java index 6d6bf07896..c5efb36bd5 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Wall.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Wall.java @@ -20,14 +20,14 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.WallModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Wall extends AbstractModelBlock { private final String description; - public Wall(String name, Texture texture, String north, String south, String east, String west, - boolean up) { + public Wall(String name, AbstractTexture texture, String north, String south, String east, String west, + boolean up) { super(name, texture); this.description = String .format("north=%s, south=%s, east=%s, west=%s, up=%s", north, south, east, west, up); diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/WallBanner.java b/chunky/src/java/se/llbit/chunky/block/minecraft/WallBanner.java index 816a926185..8ed2ae1faa 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/WallBanner.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/WallBanner.java @@ -23,7 +23,7 @@ import se.llbit.chunky.entity.Entity; import se.llbit.chunky.entity.StandingBanner; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.json.Json; import se.llbit.json.JsonObject; import se.llbit.math.Ray; @@ -34,7 +34,7 @@ public class WallBanner extends MinecraftBlockTranslucent { private final int facing; private final BannerDesign.Color color; - public WallBanner(String name, Texture texture, String facing, BannerDesign.Color color) { + public WallBanner(String name, AbstractTexture texture, String facing, BannerDesign.Color color) { super(name, texture); invisible = true; opaque = false; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/WallHead.java b/chunky/src/java/se/llbit/chunky/block/minecraft/WallHead.java index 8cd02a59c5..a44f22d273 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/WallHead.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/WallHead.java @@ -24,7 +24,7 @@ import se.llbit.chunky.entity.SkullEntity; import se.llbit.chunky.entity.SkullEntity.Kind; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.log.Log; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -38,7 +38,7 @@ public class WallHead extends MinecraftBlockTranslucent { private final int facing; private final SkullEntity.Kind type; - public WallHead(String name, Texture texture, SkullEntity.Kind type, String facing) { + public WallHead(String name, AbstractTexture texture, SkullEntity.Kind type, String facing) { super(name, texture); localIntersect = true; invisible = true; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/WallTorch.java b/chunky/src/java/se/llbit/chunky/block/minecraft/WallTorch.java index 57f00b405f..67127bdda5 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/WallTorch.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/WallTorch.java @@ -20,7 +20,7 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.TorchModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; /** * A torch attached to a wall. @@ -28,7 +28,7 @@ public class WallTorch extends AbstractModelBlock { protected final String facing; - public WallTorch(String name, Texture texture, String facing) { + public WallTorch(String name, AbstractTexture texture, String facing) { super(name, texture); this.facing = facing; solid = false; diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Water.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Water.java index 1f819f50ff..9e86a7edc6 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Water.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Water.java @@ -199,7 +199,7 @@ public boolean isFullBlock() { boolean hit = false; for (Quad quad : fullBlock) { if (quad.intersect(ray)) { - texture.getAvgColorLinear(ray.color); + ray.color.set(texture.getAvgColorLinear()); ray.t = ray.tNext; ray.orientNormal(quad.n); hit = true; @@ -294,7 +294,7 @@ public boolean isFullBlock() { hit = true; } if (hit) { - texture.getAvgColorLinear(ray.color); + ray.color.set(texture.getAvgColorLinear()); ray.distance += ray.t; ray.o.scaleAdd(ray.t, ray.d); } diff --git a/chunky/src/java/se/llbit/chunky/block/minecraft/Wheat.java b/chunky/src/java/se/llbit/chunky/block/minecraft/Wheat.java index c68f4f96db..91a115f39f 100644 --- a/chunky/src/java/se/llbit/chunky/block/minecraft/Wheat.java +++ b/chunky/src/java/se/llbit/chunky/block/minecraft/Wheat.java @@ -21,10 +21,11 @@ import se.llbit.chunky.block.AbstractModelBlock; import se.llbit.chunky.model.minecraft.CropsModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class Wheat extends AbstractModelBlock { - private static final Texture[] texture = { + private static final AbstractTexture[] texture = { Texture.crops0, Texture.crops1, Texture.crops2, Texture.crops3, Texture.crops4, Texture.crops5, Texture.crops6, Texture.crops7 }; diff --git a/chunky/src/java/se/llbit/chunky/entity/BannerDesign.java b/chunky/src/java/se/llbit/chunky/entity/BannerDesign.java index 0e6ec2c259..898465c760 100644 --- a/chunky/src/java/se/llbit/chunky/entity/BannerDesign.java +++ b/chunky/src/java/se/llbit/chunky/entity/BannerDesign.java @@ -1,6 +1,7 @@ package se.llbit.chunky.entity; import se.llbit.chunky.resources.*; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.resources.texturepack.SimpleTexture; import se.llbit.log.Log; import se.llbit.math.ColorUtil; @@ -169,9 +170,9 @@ public Pattern(String pattern) { public BitmapImage getBitmap() { String[] namespaceFilename = pattern.split(":"); String texId = "assets/" + namespaceFilename[0] + "/textures/entity/banner/" + namespaceFilename[1]; - Texture texture = TextureCache.get(texId); + BitmapTexture texture = TextureCache.get(texId); if (texture == null) { - texture = new Texture(); + texture = new BitmapTexture(); TextureCache.put(texId, texture); if (!ResourcePackLoader.loadResources( diff --git a/chunky/src/java/se/llbit/chunky/entity/Campfire.java b/chunky/src/java/se/llbit/chunky/entity/Campfire.java index 36c8436860..a2b62f0faf 100644 --- a/chunky/src/java/se/llbit/chunky/entity/Campfire.java +++ b/chunky/src/java/se/llbit/chunky/entity/Campfire.java @@ -7,6 +7,7 @@ import se.llbit.chunky.block.Block; import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonObject; @@ -29,21 +30,21 @@ public enum Kind { } } - private static final Texture log = Texture.campfireLog; - private static final Texture litlog = Texture.campfireLogLit; - private static final Texture soullitlog = Texture.soulCampfireLogLit; + private static final AbstractTexture log = Texture.campfireLog; + private static final AbstractTexture litlog = Texture.campfireLogLit; + private static final AbstractTexture soullitlog = Texture.soulCampfireLogLit; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture[] tex = new AbstractTexture[]{ log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, }; - private static final Texture[] texLitCampfire = new Texture[]{ + private static final AbstractTexture[] texLitCampfire = new AbstractTexture[]{ log, log, log, litlog, log, log, log, litlog, log, log, litlog, litlog, log, log, litlog, log, log, log, log, litlog, log, log, litlog, litlog, litlog, log, log, log }; - private static final Texture[] texLitSoulCampfire = new Texture[]{ + private static final AbstractTexture[] texLitSoulCampfire = new AbstractTexture[]{ log, log, log, soullitlog, log, log, log, soullitlog, log, log, soullitlog, soullitlog, log, log, soullitlog, log, log, log, log, soullitlog, log, log, soullitlog, soullitlog, soullitlog, log, log, log @@ -303,7 +304,7 @@ public Collection primitives(Vector3 offset) { Transform transform = Transform.NONE .translate(position.x + offset.x, position.y + offset.y, position.z + offset.z); int facing = getOrientationIndex(this.facing); - Texture[] textures = + AbstractTexture[] textures = isLit ? (kind == Kind.SOUL_CAMPFIRE ? texLitSoulCampfire : texLitCampfire) : tex; for (int i = 0; i < orientedQuads[facing].length - 4; i++) { Material material = new TextureMaterial(textures[i]); diff --git a/chunky/src/java/se/llbit/chunky/entity/CoralFanEntity.java b/chunky/src/java/se/llbit/chunky/entity/CoralFanEntity.java index 5b39a00c16..10f6a27142 100644 --- a/chunky/src/java/se/llbit/chunky/entity/CoralFanEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/CoralFanEntity.java @@ -18,7 +18,7 @@ package se.llbit.chunky.entity; import se.llbit.chunky.block.minecraft.CoralFan; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonObject; @@ -90,7 +90,7 @@ public CoralFanEntity(Vector3 position, String coralType) { .translate(position.x + offset.x, position.y + offset.y, position.z + offset.z); - Texture texture = CoralFan.coralTexture(coralType); + AbstractTexture texture = CoralFan.coralTexture(coralType); Material mat = new TextureMaterial(texture); for (Quad quad : quads) { quad.addTriangles(faces, mat, transform); diff --git a/chunky/src/java/se/llbit/chunky/entity/HangingSignEntity.java b/chunky/src/java/se/llbit/chunky/entity/HangingSignEntity.java index 4863ce9bb7..18ac69e58b 100644 --- a/chunky/src/java/se/llbit/chunky/entity/HangingSignEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/HangingSignEntity.java @@ -3,6 +3,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.SignTexture; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonArray; import se.llbit.json.JsonObject; @@ -257,7 +258,7 @@ public class HangingSignEntity extends Entity { private final boolean frontGlowing; private final SignEntity.Color backDye; private final boolean backGlowing; - private final Texture texture; + private final AbstractTexture texture; private final String material; public HangingSignEntity(Vector3 position, CompoundTag entityTag, int rotation, boolean attached, String material) { @@ -266,7 +267,7 @@ public HangingSignEntity(Vector3 position, CompoundTag entityTag, int rotation, public HangingSignEntity(Vector3 position, JsonArray[] frontText, SignEntity.Color frontDye, boolean frontGlowing, JsonArray[] backText, SignEntity.Color backDye, boolean backGlowing, int rotation, boolean attached, String material) { super(position); - Texture signTexture = HangingSignEntity.textureFromMaterial(material); + AbstractTexture signTexture = HangingSignEntity.textureFromMaterial(material); this.frontText = frontText; this.backText = backText; this.frontDye = frontDye; @@ -288,7 +289,7 @@ public Collection primitives(Vector3 offset) { Quad[] quads = attached ? rotatedQuadsAttached[angle] : rotatedQuadsNotAttached[angle]; for (int i = 0; i < quads.length; ++i) { Quad quad = quads[i]; - Texture tex = texture; + AbstractTexture tex = texture; if (i == 4 && frontTexture != null) { tex = frontTexture; quad = frontFaceWithText[angle]; @@ -350,7 +351,7 @@ public static Entity fromJson(JsonObject json) { return new HangingSignEntity(position, frontText, dye, glowing, backText, backDye, backGlowing, direction, attached, material); } - public static Texture textureFromMaterial(String material) { + public static AbstractTexture textureFromMaterial(String material) { switch (material) { case "oak": return Texture.oakHangingSign; diff --git a/chunky/src/java/se/llbit/chunky/entity/Lectern.java b/chunky/src/java/se/llbit/chunky/entity/Lectern.java index c2ab652e58..190ee19be4 100644 --- a/chunky/src/java/se/llbit/chunky/entity/Lectern.java +++ b/chunky/src/java/se/llbit/chunky/entity/Lectern.java @@ -4,6 +4,7 @@ import java.util.LinkedList; import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonObject; import se.llbit.json.JsonValue; @@ -134,7 +135,7 @@ public class Lectern extends Entity implements Poseable { orientedTopQuads[3] = Model.rotateY(orientedTopQuads[2]); } - public static final Texture[] tex = { + public static final AbstractTexture[] tex = { Texture.lecternBase, Texture.oakPlanks, Texture.lecternBase, Texture.lecternBase, Texture.lecternBase, Texture.lecternBase, diff --git a/chunky/src/java/se/llbit/chunky/entity/PaintingEntity.java b/chunky/src/java/se/llbit/chunky/entity/PaintingEntity.java index fb86e1571e..5020e1a2ec 100644 --- a/chunky/src/java/se/llbit/chunky/entity/PaintingEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/PaintingEntity.java @@ -19,6 +19,7 @@ package se.llbit.chunky.entity; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonObject; @@ -40,7 +41,7 @@ public static class Painting { protected double ox; protected double oy; - public Painting(Texture painting, int w, int h) { + public Painting(AbstractTexture painting, int w, int h) { this.ox = -w / 2.0; this.oy = -h / 2.0; diff --git a/chunky/src/java/se/llbit/chunky/entity/PlayerEntity.java b/chunky/src/java/se/llbit/chunky/entity/PlayerEntity.java index 5bd97a02f4..44e1917085 100644 --- a/chunky/src/java/se/llbit/chunky/entity/PlayerEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/PlayerEntity.java @@ -23,6 +23,8 @@ import se.llbit.chunky.renderer.scene.PlayerModel; import se.llbit.chunky.resources.*; import se.llbit.chunky.resources.PlayerTexture.ExtendedUVMap; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.resources.texturepack.*; import se.llbit.chunky.world.PlayerEntityData; import se.llbit.chunky.world.material.TextureMaterial; @@ -628,56 +630,56 @@ private static void addModel(Collection primitives, CubeModel model, Transform baseTransform) { for (int i = 0; i < model.quads.length; ++i) { Quad quad = model.quads[i]; - Texture texture = model.textures[i]; + AbstractTexture texture = model.textures[i]; quad.addTriangles(primitives, new TextureMaterial(texture), baseTransform); } } static CubeModel getChestModel(JsonObject item) { JsonObject json = parseJson(chestJson); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } private static CubeModel getLeggingsModel(JsonObject item) { JsonObject json = parseJson(leggingsJson); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } static CubeModel getLeftPauldron(JsonObject item) { JsonObject json = parseJson(leftPauldron); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } static CubeModel getRightPauldron(JsonObject item) { JsonObject json = parseJson(rightPauldron); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } private static CubeModel getLeftLeg(JsonObject item) { JsonObject json = parseJson(leftLeg); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } private static CubeModel getRightLeg(JsonObject item) { JsonObject json = parseJson(rightLeg); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } private static CubeModel getLeftBoot(JsonObject item) { JsonObject json = parseJson(leftBoot); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } private static CubeModel getRightBoot(JsonObject item) { JsonObject json = parseJson(rightBoot); - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } @@ -725,7 +727,7 @@ static CubeModel getHelmModel(JsonObject item) { json = parseJson(skullJson); break; } - Map textureMap = Collections.singletonMap("#texture", getTexture(item)); + Map textureMap = Collections.singletonMap("#texture", getTexture(item)); return new CubeModel(JsonModel.fromJson(json), 16, textureMap); } @@ -755,12 +757,12 @@ public JsonValue toJson() { return json; } - static Texture getTexture(JsonObject item) { + static BitmapTexture getTexture(JsonObject item) { String id = item.get("id").asString(""); if (TextureCache.containsKey(item)) { return TextureCache.get(item); } - Texture texture = new Texture(); + BitmapTexture texture = new BitmapTexture(); String textureId = id; // Texture ID is used for log messages. if (id.startsWith("minecraft:")) { TextureLoader loader = null; @@ -895,11 +897,11 @@ static Texture getTexture(JsonObject item) { return texture; } - private static TextureLoader simpleTexture(String id, Texture texture) { + private static TextureLoader simpleTexture(String id, BitmapTexture texture) { return new SimpleTexture("assets/minecraft/textures/" + id, texture); } - private static TextureLoader leatherTexture(String id, int color, Texture texture) { + private static TextureLoader leatherTexture(String id, int color, BitmapTexture texture) { String textureName = "assets/minecraft/textures/" + id; return new LayeredTextureLoader(textureName + "_overlay", texture, new ColoredTexture(textureName, color, texture)); diff --git a/chunky/src/java/se/llbit/chunky/entity/SignEntity.java b/chunky/src/java/se/llbit/chunky/entity/SignEntity.java index e8524edf81..532edc51cb 100644 --- a/chunky/src/java/se/llbit/chunky/entity/SignEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/SignEntity.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.SignTexture; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonArray; import se.llbit.json.JsonObject; @@ -319,7 +320,7 @@ public Color getGlowingOutlineColor() { private final Color backDye; private final boolean frontGlowing; private final boolean backGlowing; - private final Texture texture; + private final AbstractTexture texture; private final String material; public SignEntity(Vector3 position, CompoundTag entityTag, int blockData, String material) { @@ -328,7 +329,7 @@ public SignEntity(Vector3 position, CompoundTag entityTag, int blockData, String public SignEntity(Vector3 position, JsonArray[] frontText, Color frontDye, boolean frontGlowing, JsonArray[] backText, Color backDye, boolean backGlowing, int direction, String material) { super(position); - Texture signTexture = SignEntity.textureFromMaterial(material); + AbstractTexture signTexture = SignEntity.textureFromMaterial(material); this.frontText = frontText; this.backText = backText; this.frontDye = frontDye; @@ -530,7 +531,7 @@ public Collection primitives(Vector3 offset) { .translate(position.x + offset.x, position.y + offset.y, position.z + offset.z); for (int i = 0; i < sides.length; ++i) { Quad quad = rot[angle][i]; - Texture tex = texture; + AbstractTexture tex = texture; if (i == 0 && frontTexture != null) { tex = frontTexture; quad = frontFaceWithText[angle]; @@ -615,7 +616,7 @@ protected static JsonArray[] textFromJson(JsonValue json) { return text; } - public static Texture textureFromMaterial(String material) { + public static AbstractTexture textureFromMaterial(String material) { switch (material) { case "oak": return Texture.oakSignPost; diff --git a/chunky/src/java/se/llbit/chunky/entity/StandingBanner.java b/chunky/src/java/se/llbit/chunky/entity/StandingBanner.java index e8badb5e45..4ed1824ae6 100644 --- a/chunky/src/java/se/llbit/chunky/entity/StandingBanner.java +++ b/chunky/src/java/se/llbit/chunky/entity/StandingBanner.java @@ -21,6 +21,8 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.Texture; import se.llbit.chunky.resources.TextureCache; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonArray; @@ -224,7 +226,7 @@ public static Material getBannerTexture(JsonObject design) { if (base == BannerDesign.Color.WHITE && patterns.isEmpty()) { return new TextureMaterial(Texture.bannerBase); } - Texture cachedTexture = TextureCache.get(design); + AbstractTexture cachedTexture = TextureCache.get(design); if (cachedTexture != null) { return new TextureMaterial(cachedTexture); } @@ -273,7 +275,7 @@ public static Material getBannerTexture(JsonObject design) { } } } - Texture texture = new Texture(tinted); + BitmapTexture texture = new BitmapTexture(tinted); TextureCache.put(design, texture); return new TextureMaterial(texture); } diff --git a/chunky/src/java/se/llbit/chunky/entity/WallCoralFanEntity.java b/chunky/src/java/se/llbit/chunky/entity/WallCoralFanEntity.java index c779bf8022..522eb1f33d 100644 --- a/chunky/src/java/se/llbit/chunky/entity/WallCoralFanEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/WallCoralFanEntity.java @@ -18,7 +18,7 @@ package se.llbit.chunky.entity; import se.llbit.chunky.block.minecraft.CoralFan; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonObject; @@ -87,7 +87,7 @@ public WallCoralFanEntity(Vector3 position, String coralType, String facing) { position.x + offset.x + 0.5, position.y + offset.y + 0.5, position.z + offset.z + 0.5); - Texture texture = CoralFan.coralTexture(coralType); + AbstractTexture texture = CoralFan.coralTexture(coralType); Material mat = new TextureMaterial(texture); for (Quad quad : quads) { quad.addTriangles(faces, mat, transform); diff --git a/chunky/src/java/se/llbit/chunky/entity/WallHangingSignEntity.java b/chunky/src/java/se/llbit/chunky/entity/WallHangingSignEntity.java index ab2b75f2a3..875fc51674 100644 --- a/chunky/src/java/se/llbit/chunky/entity/WallHangingSignEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/WallHangingSignEntity.java @@ -3,7 +3,7 @@ import se.llbit.chunky.block.minecraft.WallHangingSign; import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.SignTexture; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonArray; import se.llbit.json.JsonObject; @@ -237,7 +237,7 @@ public class WallHangingSignEntity extends Entity { private final SignEntity.Color backDye; private final boolean frontGlowing; private final boolean backGlowing; - private final Texture texture; + private final AbstractTexture texture; private final String material; public WallHangingSignEntity(Vector3 position, CompoundTag entityTag, WallHangingSign.Facing direction, String material) { @@ -246,7 +246,7 @@ public WallHangingSignEntity(Vector3 position, CompoundTag entityTag, WallHangin public WallHangingSignEntity(Vector3 position, JsonArray[] frontText, SignEntity.Color frontDye, boolean frontGlowing, JsonArray[] backText, SignEntity.Color backDye, boolean backGlowing, WallHangingSign.Facing direction, String material) { super(position); - Texture signTexture = HangingSignEntity.textureFromMaterial(material); + AbstractTexture signTexture = HangingSignEntity.textureFromMaterial(material); this.frontText = frontText; this.backText = backText; this.frontDye = frontDye; @@ -266,7 +266,7 @@ public Collection primitives(Vector3 offset) { Quad[] quads = rotatedQuads[orientation.ordinal()]; for (int i = 0; i < quads.length; ++i) { Quad quad = quads[i]; - Texture tex = texture; + AbstractTexture tex = texture; if (i == 4 && frontTexture != null) { tex = frontTexture; quad = frontFaceWithText[orientation.ordinal()]; diff --git a/chunky/src/java/se/llbit/chunky/entity/WallSignEntity.java b/chunky/src/java/se/llbit/chunky/entity/WallSignEntity.java index 336b94965c..429590899b 100644 --- a/chunky/src/java/se/llbit/chunky/entity/WallSignEntity.java +++ b/chunky/src/java/se/llbit/chunky/entity/WallSignEntity.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.resources.SignTexture; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.json.JsonArray; import se.llbit.json.JsonObject; @@ -97,7 +97,7 @@ public class WallSignEntity extends Entity { private final boolean glowing; private final int orientation; private final SignTexture frontTexture; - private final Texture texture; + private final AbstractTexture texture; private final String material; public WallSignEntity(Vector3 position, CompoundTag entityTag, int blockData, String material) { @@ -106,7 +106,7 @@ public WallSignEntity(Vector3 position, CompoundTag entityTag, int blockData, St public WallSignEntity(Vector3 position, JsonArray[] text, SignEntity.Color dye, boolean isGlowing, int direction, String material) { super(position); - Texture signTexture = SignEntity.textureFromMaterial(material); + AbstractTexture signTexture = SignEntity.textureFromMaterial(material); this.orientation = direction; this.text = text; this.dye = dye; @@ -124,7 +124,7 @@ public Collection primitives(Vector3 offset) { Quad[] quads = faces[orientation]; for (int i = 0; i < quads.length; ++i) { Quad quad = quads[i]; - Texture tex = texture; + AbstractTexture tex = texture; if (i == 0 && frontTexture != null) { tex = frontTexture; quad = frontFaceWithText[orientation]; diff --git a/chunky/src/java/se/llbit/chunky/model/AABBModel.java b/chunky/src/java/se/llbit/chunky/model/AABBModel.java index 90ca47f55e..4682d30133 100644 --- a/chunky/src/java/se/llbit/chunky/model/AABBModel.java +++ b/chunky/src/java/se/llbit/chunky/model/AABBModel.java @@ -2,13 +2,12 @@ import se.llbit.chunky.plugin.PluginApi; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import se.llbit.math.Ray; import se.llbit.math.Vector3; import java.util.Arrays; -import java.util.List; import java.util.Objects; import java.util.Random; @@ -42,7 +41,7 @@ public enum UVMapping { public abstract AABB[] getBoxes(); @PluginApi - public abstract Texture[][] getTextures(); + public abstract AbstractTexture[][] getTextures(); @PluginApi public Tint[][] getTints() { @@ -72,7 +71,7 @@ public double faceSurfaceArea(int face) { @Override public boolean intersect(Ray ray, Scene scene) { AABB[] boxes = getBoxes(); - Texture[][] textures = getTextures(); + AbstractTexture[][] textures = getTextures(); UVMapping[][] mapping = getUVMapping(); Tint[][] tintedFaces = getTints(); @@ -141,7 +140,7 @@ public boolean intersect(Ray ray, Scene scene) { return hit; } - private boolean intersectFace(Ray ray, Scene scene, Texture texture, UVMapping mapping) { + private boolean intersectFace(Ray ray, Scene scene, AbstractTexture texture, UVMapping mapping) { // This is the method that handles intersecting faces of all AABB-based models. // Do normal mapping, parallax occlusion mapping, specular maps and all the good stuff here! diff --git a/chunky/src/java/se/llbit/chunky/model/AnimatedQuadModel.java b/chunky/src/java/se/llbit/chunky/model/AnimatedQuadModel.java index 48946e75cf..9e1d9df0d5 100644 --- a/chunky/src/java/se/llbit/chunky/model/AnimatedQuadModel.java +++ b/chunky/src/java/se/llbit/chunky/model/AnimatedQuadModel.java @@ -2,7 +2,7 @@ import se.llbit.chunky.plugin.PluginApi; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.AnimatedTexture; +import se.llbit.chunky.resources.texture.AnimatedTexture; import se.llbit.math.Quad; import se.llbit.math.Ray; import se.llbit.math.Vector3; diff --git a/chunky/src/java/se/llbit/chunky/model/DirectionalBlockModel.java b/chunky/src/java/se/llbit/chunky/model/DirectionalBlockModel.java index dccf711f00..f1d60f8cda 100644 --- a/chunky/src/java/se/llbit/chunky/model/DirectionalBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/DirectionalBlockModel.java @@ -17,7 +17,7 @@ */ package se.llbit.chunky.model; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -77,10 +77,10 @@ public class DirectionalBlockModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public DirectionalBlockModel(String facing, Texture front, Texture back, Texture side) { - textures = new Texture[] {side, side, side, side, front, back}; + public DirectionalBlockModel(String facing, AbstractTexture front, AbstractTexture back, AbstractTexture side) { + textures = new AbstractTexture[] {side, side, side, side, front, back}; switch (facing) { case "up": quads = faces[1]; @@ -110,7 +110,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/FixedTopBottomRotatableTexturedBlockModel.java b/chunky/src/java/se/llbit/chunky/model/FixedTopBottomRotatableTexturedBlockModel.java index 2f5509ad0a..5e27ab5ec2 100644 --- a/chunky/src/java/se/llbit/chunky/model/FixedTopBottomRotatableTexturedBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/FixedTopBottomRotatableTexturedBlockModel.java @@ -1,6 +1,6 @@ package se.llbit.chunky.model; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; /** @@ -11,7 +11,7 @@ public class FixedTopBottomRotatableTexturedBlockModel extends QuadModel { protected final Quad[] quads; - protected final Texture[] textures; + protected final AbstractTexture[] textures; /** * @param facing accepted values: "north", "south", "west", "east" @@ -21,15 +21,15 @@ public class FixedTopBottomRotatableTexturedBlockModel extends QuadModel { public FixedTopBottomRotatableTexturedBlockModel( String facing, Quad[] quads, - Texture[] textures + AbstractTexture[] textures ) { this.quads = rotateToFacing(facing, quads); this.textures = textures; } public FixedTopBottomRotatableTexturedBlockModel(String facing, - Texture north, Texture east, Texture south, Texture west, Texture top, Texture bottom) { - this(facing, FULL_BLOCK_QUADS, new Texture[]{north, south, west, east, top, bottom}); + AbstractTexture north, AbstractTexture east, AbstractTexture south, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { + this(facing, FULL_BLOCK_QUADS, new AbstractTexture[]{north, south, west, east, top, bottom}); } public static Quad[] rotateToFacing(String facing, Quad[] quads) { @@ -66,7 +66,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/GrassTintedSpriteModel.java b/chunky/src/java/se/llbit/chunky/model/GrassTintedSpriteModel.java index 30f336e6cb..091d5e59a4 100644 --- a/chunky/src/java/se/llbit/chunky/model/GrassTintedSpriteModel.java +++ b/chunky/src/java/se/llbit/chunky/model/GrassTintedSpriteModel.java @@ -17,7 +17,7 @@ package se.llbit.chunky.model; import se.llbit.chunky.model.minecraft.SpriteModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; public class GrassTintedSpriteModel extends SpriteModel { @@ -25,7 +25,7 @@ public class GrassTintedSpriteModel extends SpriteModel { Tint.BIOME_GRASS, Tint.BIOME_GRASS, Tint.BIOME_GRASS, Tint.BIOME_GRASS }; - public GrassTintedSpriteModel(Texture texture) { + public GrassTintedSpriteModel(AbstractTexture texture) { super(texture); } diff --git a/chunky/src/java/se/llbit/chunky/model/QuadModel.java b/chunky/src/java/se/llbit/chunky/model/QuadModel.java index e8bdcfb9c4..be37d64f45 100644 --- a/chunky/src/java/se/llbit/chunky/model/QuadModel.java +++ b/chunky/src/java/se/llbit/chunky/model/QuadModel.java @@ -18,11 +18,9 @@ package se.llbit.chunky.model; -import se.llbit.chunky.model.BlockModel; -import se.llbit.chunky.model.Tint; import se.llbit.chunky.plugin.PluginApi; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -84,7 +82,7 @@ public abstract class QuadModel implements BlockModel { public abstract Quad[] getQuads(); @PluginApi - public abstract Texture[] getTextures(); + public abstract AbstractTexture[] getTextures(); @PluginApi public Tint[] getTints() { @@ -112,7 +110,7 @@ public boolean intersect(Ray ray, Scene scene) { ray.t = Double.POSITIVE_INFINITY; Quad[] quads = getQuads(); - Texture[] textures = getTextures(); + AbstractTexture[] textures = getTextures(); Tint[] tintedQuads = getTints(); float[] color = null; diff --git a/chunky/src/java/se/llbit/chunky/model/RotatableBlockModel.java b/chunky/src/java/se/llbit/chunky/model/RotatableBlockModel.java index a397387a13..913fdb96a8 100644 --- a/chunky/src/java/se/llbit/chunky/model/RotatableBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/RotatableBlockModel.java @@ -17,10 +17,8 @@ */ package se.llbit.chunky.model; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; -import se.llbit.math.Vector3; -import se.llbit.math.Vector4; /** * This block model is used to render blocks which can face east, west, north, south, up and down. @@ -35,10 +33,10 @@ public class RotatableBlockModel extends QuadModel { FULL_BLOCK_TOP_SIDE, FULL_BLOCK_BOTTOM_SIDE }; - private final Texture[] textures; + private final AbstractTexture[] textures; - public RotatableBlockModel(Texture north, Texture east, Texture south, Texture west, Texture top, Texture bottom) { - textures = new Texture[] {north, east, south, west, top, bottom}; + public RotatableBlockModel(AbstractTexture north, AbstractTexture east, AbstractTexture south, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { + textures = new AbstractTexture[] {north, east, south, west, top, bottom}; } public void setFaceQuad(int face, Quad quad) { @@ -105,7 +103,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/TexturedBlockModel.java b/chunky/src/java/se/llbit/chunky/model/TexturedBlockModel.java index fdb3568dff..7606cd4662 100644 --- a/chunky/src/java/se/llbit/chunky/model/TexturedBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/TexturedBlockModel.java @@ -17,7 +17,7 @@ package se.llbit.chunky.model; import se.llbit.chunky.block.minecraft.Air; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import se.llbit.math.QuickMath; import se.llbit.math.Ray; @@ -31,10 +31,10 @@ public class TexturedBlockModel extends AABBModel { private static final AABB[] boxes = { new AABB(0, 1, 0, 1, 0, 1) }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public TexturedBlockModel(Texture north, Texture east, Texture south, Texture west, Texture top, Texture bottom) { - this.textures = new Texture[][] {{ + public TexturedBlockModel(AbstractTexture north, AbstractTexture east, AbstractTexture south, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { + this.textures = new AbstractTexture[][] {{ north, east, south, west, top, bottom }}; } @@ -45,7 +45,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/TopBottomOrientedTexturedBlockModel.java b/chunky/src/java/se/llbit/chunky/model/TopBottomOrientedTexturedBlockModel.java index 1339e97fb1..68987688b9 100644 --- a/chunky/src/java/se/llbit/chunky/model/TopBottomOrientedTexturedBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/TopBottomOrientedTexturedBlockModel.java @@ -1,6 +1,6 @@ package se.llbit.chunky.model; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; /** @@ -10,7 +10,7 @@ public class TopBottomOrientedTexturedBlockModel extends QuadModel { protected final Quad[] quads; - protected final Texture[] textures; + protected final AbstractTexture[] textures; /** * @param facing accepted values: "north", "south", "west", "east" @@ -20,15 +20,15 @@ public class TopBottomOrientedTexturedBlockModel extends QuadModel { public TopBottomOrientedTexturedBlockModel( String facing, Quad[] quads, - Texture[] textures + AbstractTexture[] textures ) { this.quads = rotateToFacing(facing, quads); this.textures = textures; } public TopBottomOrientedTexturedBlockModel(String facing, - Texture north, Texture east, Texture south, Texture west, Texture top, Texture bottom) { - this(facing, FULL_BLOCK_QUADS, new Texture[]{north, south, west, east, top, bottom}); + AbstractTexture north, AbstractTexture east, AbstractTexture south, AbstractTexture west, AbstractTexture top, AbstractTexture bottom) { + this(facing, FULL_BLOCK_QUADS, new AbstractTexture[]{north, south, west, east, top, bottom}); } public static Quad[] rotateToFacing(String facing, Quad[] quads) { @@ -52,7 +52,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/AnvilModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/AnvilModel.java index a754216bc4..f930be98bc 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/AnvilModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/AnvilModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; /** @@ -44,7 +45,7 @@ public class AnvilModel extends AABBModel { }, }; - public static final Texture[] topTexture = { + public static final AbstractTexture[] topTexture = { Texture.anvilTop, Texture.anvilTopDamaged1, Texture.anvilTopDamaged2, @@ -52,15 +53,15 @@ public class AnvilModel extends AABBModel { }; private final int orientation; - private final Texture[][] textures; + private final AbstractTexture[][] textures; private final UVMapping[][] mapping; public AnvilModel(int orientation, int damage) { this.orientation = orientation; - Texture side = Texture.anvilSide; - Texture top = topTexture[damage]; - this.textures = new Texture[][] { + AbstractTexture side = Texture.anvilSide; + AbstractTexture top = topTexture[damage]; + this.textures = new AbstractTexture[][] { {side, side, side, side, top, side}, {side, side, side, side, side, side}, {side, side, side, side, side, side}, @@ -90,7 +91,7 @@ public UVMapping[][] getUVMapping() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return this.textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/AttachedStemModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/AttachedStemModel.java index 4350c4925a..7a3c969003 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/AttachedStemModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/AttachedStemModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -46,7 +47,7 @@ public class AttachedStemModel extends QuadModel { new Vector3(1, (height + 1) / 8., 0), new Vector4(0, 1, (7 - height) / 8., 1), true); } - private static final Texture[] textures = { + private static final AbstractTexture[] textures = { Texture.stemStraight, Texture.stemStraight, Texture.stemBent }; @@ -72,7 +73,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/AzaleaModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/AzaleaModel.java index 841cd8a8f8..d709cad46d 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/AzaleaModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/AzaleaModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -125,11 +126,11 @@ public class AzaleaModel extends QuadModel { ); //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; - public AzaleaModel(Texture top, Texture side) { - Texture plant = Texture.azaleaPlant; - textures = new Texture[14]; + public AzaleaModel(AbstractTexture top, AbstractTexture side) { + AbstractTexture plant = Texture.azaleaPlant; + textures = new AbstractTexture[14]; for (int i = 0; i < 2; i++) textures[i] = top; for (int i = 2; i < 10; i++) textures[i] = side; for (int i = 10; i < 14; i++) textures[i] = plant; @@ -141,7 +142,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BambooModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BambooModel.java index 9ef08c97f2..ccb0e620d4 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BambooModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BambooModel.java @@ -23,13 +23,14 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class BambooModel extends QuadModel { - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture[] tex = new AbstractTexture[]{ Texture.bambooStalk, Texture.bambooStalk, Texture.bambooStalk, Texture.bambooStalk, Texture.bambooStalk, Texture.bambooStalk }; @@ -118,7 +119,7 @@ public class BambooModel extends QuadModel { }; //endregion - private static final Texture[] smallLeavesTex = new Texture[]{ + private static final AbstractTexture[] smallLeavesTex = new AbstractTexture[]{ Texture.bambooSmallLeaves, Texture.bambooSmallLeaves, Texture.bambooSmallLeaves, Texture.bambooSmallLeaves, }; @@ -152,7 +153,7 @@ public class BambooModel extends QuadModel { }; //endregion - private static final Texture[] largeLeavesTex = new Texture[]{ + private static final AbstractTexture[] largeLeavesTex = new AbstractTexture[]{ Texture.bambooLargeLeaves, Texture.bambooLargeLeaves, Texture.bambooLargeLeaves, Texture.bambooLargeLeaves }; @@ -187,7 +188,7 @@ public class BambooModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public BambooModel(int age, String leaves) { if ("small".equals(leaves)) { @@ -214,12 +215,12 @@ public BambooModel(int age, String leaves) { } } - private Texture[] joinTextures(Texture[]... textures) { + private AbstractTexture[] joinTextures(AbstractTexture[]... textures) { int length = 0; - for (Texture[] tex : textures) { + for (AbstractTexture[] tex : textures) { length += tex.length; } - Texture[] joined = Arrays.copyOf(textures[0], length); + AbstractTexture[] joined = Arrays.copyOf(textures[0], length); int offset = textures[0].length; for (int i = 1; i < textures.length; i++) { System.arraycopy(textures[i], 0, joined, offset, textures[i].length); @@ -234,7 +235,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BarrelModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BarrelModel.java index ffe39c462e..57d1a3e9ae 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BarrelModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BarrelModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -53,10 +54,10 @@ public class BarrelModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public BarrelModel(String facing, String open) { - textures = new Texture[] {Texture.barrelSide, Texture.barrelSide, Texture.barrelSide, Texture.barrelSide, + textures = new AbstractTexture[] {Texture.barrelSide, Texture.barrelSide, Texture.barrelSide, Texture.barrelSide, open.equals("true") ? Texture.barrelOpen : Texture.barrelTop, Texture.barrelBottom}; switch (facing) { default: @@ -87,7 +88,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BeaconModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BeaconModel.java index 891f67d0ed..a9b7329c6c 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BeaconModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BeaconModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; /** @@ -33,7 +34,7 @@ public class BeaconModel extends AABBModel { new AABB(2 / 16., 14 / 16., 0, 3 / 16., 2 / 16., 14 / 16.) }; - private static final Texture[][] textures = { + private static final AbstractTexture[][] textures = { {Texture.glass, Texture.glass, Texture.glass, Texture.glass, Texture.glass, Texture.glass}, {Texture.beacon, Texture.beacon, Texture.beacon, Texture.beacon, Texture.beacon, Texture.beacon}, {Texture.obsidian, Texture.obsidian,Texture.obsidian,Texture.obsidian,Texture.obsidian,Texture.obsidian} @@ -46,7 +47,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BedModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BedModel.java index defbdeed22..3f9ae3e768 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BedModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BedModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -193,13 +193,13 @@ public class BedModel extends QuadModel { }; //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; private final Quad[] quads; - public BedModel(boolean isHead, int facing, Texture color) { + public BedModel(boolean isHead, int facing, AbstractTexture color) { quads = Model.rotateY(isHead ? head : foot, -Math.toRadians(90 * facing)); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, color); } @@ -209,7 +209,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BellModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BellModel.java index 04407dd8b3..cacd0af808 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BellModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BellModel.java @@ -21,31 +21,32 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class BellModel extends QuadModel { - private static final Texture bell = Texture.bellBody; - private static final Texture bar = Texture.darkOakPlanks; - private static final Texture post = Texture.stone; + private static final AbstractTexture bell = Texture.bellBody; + private static final AbstractTexture bar = Texture.darkOakPlanks; + private static final AbstractTexture post = Texture.stone; - private static final Texture[] texBellFloor = new Texture[] { + private static final AbstractTexture[] texBellFloor = new AbstractTexture[] { bar, bar, bar, bar, post, post, post, post, post, post, post, post, post, post, post, post, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell }; - private static final Texture[] texBellWall = new Texture[] { + private static final AbstractTexture[] texBellWall = new AbstractTexture[] { bar, bar, bar, bar, bar, bar, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell }; - private static final Texture[] texBellDoubleWall = new Texture[] { + private static final AbstractTexture[] texBellDoubleWall = new AbstractTexture[] { bar, bar, bar, bar, bar, bar, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell }; - private static final Texture[] texBellCeiling = new Texture[] { + private static final AbstractTexture[] texBellCeiling = new AbstractTexture[] { bar, bar, bar, bar, bar, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell, bell }; @@ -339,7 +340,7 @@ public class BellModel extends QuadModel { }; //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; private Quad[] quads; public BellModel(String facing, String attachment) { @@ -403,7 +404,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafModel.java index dc821bce73..d77bbbe5d6 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -282,14 +283,14 @@ public class BigDripleafModel extends QuadModel { ); //#endregion - private static final Texture[] textures; + private static final AbstractTexture[] textures; static { - Texture top = Texture.bigDripleafTop; - Texture tip = Texture.bigDripleafTip; - Texture side = Texture.bigDripleafSide; - Texture stem = Texture.bigDripleafStem; - textures = new Texture[] {top, top, tip, tip, side, side, side, side, stem, stem, stem, stem}; + AbstractTexture top = Texture.bigDripleafTop; + AbstractTexture tip = Texture.bigDripleafTip; + AbstractTexture side = Texture.bigDripleafSide; + AbstractTexture stem = Texture.bigDripleafStem; + textures = new AbstractTexture[] {top, top, tip, tip, side, side, side, side, stem, stem, stem, stem}; } private Quad[] quads; @@ -322,7 +323,7 @@ public BigDripleafModel(String facing, String tilt) { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafStemModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafStemModel.java index 3540bbff23..f30db40d8e 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafStemModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BigDripleafStemModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -65,7 +66,7 @@ public class BigDripleafStemModel extends QuadModel { ); //endregion - private static final Texture[] textures = new Texture[quadsNorth.length]; + private static final AbstractTexture[] textures = new AbstractTexture[quadsNorth.length]; static { Arrays.fill(textures, Texture.bigDripleafStem); } private final Quad[] quads; @@ -94,7 +95,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/BrewingStandModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/BrewingStandModel.java index 792b574c03..0781b5b399 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/BrewingStandModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/BrewingStandModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -209,9 +210,9 @@ public class BrewingStandModel extends QuadModel { }; //endregion - private static final Texture base = Texture.brewingStandBase; - private static final Texture stand = Texture.brewingStandSide; - private static final Texture[] tex = new Texture[] { + private static final AbstractTexture base = Texture.brewingStandBase; + private static final AbstractTexture stand = Texture.brewingStandSide; + private static final AbstractTexture[] tex = new AbstractTexture[] { stand, stand, stand, stand, stand, stand, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, base, stand, stand, stand }; @@ -233,7 +234,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return tex; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ButtonModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ButtonModel.java index 7700865158..63c75bc58f 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ButtonModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ButtonModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -54,10 +54,10 @@ public class ButtonModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public ButtonModel(String face, String facing, Texture tex) { - textures = new Texture[attachedSouth.length]; + public ButtonModel(String face, String facing, AbstractTexture tex) { + textures = new AbstractTexture[attachedSouth.length]; Arrays.fill(textures, tex); switch (face) { @@ -93,7 +93,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CactusModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CactusModel.java index d3b74253f9..564da3a9d3 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CactusModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CactusModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -49,7 +50,7 @@ public class CactusModel extends QuadModel { new Quad(new Vector3(0, 0, 0), new Vector3(1, 0, 0), new Vector3(0, 0, 1), new Vector4(0, 1, 0, 1)),}; - private static final Texture[] textures = { + private static final AbstractTexture[] textures = { Texture.cactusSide, Texture.cactusSide, Texture.cactusSide, Texture.cactusSide, Texture.cactusTop, Texture.cactusBottom }; @@ -61,7 +62,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CakeModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CakeModel.java index ecafdafeeb..4ae45bebc7 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CakeModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CakeModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -59,16 +60,16 @@ public class CakeModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public CakeModel(int bites) { this.quads = cake[bites]; - Texture top = Texture.cakeTop; - Texture side = Texture.cakeSide; - Texture bottom = Texture.cakeBottom; - Texture inside = Texture.cakeInside; - textures = new Texture[]{side, side, bites == 0 ? side : inside, side, top, bottom}; + AbstractTexture top = Texture.cakeTop; + AbstractTexture side = Texture.cakeSide; + AbstractTexture bottom = Texture.cakeBottom; + AbstractTexture inside = Texture.cakeInside; + textures = new AbstractTexture[]{side, side, bites == 0 ? side : inside, side, top, bottom}; } @Override @@ -77,7 +78,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CakeWithCandleModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CakeWithCandleModel.java index e70bef9c9a..1fd5c55c36 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CakeWithCandleModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CakeWithCandleModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -29,9 +30,9 @@ public class CakeWithCandleModel extends QuadModel { - private static final Texture bottom = Texture.cakeBottom; - private static final Texture top = Texture.cakeTop; - private static final Texture side = Texture.cakeSide; + private static final AbstractTexture bottom = Texture.cakeBottom; + private static final AbstractTexture top = Texture.cakeTop; + private static final AbstractTexture side = Texture.cakeSide; //region Cake With Candle private static final Quad[] quads = Model.join( @@ -139,12 +140,12 @@ public class CakeWithCandleModel extends QuadModel { }, Math.toRadians(45))); //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; - public CakeWithCandleModel(Texture candle) { - textures = new Texture[quads.length]; + public CakeWithCandleModel(AbstractTexture candle) { + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, candle); - System.arraycopy(new Texture[] {top, bottom, side, side, side, side}, 0, textures, 0, 6); + System.arraycopy(new AbstractTexture[] {top, bottom, side, side, side, side}, 0, textures, 0, 6); } @Override @@ -153,7 +154,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CalibratedSculkSensorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CalibratedSculkSensorModel.java index 8c176be5dd..c4fde9fd92 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CalibratedSculkSensorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CalibratedSculkSensorModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -28,11 +29,11 @@ import java.util.Arrays; public class CalibratedSculkSensorModel extends QuadModel { - private static final Texture bottom = Texture.sculkSensorBottom; - private static final Texture side = Texture.sculkSensorSide; - private static final Texture calibrated_side = Texture.calibratedSculkSensorInputSide; - private static final Texture top = Texture.calibratedSculkSensorTop; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture bottom = Texture.sculkSensorBottom; + private static final AbstractTexture side = Texture.sculkSensorSide; + private static final AbstractTexture calibrated_side = Texture.calibratedSculkSensorInputSide; + private static final AbstractTexture top = Texture.calibratedSculkSensorTop; + private static final AbstractTexture[] tex = new AbstractTexture[]{ top, bottom, side, side, side, calibrated_side, }; @@ -153,10 +154,10 @@ public class CalibratedSculkSensorModel extends QuadModel { private static final Quad[] quadsWest = Model.rotateNegY(quadsNorth); private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public CalibratedSculkSensorModel(boolean active, String facing) { - textures = new Texture[quadsNorth.length]; + textures = new AbstractTexture[quadsNorth.length]; if (facing.equals("east")) { quads = quadsEast; } else if (facing.equals("south")) { @@ -177,7 +178,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CandleModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CandleModel.java index 00132cc131..54b19c1da6 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CandleModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CandleModel.java @@ -20,7 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -703,11 +703,11 @@ public class CandleModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public CandleModel(Texture candle, int candles) { + public CandleModel(AbstractTexture candle, int candles) { quads = candleModel[candles-1]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, candle); } @@ -717,7 +717,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CarpetModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CarpetModel.java index 13c44224b1..25c4e26178 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CarpetModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CarpetModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import java.util.Arrays; @@ -26,10 +26,10 @@ public class CarpetModel extends AABBModel { private static final AABB[] aabbs = { new AABB(0, 1, 0, 1 / 16., 0, 1) }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public CarpetModel(Texture color) { - textures = new Texture[1][6]; + public CarpetModel(AbstractTexture color) { + textures = new AbstractTexture[1][6]; Arrays.fill(textures[0], color); } @@ -39,7 +39,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CauldronModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CauldronModel.java index 485e42fe2f..b3d7fd817f 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CauldronModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CauldronModel.java @@ -22,6 +22,7 @@ import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.renderer.scene.StillWaterShader; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -348,12 +349,12 @@ public class CauldronModel { new Vector4(2 / 16.0, 14 / 16.0, 1 - 14 / 16.0, 1 - 2 / 16.0)) }; - private static final Texture top = Texture.cauldronTop; - private static final Texture bottom = Texture.cauldronBottom; - private static final Texture side = Texture.cauldronSide; - private static final Texture inside = Texture.cauldronInside; - private static final Texture[] tex = - new Texture[]{ + private static final AbstractTexture top = Texture.cauldronTop; + private static final AbstractTexture bottom = Texture.cauldronBottom; + private static final AbstractTexture side = Texture.cauldronSide; + private static final AbstractTexture inside = Texture.cauldronInside; + private static final AbstractTexture[] tex = + new AbstractTexture[]{ top, inside, side, side, side, side, inside, inside, top, inside, side, side, side, side, top, inside, side, side, top, inside, side, side, bottom, side, side, side, side, bottom, side, side, side, bottom, side, side, side, side, bottom, side, side, side, bottom, side, @@ -361,7 +362,7 @@ public class CauldronModel { side, side }; - public static boolean intersect(Ray ray, int level, Texture contentTexture) { + public static boolean intersect(Ray ray, int level, AbstractTexture contentTexture) { boolean hit = false; ray.t = Double.POSITIVE_INFINITY; for (int i = 0; i < quads.length; ++i) { diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ChainModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ChainModel.java index 12ae3b1ab2..90f1936c76 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ChainModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ChainModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -52,7 +53,7 @@ public class ChainModel extends QuadModel { }, Math.toRadians(45)); - private static final Texture[] textures = { + private static final AbstractTexture[] textures = { Texture.chain, Texture.chain, Texture.chain, Texture.chain }; @@ -79,7 +80,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ChestModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ChestModel.java index 61af4ab46f..3af2946fb2 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ChestModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ChestModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -166,7 +167,7 @@ public class ChestModel extends QuadModel { //endregion //region Normal Chest - private static final Texture[][] normalChest = { + private static final AbstractTexture[][] normalChest = { // Single. { Texture.chestFront, Texture.chestBack, Texture.chestLeft, Texture.chestRight, @@ -191,7 +192,7 @@ public class ChestModel extends QuadModel { //endregion //region Trapped Chest - private static final Texture[][] trappedChest = { + private static final AbstractTexture[][] trappedChest = { // Single. { Texture.trappedChestFront, Texture.trappedChestBack, Texture.trappedChestLeft, Texture.trappedChestRight, @@ -216,7 +217,7 @@ public class ChestModel extends QuadModel { //endregion //region Ender Chest - private static final Texture[] enderChest = { + private static final AbstractTexture[] enderChest = { Texture.enderChestFront, Texture.enderChestBack, Texture.enderChestLeft, Texture.enderChestRight, Texture.enderChestTop, Texture.enderChestBottom, Texture.enderChestLock, Texture.enderChestLock, Texture.enderChestLock, @@ -245,7 +246,7 @@ private static void rotateFaceY(int i, int j) { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public ChestModel(int type, int facing, boolean trapped, boolean ender) { if (ender) { @@ -264,7 +265,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusFlowerModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusFlowerModel.java index 5a095a8683..919a52f42c 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusFlowerModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusFlowerModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import java.util.Arrays; @@ -30,11 +31,11 @@ public class ChorusFlowerModel extends AABBModel { new AABB(2 / 16., 14 / 16., 2 / 16., 14 / 16., 0, 1), }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; public ChorusFlowerModel(int age) { - Texture tex = age < 5 ? Texture.chorusFlower : Texture.chorusFlowerDead; - textures = new Texture[3][6]; + AbstractTexture tex = age < 5 ? Texture.chorusFlower : Texture.chorusFlowerDead; + textures = new AbstractTexture[3][6]; for (int i = 0; i < 3; i++) Arrays.fill(textures[i], tex); } @@ -44,7 +45,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusPlantModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusPlantModel.java index cd52503fa3..772322ce46 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusPlantModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ChorusPlantModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; import java.util.ArrayList; @@ -84,7 +85,7 @@ public class ChorusPlantModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public ChorusPlantModel( boolean north, boolean south, boolean east, boolean west, @@ -121,7 +122,7 @@ public ChorusPlantModel( Collections.addAll(quads, noside[5]); } this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, Texture.chorusPlant); } @@ -131,7 +132,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CocoaPlantModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CocoaPlantModel.java index 19d9362b70..b8eadc1865 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CocoaPlantModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CocoaPlantModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Transform; import se.llbit.math.Vector3; @@ -151,16 +152,16 @@ public class CocoaPlantModel extends QuadModel { } } - private static final Texture[] tex = {Texture.cocoaPlantSmall, Texture.cocoaPlantMedium, Texture.cocoaPlantLarge}; + private static final AbstractTexture[] tex = {Texture.cocoaPlantSmall, Texture.cocoaPlantMedium, Texture.cocoaPlantLarge}; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public CocoaPlantModel(int facing, int age) { quads = new Quad[fruit[age][facing].length+1]; System.arraycopy(fruit[age][facing], 0, quads, 0, quads.length-1); quads[quads.length-1] = stem[facing]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, tex[age]); } @@ -170,7 +171,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ComparatorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ComparatorModel.java index 93a24b5933..d04a2d74cf 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ComparatorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ComparatorModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -95,9 +96,9 @@ public class ComparatorModel extends QuadModel { private static final Quad[][] rot = new Quad[4][]; - private static final Texture[] blockTex = {Texture.comparatorOff, Texture.comparatorOn,}; + private static final AbstractTexture[] blockTex = {Texture.comparatorOff, Texture.comparatorOn,}; - private static final Texture[] torchTex = {Texture.redstoneTorchOff, Texture.redstoneTorchOn,}; + private static final AbstractTexture[] torchTex = {Texture.redstoneTorchOff, Texture.redstoneTorchOn,}; static { rot[0] = north; @@ -137,12 +138,12 @@ public class ComparatorModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public ComparatorModel(int direction, int active, int powered) { quads = Model.join(rot[direction], torch1[active][direction], torch2[active][direction], torch3[active][direction]); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, torchTex[powered]); Arrays.fill(textures, 0, rot[direction].length, blockTex[powered]); Arrays.fill(textures, @@ -158,7 +159,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ComposterModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ComposterModel.java index 282d26483d..85b13c1b62 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ComposterModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ComposterModel.java @@ -21,14 +21,15 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; public class ComposterModel extends QuadModel { - private static final Texture top = Texture.composterTop; - private static final Texture bottom = Texture.composterBottom; - private static final Texture side = Texture.composterSide; - private static final Texture inside = Texture.composterBottom; - private static final Texture[] composterTex = new Texture[] { + private static final AbstractTexture top = Texture.composterTop; + private static final AbstractTexture bottom = Texture.composterBottom; + private static final AbstractTexture side = Texture.composterSide; + private static final AbstractTexture inside = Texture.composterBottom; + private static final AbstractTexture[] composterTex = new AbstractTexture[] { inside, bottom, top, side, side, side, side, top, side, side, side, side, top, side, side, top, side, side }; @@ -146,7 +147,7 @@ public class ComposterModel extends QuadModel { //endregion - private static final Texture[] contentTex = new Texture[] { + private static final AbstractTexture[] contentTex = new AbstractTexture[] { null, Texture.composterCompost, Texture.composterCompost, Texture.composterCompost, Texture.composterCompost, Texture.composterCompost, Texture.composterCompost, Texture.composterCompost, Texture.composterReady }; @@ -206,7 +207,7 @@ public class ComposterModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public ComposterModel(int level) { if (level == 0) { @@ -214,7 +215,7 @@ public ComposterModel(int level) { textures = composterTex; } else { quads = Model.join(composter, new Quad[] {content[level]}); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; System.arraycopy(composterTex, 0, textures, 0, composterTex.length); textures[composterTex.length] = contentTex[level]; } @@ -226,7 +227,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ConduitModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ConduitModel.java index 6f0296be17..64e74bd6a9 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ConduitModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ConduitModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -64,7 +65,7 @@ public class ConduitModel extends QuadModel { new Vector4(8 / 16.0, 14 / 16.0, 8 / 16.0, 14 / 16.0)), }; - private static final Texture[] textures = { + private static final AbstractTexture[] textures = { Texture.conduit, Texture.conduit, Texture.conduit, Texture.conduit, Texture.conduit, Texture.conduit }; @@ -75,7 +76,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/CropsModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/CropsModel.java index 79e84d99be..6d14898d83 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/CropsModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/CropsModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -40,10 +40,10 @@ public class CropsModel extends QuadModel { new Vector3(.75, 1, 1), new Vector4(1, 0, 0, 1), true), }; - private final Texture[] textures; + private final AbstractTexture[] textures; - public CropsModel(Texture texture) { - textures = new Texture[quads.length]; + public CropsModel(AbstractTexture texture) { + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, texture); } @@ -53,7 +53,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/DaylightSensorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/DaylightSensorModel.java index 08edb2c7a8..fb4d7cd4c5 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/DaylightSensorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/DaylightSensorModel.java @@ -19,16 +19,17 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class DaylightSensorModel extends AABBModel { private static final AABB[] aabbs = { new AABB(0, 1, 0, 6 / 16., 0, 1) }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public DaylightSensorModel(Texture top) { - Texture side = Texture.daylightDetectorSide; - textures = new Texture[][] { {side, side, side, side, top, side} }; + public DaylightSensorModel(AbstractTexture top) { + AbstractTexture side = Texture.daylightDetectorSide; + textures = new AbstractTexture[][] { {side, side, side, side, top, side} }; } @Override @@ -37,7 +38,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/DecoratedPotModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/DecoratedPotModel.java index 63bcfadc69..e26c67d7e7 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/DecoratedPotModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/DecoratedPotModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.TopBottomOrientedTexturedBlockModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.log.Log; import se.llbit.math.Quad; import se.llbit.math.Vector3; @@ -174,7 +175,7 @@ public JsonValue toJson() { } public DecoratedPotModel(String facing, String[] sherds) { - super(facing, DEFAULT_QUADS, new Texture[]{ + super(facing, DEFAULT_QUADS, new AbstractTexture[]{ // sherds[0] top crafting slot -> north getTextureForsherd(sherds[0]), // sherds[3] bottom crafting slot -> south @@ -188,7 +189,7 @@ public DecoratedPotModel(String facing, String[] sherds) { }); } - private static Texture getTextureForsherd(String sherd) { + private static AbstractTexture getTextureForsherd(String sherd) { if(sherd == null) { return Texture.decoratedPotSide; } @@ -252,7 +253,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/DispenserModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/DispenserModel.java index dc7eb6bf2a..123f780638 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/DispenserModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/DispenserModel.java @@ -19,35 +19,35 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class DispenserModel extends AABBModel { private final static AABB[] boxes = { new AABB(0, 1, 0, 1, 0, 1) }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public DispenserModel(String facing, Texture front, Texture frontVertical, Texture side, Texture back) { - textures = new Texture[1][]; + public DispenserModel(String facing, AbstractTexture front, AbstractTexture frontVertical, AbstractTexture side, AbstractTexture back) { + textures = new AbstractTexture[1][]; switch (facing) { case "up": - textures[0] = new Texture[] {back, back, back, back, frontVertical, back}; + textures[0] = new AbstractTexture[] {back, back, back, back, frontVertical, back}; break; case "down": - textures[0] = new Texture[] {back, back, back, back, back, frontVertical}; + textures[0] = new AbstractTexture[] {back, back, back, back, back, frontVertical}; break; case "north": - textures[0] = new Texture[] {front, side, side, side, back, back}; + textures[0] = new AbstractTexture[] {front, side, side, side, back, back}; break; case "east": - textures[0] = new Texture[] {side, front, side, side, back, back}; + textures[0] = new AbstractTexture[] {side, front, side, side, back, back}; break; case "south": - textures[0] = new Texture[] {side, side, front, side, back, back}; + textures[0] = new AbstractTexture[] {side, side, front, side, back, back}; break; case "west": - textures[0] = new Texture[] {side, side, side, front, back, back}; + textures[0] = new AbstractTexture[] {side, side, side, front, back, back}; break; } } @@ -58,7 +58,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/DoorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/DoorModel.java index 8499b2ea80..8cb31d6179 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/DoorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/DoorModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -100,11 +100,11 @@ public class DoorModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public DoorModel(Texture texture, int mirror, int facing) { + public DoorModel(AbstractTexture texture, int mirror, int facing) { quads = rot[mirror][facing]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, texture); } @@ -114,7 +114,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/DragonEggModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/DragonEggModel.java index c2131b3806..19172063d1 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/DragonEggModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/DragonEggModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -272,7 +273,7 @@ public class DragonEggModel extends QuadModel { }; //endregion - private static final Texture[] textures = new Texture[quads.length]; + private static final AbstractTexture[] textures = new AbstractTexture[quads.length]; static { Arrays.fill(textures, Texture.dragonEgg); } @Override @@ -281,7 +282,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/EnchantmentTableModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/EnchantmentTableModel.java index f0740a87d1..86bdba1876 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/EnchantmentTableModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/EnchantmentTableModel.java @@ -19,16 +19,17 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class EnchantmentTableModel extends AABBModel { private static final AABB[] aabbs = new AABB[]{ new AABB(0, 1, 0, .75, 0, 1) }; - private static final Texture[][] textures; + private static final AbstractTexture[][] textures; static { - Texture top = Texture.enchantmentTableTop; - Texture bottom = Texture.enchantmentTableBottom; - Texture side = Texture.enchantmentTableSide; - textures = new Texture[][] { + AbstractTexture top = Texture.enchantmentTableTop; + AbstractTexture bottom = Texture.enchantmentTableBottom; + AbstractTexture side = Texture.enchantmentTableSide; + textures = new AbstractTexture[][] { {side, side, side, side, top, bottom} }; } @@ -39,7 +40,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalFrameModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalFrameModel.java index 74c116cdfd..183e9e2561 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalFrameModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalFrameModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; import java.util.Arrays; @@ -65,7 +66,7 @@ public class EndPortalFrameModel extends QuadModel { private static final Quad[][] orientedEndPortalQuads = new Quad[4][]; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture[] tex = new AbstractTexture[]{ Texture.endPortalFrameTop, Texture.endStone, Texture.endPortalFrameSide, Texture.endPortalFrameSide, Texture.endPortalFrameSide, Texture.endPortalFrameSide }; @@ -118,7 +119,7 @@ public class EndPortalFrameModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public EndPortalFrameModel(boolean hasEye, String facingString) { int orientation; @@ -140,7 +141,7 @@ public EndPortalFrameModel(boolean hasEye, String facingString) { if (hasEye) { quads = Model.join(orientedEndPortalQuads[orientation], orientedEyeOfEnderQuads[orientation]); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, Texture.eyeOfTheEnder); System.arraycopy(tex, 0, textures, 0, tex.length); } else { @@ -155,7 +156,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalModel.java index c37f211a5f..ad1b4aa9c5 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/EndPortalModel.java @@ -19,7 +19,8 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.BitmapImage; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -31,12 +32,12 @@ public class EndPortalModel extends QuadModel { new Quad(new Vector3(1, .75, 0), new Vector3(0, .75, 0), new Vector3(1, .75, 1), new Vector4(1, 0, 0, 1), true) }; - private static final Texture[] textures = new Texture[1]; + private static final AbstractTexture[] textures = new AbstractTexture[1]; static { BitmapImage black = new BitmapImage(16, 16); Arrays.fill(black.data, 0xFF000000); - textures[0] = new Texture(black); + textures[0] = new BitmapTexture(black); } @Override @@ -45,7 +46,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/EndRodModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/EndRodModel.java index 5d76f7d6d9..95c9029f29 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/EndRodModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/EndRodModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -78,7 +79,7 @@ public class EndRodModel extends QuadModel { orientations[5] = east; } - private final static Texture[] textures = new Texture[up.length]; + private final static AbstractTexture[] textures = new AbstractTexture[up.length]; static { Arrays.fill(textures, Texture.endRod); } private final Quad[] quads; @@ -93,7 +94,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FenceGateModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FenceGateModel.java index a7bebc7740..617b0bf168 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FenceGateModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FenceGateModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import java.util.Arrays; @@ -72,12 +72,12 @@ public class FenceGateModel extends AABBModel { } private final AABB[] boxes; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public FenceGateModel(Texture texture, int facing, int inWall, int isOpen) { + public FenceGateModel(AbstractTexture texture, int facing, int inWall, int isOpen) { boxes = rot[inWall][isOpen][facing]; - textures = new Texture[boxes.length][]; - Texture[] tex = new Texture[6]; + textures = new AbstractTexture[boxes.length][]; + AbstractTexture[] tex = new AbstractTexture[6]; Arrays.fill(tex, texture); Arrays.fill(textures, tex); } @@ -88,7 +88,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FenceModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FenceModel.java index c727076b65..64cf5286f9 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FenceModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FenceModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import java.util.ArrayList; @@ -52,9 +52,9 @@ public class FenceModel extends AABBModel { }; private final AABB[] boxes; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public FenceModel(Texture texture, int connections) { + public FenceModel(AbstractTexture texture, int connections) { ArrayList boxes = new ArrayList<>(); boxes.add(post); for (int i = 0; i < 4; i++) { @@ -62,8 +62,8 @@ public FenceModel(Texture texture, int connections) { Collections.addAll(boxes, plank[i]); } this.boxes = boxes.toArray(new AABB[0]); - this.textures = new Texture[this.boxes.length][]; - Texture[] tex = new Texture[6]; + this.textures = new AbstractTexture[this.boxes.length][]; + AbstractTexture[] tex = new AbstractTexture[6]; Arrays.fill(tex, texture); Arrays.fill(this.textures, tex); } @@ -74,7 +74,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FireModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FireModel.java index cd8b70d113..d9058cb566 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FireModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FireModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AnimatedQuadModel; -import se.llbit.chunky.resources.AnimatedTexture; +import se.llbit.chunky.resources.texture.AnimatedTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java index 05762dbade..f5bd60973c 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FlowerPotModel.java @@ -21,6 +21,8 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -71,21 +73,21 @@ public enum Kind { CHERRY_SAPLING } - private static final Texture flowerpot = Texture.flowerPot; - private static final Texture dirt = Texture.dirt; - private static final Texture[] flowerPotTex = new Texture[]{ + private static final BitmapTexture flowerpot = Texture.flowerPot; + private static final BitmapTexture dirt = Texture.dirt; + private static final BitmapTexture[] flowerPotTex = new BitmapTexture[]{ flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, flowerpot, dirt, flowerpot }; - private static final Texture cactus_top = Texture.cactusTop; - private static final Texture cactus = Texture.cactusSide; - private static final Texture[] cactusTex = new Texture[]{ + private static final BitmapTexture cactus_top = Texture.cactusTop; + private static final BitmapTexture cactus = Texture.cactusSide; + private static final BitmapTexture[] cactusTex = new BitmapTexture[]{ cactus_top, cactus, cactus, cactus, cactus }; - private static final Texture[] azaleaBushTex = { + private static final BitmapTexture[] azaleaBushTex = { Texture.pottedAzaleaBushTop, Texture.pottedAzaleaBushTop, Texture.pottedAzaleaBushSide, Texture.pottedAzaleaBushSide, Texture.pottedAzaleaBushSide, Texture.pottedAzaleaBushSide, @@ -95,7 +97,7 @@ public enum Kind { Texture.pottedAzaleaBushPlant, Texture.pottedAzaleaBushPlant }; - private static final Texture[] floweringAzaleaBushTex = { + private static final BitmapTexture[] floweringAzaleaBushTex = { Texture.pottedFloweringAzaleaBushTop, Texture.pottedFloweringAzaleaBushTop, Texture.pottedFloweringAzaleaBushSide, Texture.pottedFloweringAzaleaBushSide, Texture.pottedFloweringAzaleaBushSide, Texture.pottedFloweringAzaleaBushSide, @@ -476,7 +478,7 @@ public enum Kind { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; private final Tint[] tints; public FlowerPotModel(Kind kind) { @@ -488,14 +490,14 @@ public FlowerPotModel(Kind kind) { break; case CACTUS: quads = Model.join(flowerPot, cactusQuads); - textures = new Texture[flowerPotTex.length + cactusTex.length]; + textures = new AbstractTexture[flowerPotTex.length + cactusTex.length]; tints = null; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); System.arraycopy(cactusTex, 0, textures, flowerPotTex.length, cactusTex.length); break; case FERN: quads = Model.join(flowerPot, flowerSmall); - textures = new Texture[flowerPotTex.length + flowerSmall.length]; + textures = new AbstractTexture[flowerPotTex.length + flowerSmall.length]; tints = new Tint[flowerPotTex.length + flowerSmall.length]; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); Arrays.fill(textures, flowerPotTex.length, textures.length, Texture.fern); @@ -504,7 +506,7 @@ public FlowerPotModel(Kind kind) { break; case BAMBOO: quads = Model.join(flowerPot, bamboo, bambooLeaf); - textures = new Texture[flowerPotTex.length + bamboo.length + bambooLeaf.length]; + textures = new AbstractTexture[flowerPotTex.length + bamboo.length + bambooLeaf.length]; tints = null; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); Arrays.fill(textures, flowerPotTex.length, flowerPotTex.length + bamboo.length, Texture.bambooStalk); @@ -513,7 +515,7 @@ public FlowerPotModel(Kind kind) { case AZALEA_BUSH: case FLOWERING_AZALEA_BUSH: quads = Model.join(flowerPot, azaleaBush); - textures = new Texture[flowerPotTex.length + azaleaBush.length]; + textures = new AbstractTexture[flowerPotTex.length + azaleaBush.length]; tints = null; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); System.arraycopy(kind == Kind.AZALEA_BUSH ? azaleaBushTex : floweringAzaleaBushTex, 0, textures, @@ -521,14 +523,14 @@ public FlowerPotModel(Kind kind) { break; case MANGROVE_PROPAGULE: quads = Model.join(flowerPot, mangrovePropagule); - textures = new Texture[flowerPotTex.length + mangrovePropagule.length]; + textures = new AbstractTexture[flowerPotTex.length + mangrovePropagule.length]; tints = null; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); Arrays.fill(textures, flowerPotTex.length, textures.length, Texture.mangrovePropagule); break; default: quads = Model.join(flowerPot, flowerSmall); - textures = new Texture[flowerPotTex.length + flowerSmall.length]; + textures = new AbstractTexture[flowerPotTex.length + flowerSmall.length]; tints = null; System.arraycopy(flowerPotTex, 0, textures, 0, flowerPotTex.length); switch (kind) { @@ -627,7 +629,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/Flowerbed.java b/chunky/src/java/se/llbit/chunky/model/minecraft/Flowerbed.java index 4562b16492..7b8898fa1e 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/Flowerbed.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/Flowerbed.java @@ -21,7 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -33,7 +33,7 @@ public class Flowerbed extends QuadModel { //region flowerbed_1 - private static final BiFunction flowerbed1Textures = (flowerbed, stem) -> new Texture[]{ + private static final BiFunction flowerbed1Textures = (flowerbed, stem) -> new AbstractTexture[]{ flowerbed, flowerbed, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem }; @@ -138,7 +138,7 @@ public class Flowerbed extends QuadModel { //endregion //region flowerbed_2 - private static final BiFunction flowerbed2Textures = (flowerbed, stem) -> new Texture[]{ + private static final BiFunction flowerbed2Textures = (flowerbed, stem) -> new AbstractTexture[]{ flowerbed, flowerbed, flowerbed, flowerbed, stem, stem, stem, stem }; @@ -204,7 +204,7 @@ public class Flowerbed extends QuadModel { //endregion //region flowerbed_3 - private static final BiFunction flowerbed3Textures = (flowerbed, stem) -> new Texture[]{ + private static final BiFunction flowerbed3Textures = (flowerbed, stem) -> new AbstractTexture[]{ flowerbed, flowerbed, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem, stem }; @@ -310,7 +310,7 @@ public class Flowerbed extends QuadModel { //endregion //region flowerbed_4 - private static final BiFunction flowerbed4Textures = (flowerbed, stem) -> new Texture[]{ + private static final BiFunction flowerbed4Textures = (flowerbed, stem) -> new AbstractTexture[]{ flowerbed, flowerbed, stem, stem, stem, stem }; @@ -363,14 +363,14 @@ public class Flowerbed extends QuadModel { ); //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; private final Quad[] quads; private final Tint[] tints; - public Flowerbed(Texture flowerbed, Texture stem, int flowerAmount, String facing) { - List textures = new ArrayList<>(); + public Flowerbed(AbstractTexture flowerbed, AbstractTexture stem, int flowerAmount, String facing) { + List textures = new ArrayList<>(); List quadList = new ArrayList<>(); List tints = new ArrayList<>(); @@ -394,7 +394,7 @@ public Flowerbed(Texture flowerbed, Texture stem, int flowerAmount, String facin Collections.addAll(tints, flowerbed4Tints); } - this.textures = textures.toArray(new Texture[0]); + this.textures = textures.toArray(new AbstractTexture[0]); Quad[] quads = quadList.toArray(new Quad[0]); this.tints = tints.toArray(new Tint[0]); @@ -418,7 +418,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/FrogspawnModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/FrogspawnModel.java index f4d3db5729..9331693ff7 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/FrogspawnModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/FrogspawnModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -30,7 +31,7 @@ public class FrogspawnModel extends QuadModel { new Vector3(0, 0.25 / 16, 1), new Vector4(0, 1, 1, 0), true), }; - private static final Texture[] textures = { + private static final AbstractTexture[] textures = { Texture.frogspawn }; @@ -40,7 +41,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/GlassPaneModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/GlassPaneModel.java index 70fb1ad887..9f800c0411 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/GlassPaneModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/GlassPaneModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; import java.util.ArrayList; @@ -115,11 +115,11 @@ public class GlassPaneModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public GlassPaneModel(Texture top, Texture side, boolean north, boolean south, boolean east, boolean west) { + public GlassPaneModel(AbstractTexture top, AbstractTexture side, boolean north, boolean south, boolean east, boolean west) { ArrayList quads = new ArrayList<>(); - ArrayList textures = new ArrayList<>(); + ArrayList textures = new ArrayList<>(); Consumer addConnector = qs -> { quads.addAll(Arrays.asList(qs)); @@ -149,7 +149,7 @@ public GlassPaneModel(Texture top, Texture side, boolean north, boolean south, b if (west) addConnector.accept(panes[3]); this.quads = quads.toArray(new Quad[0]); - this.textures = textures.toArray(new Texture[0]); + this.textures = textures.toArray(new AbstractTexture[0]); } @Override @@ -158,7 +158,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/GlowLichenModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/GlowLichenModel.java index d6e9854823..39ad828193 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/GlowLichenModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/GlowLichenModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -56,7 +57,7 @@ public class GlowLichenModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public GlowLichenModel(int connections) { ArrayList quads = new ArrayList<>(); @@ -65,7 +66,7 @@ public GlowLichenModel(int connections) { quads.add(glowLichen[i]); } this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, Texture.glowLichen); } @@ -75,7 +76,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/GrassBlockModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/GrassBlockModel.java index 22872581bc..0fe16c4b1a 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/GrassBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/GrassBlockModel.java @@ -24,6 +24,7 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class GrassBlockModel extends AABBModel { @@ -38,7 +39,7 @@ public class GrassBlockModel extends AABBModel { new AABB(0, 1, 0, 1, 0, 1) }; - private static final Texture[][] textures = new Texture[][]{ + private static final AbstractTexture[][] textures = new AbstractTexture[][]{ { Texture.grassSide, Texture.grassSide, Texture.grassSide, Texture.grassSide, @@ -57,7 +58,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/GrassPathModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/GrassPathModel.java index 0cc7187753..c95baadb33 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/GrassPathModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/GrassPathModel.java @@ -19,11 +19,12 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class GrassPathModel extends AABBModel { private static final AABB[] boxes = { new AABB(0, 1, 0, 15 / 16., 0, 1) }; - private static final Texture[][] textures = { { + private static final AbstractTexture[][] textures = { { Texture.grassPathSide, Texture.grassPathSide, Texture.grassPathSide, Texture.grassPathSide, Texture.grassPathTop, Texture.dirt } }; @@ -34,7 +35,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/GrindstoneModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/GrindstoneModel.java index 21aaf10b60..b57fb86e5e 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/GrindstoneModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/GrindstoneModel.java @@ -21,16 +21,17 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class GrindstoneModel extends QuadModel { - private static final Texture pivot = Texture.grindstonePivot; - private static final Texture round = Texture.grindstoneRound; - private static final Texture side = Texture.grindstoneSide; - private static final Texture leg = Texture.darkOakWood; - private static final Texture[] textures = new Texture[] { + private static final AbstractTexture pivot = Texture.grindstonePivot; + private static final AbstractTexture round = Texture.grindstoneRound; + private static final AbstractTexture side = Texture.grindstoneSide; + private static final AbstractTexture leg = Texture.darkOakWood; + private static final AbstractTexture[] textures = new AbstractTexture[] { leg, leg, leg, leg, leg, leg, leg, leg, leg, leg, pivot, pivot, pivot, pivot, pivot, @@ -263,7 +264,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/HeavyCoreModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/HeavyCoreModel.java index 070b3a18c6..12d7267f4a 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/HeavyCoreModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/HeavyCoreModel.java @@ -2,12 +2,13 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class HeavyCoreModel extends QuadModel { - private static final Texture[] textures = new Texture[]{ + private static final AbstractTexture[] textures = new AbstractTexture[]{ Texture.heavyCore, Texture.heavyCore, Texture.heavyCore, Texture.heavyCore, Texture.heavyCore, Texture.heavyCore, }; @@ -57,7 +58,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/HoneyBlockModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/HoneyBlockModel.java index a3b647d1c6..b642c74d15 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/HoneyBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/HoneyBlockModel.java @@ -19,6 +19,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; public class HoneyBlockModel { @@ -97,7 +98,7 @@ public class HoneyBlockModel { ), }; - private static final Texture[] tex = { + private static final AbstractTexture[] tex = { Texture.honeyBlockBottom, Texture.honeyBlockBottom, Texture.honeyBlockBottom, Texture.honeyBlockBottom, Texture.honeyBlockBottom, Texture.honeyBlockBottom, diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/HopperModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/HopperModel.java index 3b3ab3e2e3..023d7e4ee7 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/HopperModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/HopperModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -30,10 +31,10 @@ * @author Jesper Öqvist */ public class HopperModel extends QuadModel { - private static final Texture top = Texture.hopperTop; - private static final Texture side = Texture.hopperOutside; - private static final Texture inside = Texture.hopperInside; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture top = Texture.hopperTop; + private static final AbstractTexture side = Texture.hopperOutside; + private static final AbstractTexture inside = Texture.hopperInside; + private static final AbstractTexture[] tex = new AbstractTexture[]{ inside, side, side, side, side, side, top, side, side, side, side, top, side, side, side, side, top, side, side, top, side, side, side, side, side, side, side, side, side, side, side, side }; @@ -459,7 +460,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return tex; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/IronBarsModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/IronBarsModel.java index 86b6d9ec0f..ffb06f9ea5 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/IronBarsModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/IronBarsModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -91,7 +92,7 @@ public class IronBarsModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public IronBarsModel(int connections) { ArrayList quads = new ArrayList<>(); @@ -105,7 +106,7 @@ public IronBarsModel(int connections) { } } this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, Texture.ironBars); } @@ -115,7 +116,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/JigsawModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/JigsawModel.java index cfc46cdf5d..19b401d77b 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/JigsawModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/JigsawModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -63,7 +64,7 @@ public class JigsawModel extends QuadModel { static final Quad[][] orientedQuads = new Quad[12][]; - private final static Texture[] texturesLock = { + private final static AbstractTexture[] texturesLock = { Texture.jigsawLock, Texture.jigsawSide, Texture.jigsawSide, @@ -72,7 +73,7 @@ public class JigsawModel extends QuadModel { Texture.jigsawBottom }; - private final static Texture[] textureNoLock = { + private final static AbstractTexture[] textureNoLock = { Texture.jigsawSide, Texture.jigsawSide, Texture.jigsawSide, @@ -97,7 +98,7 @@ public class JigsawModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public JigsawModel(String orientation) { switch (orientation) { @@ -138,7 +139,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LadderModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LadderModel.java index 86b10d268f..5f89a83ffd 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LadderModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LadderModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -42,7 +43,7 @@ public class LadderModel extends QuadModel { new Vector4(0, 1, 0, 1), true), }; - private static final Texture[] textures = { Texture.ladder }; + private static final AbstractTexture[] textures = { Texture.ladder }; private final Quad[] quads = new Quad[1]; @@ -56,7 +57,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LanternModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LanternModel.java index d5ef67a6c3..bdbcbac0f6 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LanternModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LanternModel.java @@ -20,7 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -210,11 +210,11 @@ public class LanternModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public LanternModel(Texture texture, boolean hanging) { + public LanternModel(AbstractTexture texture, boolean hanging) { quads = hanging ? modelHanging : model; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, texture); } @@ -224,7 +224,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LeafModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LeafModel.java index ac7e9f82bb..c173b52403 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LeafModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LeafModel.java @@ -19,17 +19,17 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.model.Tint; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class LeafModel extends AABBModel { private static final AABB[] boxes = { new AABB(0, 1, 0, 1, 0, 1) }; - private final Texture[][] textures; + private final AbstractTexture[][] textures; private final Tint[][] tints; - public LeafModel(Texture texture) { - this.textures = new Texture[][] { + public LeafModel(AbstractTexture texture) { + this.textures = new AbstractTexture[][] { {texture, texture, texture, texture, texture, texture} }; this.tints = new Tint[][] {{ @@ -38,8 +38,8 @@ public LeafModel(Texture texture) { }}; } - public LeafModel(Texture texture, int tint) { - this.textures = new Texture[][] { + public LeafModel(AbstractTexture texture, int tint) { + this.textures = new AbstractTexture[][] { {texture, texture, texture, texture, texture, texture} }; Tint t = new Tint(tint); @@ -52,7 +52,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LeverModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LeverModel.java index f38e8696dd..484aa5cb26 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LeverModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LeverModel.java @@ -24,6 +24,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -150,7 +151,7 @@ public class LeverModel extends QuadModel { leverRotated[7][1] = leverCeilingNSOn; } - private static final Texture[] textures = new Texture[base.length + lever.length]; + private static final AbstractTexture[] textures = new AbstractTexture[base.length + lever.length]; static { Arrays.fill(textures, 0, base.length, Texture.cobblestone); Arrays.fill(textures, base.length, textures.length, Texture.lever); @@ -171,7 +172,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LightBlockModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LightBlockModel.java index 4fbfad8d9b..60dbc72be5 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LightBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LightBlockModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.AABBModel; import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import se.llbit.math.Ray; import se.llbit.math.Vector4; @@ -30,7 +31,7 @@ public class LightBlockModel extends AABBModel { private final AABB[] box = aabb; - private final Texture[][] textures = new Texture[][] {{ + private final AbstractTexture[][] textures = new AbstractTexture[][] {{ Texture.light, Texture.light, Texture.light, Texture.light, Texture.light, Texture.light }}; @@ -60,7 +61,7 @@ public boolean intersect(Ray ray, Scene scene) { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LightningRodModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LightningRodModel.java index cdeacfe9da..5e7593b5ec 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LightningRodModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LightningRodModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -111,14 +112,14 @@ public class LightningRodModel extends QuadModel { orientedQuads[5] = Model.rotateY(orientedQuads[3]); } - private final static Texture[] texturesOn = new Texture[lightningRod.length]; + private final static AbstractTexture[] texturesOn = new AbstractTexture[lightningRod.length]; static { Arrays.fill(texturesOn, Texture.lightningRodOn); } - private final static Texture[] texturesOff = new Texture[lightningRod.length]; + private final static AbstractTexture[] texturesOff = new AbstractTexture[lightningRod.length]; static { Arrays.fill(texturesOff, Texture.lightningRod); } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public LightningRodModel(String facing, boolean powered) { this.quads = orientedQuads[getOrientationIndex(facing)]; @@ -149,7 +150,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/LogModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/LogModel.java index ab5bad7eed..bceaee16a0 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/LogModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/LogModel.java @@ -20,7 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -53,9 +53,9 @@ public class LogModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public LogModel(String facing, Texture side, Texture top) { + public LogModel(String facing, AbstractTexture side, AbstractTexture top) { switch (facing) { case "x": quads = Model.rotateZ(sides); @@ -68,7 +68,7 @@ public LogModel(String facing, Texture side, Texture top) { quads = Model.rotateX(sides); break; } - textures = new Texture[] { + textures = new AbstractTexture[] { side, side, side, side, top, top }; } @@ -79,7 +79,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/MangrovePropaguleModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/MangrovePropaguleModel.java index e8c140aed8..fdcaf06b9d 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/MangrovePropaguleModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/MangrovePropaguleModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -622,7 +623,7 @@ public class MangrovePropaguleModel extends QuadModel { private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public MangrovePropaguleModel(int age, boolean hanging) { if (hanging) { @@ -638,11 +639,11 @@ public MangrovePropaguleModel(int age, boolean hanging) { Collections.addAll(finalQuads, propaguleModelAge4); } quads = finalQuads.toArray(new Quad[0]); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, Texture.mangrovePropaguleHanging); } else { quads = propaguleModel; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, Texture.mangrovePropagule); } } @@ -653,7 +654,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/MangroveRootsModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/MangroveRootsModel.java index 9f51224f5a..c92dce23d1 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/MangroveRootsModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/MangroveRootsModel.java @@ -20,15 +20,16 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class MangroveRootsModel extends QuadModel { - private static final Texture side = Texture.mangroveRootsSide; - private static final Texture top = Texture.mangroveRootsTop; + private static final AbstractTexture side = Texture.mangroveRootsSide; + private static final AbstractTexture top = Texture.mangroveRootsTop; - private static final Texture[] textures = new Texture[]{ + private static final AbstractTexture[] textures = new AbstractTexture[]{ side, side, side, side, top, top, top, top, side, side, side, side, side, side, side, side }; @@ -137,7 +138,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/NetherPortalModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/NetherPortalModel.java index cf511ac5c2..15614860ab 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/NetherPortalModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/NetherPortalModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -45,7 +46,7 @@ public class NetherPortalModel extends QuadModel { ) }; - private final static Texture[] textures = { Texture.portal }; + private final static AbstractTexture[] textures = { Texture.portal }; private final Quad[] quads; @@ -59,7 +60,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ObserverModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ObserverModel.java index c6a001a472..c976afc069 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ObserverModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ObserverModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -75,20 +76,20 @@ public class ObserverModel extends QuadModel { faces[7] = observer; } - private static final Texture[] texturesOff = { + private static final AbstractTexture[] texturesOff = { Texture.observerTop, Texture.observerTop, Texture.observerSide, Texture.observerSide, Texture.observerFront, Texture.observerBack }; - private static final Texture[] texturesOn = { + private static final AbstractTexture[] texturesOn = { Texture.observerTop, Texture.observerTop, Texture.observerSide, Texture.observerSide, Texture.observerFront, Texture.observerBackOn }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public ObserverModel(int facing, boolean powered) { quads = faces[facing]; @@ -101,7 +102,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PistonExtensionModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PistonExtensionModel.java index 931ea39ef1..1970757de8 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PistonExtensionModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PistonExtensionModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -91,20 +92,20 @@ public class PistonExtensionModel extends QuadModel { extension[4] = Model.rotateY(extension[3]); } - private static final Texture[] textureNormal = { + private static final AbstractTexture[] textureNormal = { Texture.pistonTop, Texture.pistonTop, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide }; - private static final Texture[] textureSticky = { + private static final AbstractTexture[] textureSticky = { Texture.pistonTopSticky, Texture.pistonTop, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, Texture.pistonSide, }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public PistonExtensionModel(boolean sticky, int facing) { quads = extension[facing]; @@ -117,7 +118,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PistonModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PistonModel.java index 10fc4a8dde..6cc268657c 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PistonModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PistonModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -138,7 +139,7 @@ public class PistonModel extends QuadModel { retracted[4] = Model.rotateY(retracted[3]); } - static final Texture[][][] texture = { + static final AbstractTexture[][][] texture = { { { Texture.pistonTop, Texture.pistonBottom, Texture.pistonSide, Texture.pistonSide, @@ -158,7 +159,7 @@ public class PistonModel extends QuadModel { }; public final Quad[] quads; - public final Texture[] textures; + public final AbstractTexture[] textures; public PistonModel(boolean sticky, boolean isExtended, int facing) { quads = isExtended ? extended[facing] : retracted[facing]; @@ -171,7 +172,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropBottomModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropBottomModel.java index 0fee59ae6f..ad49dd9b9e 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropBottomModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropBottomModel.java @@ -21,33 +21,34 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class PitcherCropBottomModel extends QuadModel { - private static final Texture pitcher_top = Texture.pitcherCropTop; - private static final Texture pitcher_side = Texture.pitcherCropSide; - private static final Texture pitcher_bottom = Texture.pitcherCropBottom; - private static final Texture stage_1 = Texture.pitcherCropBottomStage1; - private static final Texture stage_2 = Texture.pitcherCropBottomStage2; - private static final Texture stage_3_bottom = Texture.pitcherCropBottomStage3; - private static final Texture stage_4_bottom = Texture.pitcherCropBottomStage4; + private static final AbstractTexture pitcher_top = Texture.pitcherCropTop; + private static final AbstractTexture pitcher_side = Texture.pitcherCropSide; + private static final AbstractTexture pitcher_bottom = Texture.pitcherCropBottom; + private static final AbstractTexture stage_1 = Texture.pitcherCropBottomStage1; + private static final AbstractTexture stage_2 = Texture.pitcherCropBottomStage2; + private static final AbstractTexture stage_3_bottom = Texture.pitcherCropBottomStage3; + private static final AbstractTexture stage_4_bottom = Texture.pitcherCropBottomStage4; - private static final Texture[][] textures = new Texture[][]{ - new Texture[]{ + private static final AbstractTexture[][] textures = new AbstractTexture[][]{ + new AbstractTexture[]{ pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side }, - new Texture[]{ + new AbstractTexture[]{ stage_1, stage_1, stage_1, stage_1, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side }, - new Texture[]{ + new AbstractTexture[]{ stage_2, stage_2, stage_2, stage_2, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side }, - new Texture[]{ + new AbstractTexture[]{ stage_3_bottom, stage_3_bottom, stage_3_bottom, stage_3_bottom, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side }, - new Texture[]{ + new AbstractTexture[]{ stage_4_bottom, stage_4_bottom, stage_4_bottom, stage_4_bottom, pitcher_top, pitcher_bottom, pitcher_side, pitcher_side, pitcher_side, pitcher_side } }; @@ -375,7 +376,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures[age]; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropTopModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropTopModel.java index 69e52f4fb2..5fc5369dbc 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropTopModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherCropTopModel.java @@ -21,27 +21,28 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class PitcherCropTopModel extends QuadModel { - private static final Texture top = Texture.pitcherCropTop; - private static final Texture side = Texture.pitcherCropSide; - private static final Texture bottom = Texture.pitcherCropBottom; - private static final Texture bottomStage2 = Texture.pitcherCropBottomStage2; - private static final Texture topStage3 = Texture.pitcherCropTopStage3; - private static final Texture topStage4 = Texture.pitcherCropTopStage4; + private static final AbstractTexture top = Texture.pitcherCropTop; + private static final AbstractTexture side = Texture.pitcherCropSide; + private static final AbstractTexture bottom = Texture.pitcherCropBottom; + private static final AbstractTexture bottomStage2 = Texture.pitcherCropBottomStage2; + private static final AbstractTexture topStage3 = Texture.pitcherCropTopStage3; + private static final AbstractTexture topStage4 = Texture.pitcherCropTopStage4; - private static final Texture[][] textures = new Texture[][]{ + private static final AbstractTexture[][] textures = new AbstractTexture[][]{ null, null, - new Texture[]{ + new AbstractTexture[]{ bottomStage2, bottomStage2, bottomStage2, bottomStage2, top, bottom, side, side, side, side }, - new Texture[]{ + new AbstractTexture[]{ topStage3, topStage3, topStage3, topStage3 }, - new Texture[]{ + new AbstractTexture[]{ topStage4, topStage4, topStage4, topStage4 } }; @@ -184,7 +185,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures[age]; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantBottomModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantBottomModel.java index 75e328aefc..2d73d1187e 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantBottomModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantBottomModel.java @@ -21,14 +21,15 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class PitcherPlantBottomModel extends QuadModel { - private static final Texture bottom = Texture.pitcherCropBottomStage4; - private static final Texture top = Texture.pitcherCropTopStage4; - private static final Texture[] textures = new Texture[]{ + private static final AbstractTexture bottom = Texture.pitcherCropBottomStage4; + private static final AbstractTexture top = Texture.pitcherCropTopStage4; + private static final AbstractTexture[] textures = new AbstractTexture[]{ bottom, bottom, bottom, bottom, bottom, bottom, bottom, bottom, bottom, bottom, bottom, bottom, top, top, top, top, top, top, top, top, top, top, top, top }; @@ -189,7 +190,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantTopModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantTopModel.java index e1d59f87e0..0dcc4c0f15 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantTopModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PitcherPlantTopModel.java @@ -21,13 +21,14 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class PitcherPlantTopModel extends QuadModel { - private static final Texture top = Texture.pitcherCropTopStage4; - private static final Texture[] textures = new Texture[]{ + private static final AbstractTexture top = Texture.pitcherCropTopStage4; + private static final AbstractTexture[] textures = new AbstractTexture[]{ top, top, top, top, top, top, top, top, top, top, top, top }; @@ -112,7 +113,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/PressurePlateModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/PressurePlateModel.java index e2edbcae90..fef014bfef 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/PressurePlateModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/PressurePlateModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -54,9 +54,9 @@ public class PressurePlateModel extends QuadModel { }; - private final Texture[] textures = new Texture[quads.length]; + private final AbstractTexture[] textures = new AbstractTexture[quads.length]; - public PressurePlateModel(Texture texture) { + public PressurePlateModel(AbstractTexture texture) { Arrays.fill(textures, texture); } @@ -66,7 +66,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/RailModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/RailModel.java index 3f3916a9e2..2f8b6e4547 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/RailModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/RailModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -73,11 +73,11 @@ public class RailModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public RailModel(Texture texture, int type) { + public RailModel(AbstractTexture texture, int type) { this.quads = new Quad[] { rails[type] }; - this.textures = new Texture[] { texture }; + this.textures = new AbstractTexture[] { texture }; } @Override @@ -86,7 +86,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneRepeaterModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneRepeaterModel.java index 19adb5b804..5341a8467f 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneRepeaterModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneRepeaterModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -112,9 +113,9 @@ public class RedstoneRepeaterModel extends QuadModel { private static final Quad[][] rot = new Quad[4][]; - private static final Texture[] tex = {Texture.redstoneRepeaterOff, Texture.redstoneRepeaterOn,}; + private static final AbstractTexture[] tex = {Texture.redstoneRepeaterOff, Texture.redstoneRepeaterOn,}; - private static final Texture[][] torchTex = { + private static final AbstractTexture[][] torchTex = { { Texture.redstoneTorchOff, Texture.redstoneTorchOn, }, { Texture.bedrock, Texture.bedrock, }, }; @@ -172,11 +173,11 @@ public class RedstoneRepeaterModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public RedstoneRepeaterModel(int delay, int direction, int on, int locked) { this.quads = Model.join(rot[direction], torch1[direction], torch2[locked][delay][direction]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(textures, 0, rot[direction].length, tex[on]); Arrays.fill(textures, rot[direction].length, rot[direction].length+torch1[direction].length, torchTex[0][on]); Arrays.fill(textures, rot[direction].length+torch1[direction].length, this.textures.length, torchTex[locked][on]); @@ -188,7 +189,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneWireModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneWireModel.java index ad0228a87a..7c996bcd8b 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneWireModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/RedstoneWireModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.BlockData; import se.llbit.math.ColorUtil; import se.llbit.math.Quad; @@ -111,7 +112,7 @@ public class RedstoneWireModel extends QuadModel { new Quad(new Vector3(1, 1, 1), new Vector3(1, 0, 1), new Vector3(0, 1, 1), new Vector4(1, 0, 1, 0)); - private static final Texture[] tex = { + private static final AbstractTexture[] tex = { Texture.redstoneWireCross, Texture.redstoneWire, Texture.redstoneWire, Texture.redstoneWire, Texture.redstoneWire, Texture.redstoneWireCross, Texture.redstoneWireCross, Texture.redstoneWireCross, Texture.redstoneWire, Texture.redstoneWireCross, @@ -138,7 +139,7 @@ public class RedstoneWireModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; private final Tint[] tints; public RedstoneWireModel(int power, int data) { @@ -154,7 +155,7 @@ public RedstoneWireModel(int power, int data) { if ((data & (1 << BlockData.RSW_SOUTH_UP)) != 0) quads.add(southSide); this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, Texture.redstoneWire); this.textures[0] = tex[connection]; this.tints = new Tint[this.quads.length]; @@ -167,7 +168,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/ScaffoldingModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/ScaffoldingModel.java index f81cb1712f..19c242915f 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/ScaffoldingModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/ScaffoldingModel.java @@ -20,15 +20,16 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class ScaffoldingModel extends QuadModel { - private static final Texture top = Texture.scaffoldingTop; - private static final Texture side = Texture.scaffoldingSide; - private static final Texture bottom = Texture.scaffoldingBottom; - private static final Texture[] textures = new Texture[] { + private static final AbstractTexture top = Texture.scaffoldingTop; + private static final AbstractTexture side = Texture.scaffoldingSide; + private static final AbstractTexture bottom = Texture.scaffoldingBottom; + private static final AbstractTexture[] textures = new AbstractTexture[] { top, top, bottom, side, side, side, side, bottom, side, side, side, side, bottom, side, side, side, side, bottom, side, side, side, side, bottom, side, side, bottom, side, side, bottom, side, side, bottom, side, side, top, top, bottom, side, side, bottom, side, side, bottom, side, side, bottom, side, side @@ -340,7 +341,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkSensorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkSensorModel.java index 2ffb4a8779..c8cf7e8aa0 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkSensorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkSensorModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -29,10 +30,10 @@ public class SculkSensorModel extends QuadModel { - private static final Texture bottom = Texture.sculkSensorBottom; - private static final Texture side = Texture.sculkSensorSide; - private static final Texture top = Texture.sculkSensorTop; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture bottom = Texture.sculkSensorBottom; + private static final AbstractTexture side = Texture.sculkSensorSide; + private static final AbstractTexture top = Texture.sculkSensorTop; + private static final AbstractTexture[] tex = new AbstractTexture[]{ top, bottom, side, side, side, side }; @@ -135,10 +136,10 @@ public class SculkSensorModel extends QuadModel { ); //endregion - private final Texture[] textures; + private final AbstractTexture[] textures; public SculkSensorModel(boolean active) { - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; System.arraycopy(tex, 0, textures, 0, tex.length); Arrays.fill(textures, tex.length, textures.length, active ? Texture.sculkSensorTendrilActive : Texture.sculkSensorTendrilInactive); @@ -150,7 +151,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkShriekerModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkShriekerModel.java index f9af618fac..95b13d6137 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkShriekerModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkShriekerModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -131,19 +132,19 @@ public class SculkShriekerModel extends QuadModel { ) }; - private static final Texture top = Texture.sculkShriekerTop; - private static final Texture side = Texture.sculkShriekerSide; - private static final Texture bottom = Texture.sculkShriekerBottom; + private static final AbstractTexture top = Texture.sculkShriekerTop; + private static final AbstractTexture side = Texture.sculkShriekerSide; + private static final AbstractTexture bottom = Texture.sculkShriekerBottom; - private static final Texture[] defaultTextures = new Texture[]{ + private static final AbstractTexture[] defaultTextures = new AbstractTexture[]{ Texture.sculkShriekerInnerTop, bottom, side, side, side, side, top, side, side, side, side, top, side, side, side, side }; - private static final Texture[] canSummonTextures = new Texture[]{ + private static final AbstractTexture[] canSummonTextures = new AbstractTexture[]{ Texture.sculkShriekerCanSummonInnerTop, bottom, side, side, side, side, top, side, side, side, side, top, side, side, side, side }; - private final Texture[] textures; + private final AbstractTexture[] textures; public SculkShriekerModel(boolean canSummon) { this.textures = canSummon ? canSummonTextures : defaultTextures; @@ -155,7 +156,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkVeinModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkVeinModel.java index 6f53fc5e96..9ba8ffe732 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SculkVeinModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SculkVeinModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -56,7 +57,7 @@ public class SculkVeinModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public SculkVeinModel(int connections) { ArrayList quads = new ArrayList<>(); @@ -65,7 +66,7 @@ public SculkVeinModel(int connections) { quads.add(sculkVein[i]); } this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, Texture.sculkVein); } @@ -75,7 +76,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SeaPickleModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SeaPickleModel.java index 11dc4ed014..90aa114277 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SeaPickleModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SeaPickleModel.java @@ -23,6 +23,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Transform; import se.llbit.math.Vector3; @@ -749,11 +750,11 @@ public class SeaPickleModel extends QuadModel { }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public SeaPickleModel(int pickles, boolean live) { quads = Model.join(pickleModels[pickles - 1], live ? picklePickle[pickles - 1] : new Quad[0]); - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, Texture.seaPickle); } @@ -763,7 +764,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SlabModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SlabModel.java index 01724f1484..5b4d859b20 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SlabModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SlabModel.java @@ -19,7 +19,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class SlabModel extends AABBModel { @@ -28,9 +28,9 @@ public class SlabModel extends AABBModel { private final static AABB[] full = { new AABB(0, 1, 0, 1, 0, 1) }; private final AABB[] boxes; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public SlabModel(Texture side, Texture top, String type) { + public SlabModel(AbstractTexture side, AbstractTexture top, String type) { switch (type) { case "top": boxes = upper; @@ -44,7 +44,7 @@ public SlabModel(Texture side, Texture top, String type) { break; } - textures = new Texture[][] {{ + textures = new AbstractTexture[][] {{ side, side, side, side, top, top }}; } @@ -55,7 +55,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SlimeBlockModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SlimeBlockModel.java index d7873dd7c0..9eaf58e2e0 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SlimeBlockModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SlimeBlockModel.java @@ -19,6 +19,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; public class SlimeBlockModel { @@ -97,7 +98,7 @@ public class SlimeBlockModel { ), }; - private static final Texture[] tex = { + private static final AbstractTexture[] tex = { Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime, Texture.slime diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SmallDripleafModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SmallDripleafModel.java index b247cfce76..1611d7484b 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SmallDripleafModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SmallDripleafModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -208,19 +209,19 @@ public class SmallDripleafModel extends QuadModel { private static final Quad[][] orientedTopQuads = new Quad[4][]; private static final Quad[][] orientedBottomQuads = new Quad[4][]; - private static final Texture[] topTextures; - private static final Texture[] bottomTextures; + private static final AbstractTexture[] topTextures; + private static final AbstractTexture[] bottomTextures; static { - Texture top = Texture.smallDripleafTop; - Texture side = Texture.smallDripleafSide; - Texture stemTop = Texture.smallDripleafStemTop; - Texture stemBottom = Texture.smallDripleafStemBottom; - topTextures = new Texture[] { + AbstractTexture top = Texture.smallDripleafTop; + AbstractTexture side = Texture.smallDripleafSide; + AbstractTexture stemTop = Texture.smallDripleafStemTop; + AbstractTexture stemBottom = Texture.smallDripleafStemBottom; + topTextures = new AbstractTexture[] { top, top, top, top, top, top, side, side, side, side, side, side, side, side, side, side, side, side, stemTop, stemTop, stemTop, stemTop }; - bottomTextures = new Texture[] {stemBottom, stemBottom, stemBottom, stemBottom}; + bottomTextures = new AbstractTexture[] {stemBottom, stemBottom, stemBottom, stemBottom}; orientedTopQuads[0] = topQuadsNorth; orientedTopQuads[1] = Model.rotateY(orientedTopQuads[0]); @@ -233,7 +234,7 @@ public class SmallDripleafModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public SmallDripleafModel(String facingString, String halfString) { quads = halfString.equals("upper") @@ -262,7 +263,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SnifferEggModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SnifferEggModel.java index 496078ead7..93f0412c65 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SnifferEggModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SnifferEggModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.QuickMath; import se.llbit.math.Vector3; @@ -27,18 +28,18 @@ public class SnifferEggModel extends QuadModel { //region Textures - private static final Texture[][] textures = new Texture[][]{ - new Texture[]{ + private static final AbstractTexture[][] textures = new AbstractTexture[][]{ + new AbstractTexture[]{ Texture.snifferEggNotCrackedTop, Texture.snifferEggNotCrackedBottom, Texture.snifferEggNotCrackedWest, Texture.snifferEggNotCrackedEast, Texture.snifferEggNotCrackedNorth, Texture.snifferEggNotCrackedSouth }, - new Texture[]{ + new AbstractTexture[]{ Texture.snifferEggSlightlyCrackedTop, Texture.snifferEggSlightlyCrackedBottom, Texture.snifferEggSlightlyCrackedWest, Texture.snifferEggSlightlyCrackedEast, Texture.snifferEggSlightlyCrackedNorth, Texture.snifferEggSlightlyCrackedSouth }, - new Texture[]{ + new AbstractTexture[]{ Texture.snifferEggVeryCrackedTop, Texture.snifferEggVeryCrackedBottom, Texture.snifferEggVeryCrackedWest, Texture.snifferEggVeryCrackedEast, Texture.snifferEggVeryCrackedNorth, Texture.snifferEggVeryCrackedSouth @@ -99,7 +100,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures[age]; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SnowModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SnowModel.java index 659ac9ba8c..f8837c0aea 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SnowModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SnowModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.*; public class SnowModel extends QuadModel { @@ -59,7 +60,7 @@ public class SnowModel extends QuadModel { } } - private final static Texture[] textures = { + private final static AbstractTexture[] textures = { Texture.snowBlock, Texture.snowBlock,Texture.snowBlock, Texture.snowBlock, Texture.snowBlock,Texture.snowBlock }; @@ -76,7 +77,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SpriteModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SpriteModel.java index 0ad41c0903..b9c0d8038b 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SpriteModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SpriteModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Ray; import se.llbit.math.Vector3; @@ -51,17 +51,17 @@ public class SpriteModel extends QuadModel { orientedQuads[5] = Model.rotateY(orientedQuads[3]); } - private final Texture[] textures; + private final AbstractTexture[] textures; private final int facing; - public SpriteModel(Texture texture, String facing) { - this.textures = new Texture[]{ + public SpriteModel(AbstractTexture texture, String facing) { + this.textures = new AbstractTexture[]{ texture, texture, texture, texture }; this.facing = getOrientationIndex(facing); } - public SpriteModel(Texture texture) { + public SpriteModel(AbstractTexture texture) { this(texture, "up"); } @@ -71,11 +71,11 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } - public static boolean intersect(Ray ray, Texture material) { + public static boolean intersect(Ray ray, AbstractTexture material) { boolean hit = false; ray.t = Double.POSITIVE_INFINITY; for (Quad quad : quads) { @@ -99,7 +99,7 @@ public static boolean intersect(Ray ray, Texture material) { return hit; } - public static boolean intersect(Ray ray, Texture material, String facing) { + public static boolean intersect(Ray ray, AbstractTexture material, String facing) { boolean hit = false; ray.t = Double.POSITIVE_INFINITY; for (Quad quad : orientedQuads[getOrientationIndex(facing)]) { diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/StairModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/StairModel.java index 700470923b..d08e1db333 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/StairModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/StairModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; public class StairModel extends AABBModel { @@ -128,21 +128,21 @@ public class StairModel extends AABBModel { private final boolean isCorner; private final int corner; private final int facing; - private final Texture[][] cornerTextures; - private final Texture[][] textures; + private final AbstractTexture[][] cornerTextures; + private final AbstractTexture[][] textures; - public StairModel(Texture side, Texture top, Texture bottom, int flipped, boolean isCorner, - int corner, int facing) { + public StairModel(AbstractTexture side, AbstractTexture top, AbstractTexture bottom, int flipped, boolean isCorner, + int corner, int facing) { this.flipped = flipped; this.isCorner = isCorner; this.corner = corner; this.facing = facing; - this.cornerTextures = new Texture[][]{ + this.cornerTextures = new AbstractTexture[][]{ {side, side, side, side, top, bottom}, {side, side, side, side, top, bottom}, {side, side, side, side, top, bottom} }; - this.textures = new Texture[][]{ + this.textures = new AbstractTexture[][]{ {side, side, side, side, top, bottom}, {side, side, side, side, top, bottom} }; @@ -158,7 +158,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { if (isCorner) { return cornerTextures; } else { diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/StemModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/StemModel.java index fa6452e4ea..595036e798 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/StemModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/StemModel.java @@ -21,12 +21,13 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class StemModel extends QuadModel { - private static final Texture[] textures = {Texture.stemStraight, Texture.stemStraight}; + private static final AbstractTexture[] textures = {Texture.stemStraight, Texture.stemStraight}; private static final Tint[][] stemColors = { {new Tint(0xFF00E210), new Tint(0xFF00E210)}, {new Tint(0xFF00E210), new Tint(0xFF00E210)}, @@ -57,7 +58,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/StonecutterModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/StonecutterModel.java index dee04f21ab..e040e53365 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/StonecutterModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/StonecutterModel.java @@ -21,17 +21,18 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class StonecutterModel extends QuadModel { - private static final Texture bottom = Texture.stonecutterBottom; - private static final Texture top = Texture.stonecutterTop; - private static final Texture side = Texture.stonecutterSide; - private static final Texture saw = Texture.stonecutterSaw; - private static final Texture[] textures = new Texture[]{ + private static final AbstractTexture bottom = Texture.stonecutterBottom; + private static final AbstractTexture top = Texture.stonecutterTop; + private static final AbstractTexture side = Texture.stonecutterSide; + private static final AbstractTexture saw = Texture.stonecutterSaw; + private static final AbstractTexture[] textures = new AbstractTexture[]{ top, bottom, side, side, side, side, saw, saw }; @@ -124,7 +125,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/SunFlowerModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/SunFlowerModel.java index 0ff6a2ef6b..30f872d3db 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/SunFlowerModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/SunFlowerModel.java @@ -19,6 +19,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -38,7 +39,7 @@ public class SunFlowerModel extends QuadModel { new Vector4(0, 1, 0, 1)), }; - private final static Texture[] bottomTex = { + private final static AbstractTexture[] bottomTex = { Texture.sunflowerBottom, Texture.sunflowerBottom, Texture.sunflowerBottom, Texture.sunflowerBottom }; @@ -64,13 +65,13 @@ public class SunFlowerModel extends QuadModel { new Vector4(2 / 16., 14 / 16., 2 / 16., 14 / 16.)), }; - private final static Texture[] topTex = { + private final static AbstractTexture[] topTex = { Texture.sunflowerTop, Texture.sunflowerTop, Texture.sunflowerTop, Texture.sunflowerTop, Texture.sunflowerFront, Texture.sunflowerBack }; private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public SunFlowerModel(boolean isTop) { quads = isTop ? top : bottom; @@ -83,7 +84,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TerracottaModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TerracottaModel.java index abdbe60310..35f724eb48 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TerracottaModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TerracottaModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -75,11 +75,11 @@ public class TerracottaModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public TerracottaModel(Texture texture, int direction) { + public TerracottaModel(AbstractTexture texture, int direction) { quads = faces[direction]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, texture); } @@ -89,7 +89,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TorchModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TorchModel.java index 2b627b6154..b8582d770d 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TorchModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TorchModel.java @@ -19,7 +19,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -113,12 +113,12 @@ public class TorchModel extends QuadModel { rotatedQuadsWall[4] = Model.rotateY(rotatedQuadsWall[2]); // north } - private final Texture[] textures; + private final AbstractTexture[] textures; private final int rotation; - public TorchModel(Texture texture, int rotation) { - this.textures = new Texture[]{texture, texture, texture, texture, texture, texture}; + public TorchModel(AbstractTexture texture, int rotation) { + this.textures = new AbstractTexture[]{texture, texture, texture, texture, texture, texture}; this.rotation = rotation; } @@ -131,7 +131,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TrapdoorModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TrapdoorModel.java index 7d473cd448..31d50ad4c8 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TrapdoorModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TrapdoorModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.QuadModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -193,11 +193,11 @@ public class TrapdoorModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; - public TrapdoorModel(Texture texture, int state) { + public TrapdoorModel(AbstractTexture texture, int state) { quads = (state & 4) == 0 ? faces[state >> 3] : faces[(state & 3) + 2]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, texture); } @@ -207,7 +207,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TrialSpawnerModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TrialSpawnerModel.java index 17b187bdef..3b73b288d6 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TrialSpawnerModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TrialSpawnerModel.java @@ -2,6 +2,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -82,14 +83,14 @@ public class TrialSpawnerModel extends QuadModel { ) }; - private final Texture[] textures; + private final AbstractTexture[] textures; public TrialSpawnerModel( boolean ominous, String trialSpawnerState ) { - Texture top = getTopTexture(ominous, trialSpawnerState); - Texture bottom = Texture.trialSpawnerBottom; - Texture side; + AbstractTexture top = getTopTexture(ominous, trialSpawnerState); + AbstractTexture bottom = Texture.trialSpawnerBottom; + AbstractTexture side; switch (trialSpawnerState) { case "active": case "waiting_for_players": @@ -103,12 +104,12 @@ public TrialSpawnerModel( side = ominous ? Texture.trialSpawnerSideInactiveOminous : Texture.trialSpawnerSideInactive; break; } - textures = new Texture[]{ + textures = new AbstractTexture[]{ top, bottom, side, side, side, side, top, bottom, side, side, side, side }; } - public static Texture getTopTexture(boolean ominous, String trialSpawnerState) { + public static AbstractTexture getTopTexture(boolean ominous, String trialSpawnerState) { switch (trialSpawnerState) { case "active": case "waiting_for_players": @@ -129,7 +130,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireHookModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireHookModel.java index 9fd1d9d3c4..620a416c35 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireHookModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireHookModel.java @@ -20,17 +20,18 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; public class TripwireHookModel extends QuadModel { - private static final Texture hookT = Texture.tripwireHook; - private static final Texture wood = Texture.oakPlanks; - private static final Texture tripwire = Texture.tripwire; + private static final AbstractTexture hookT = Texture.tripwireHook; + private static final AbstractTexture wood = Texture.oakPlanks; + private static final AbstractTexture tripwire = Texture.tripwire; - private static final Texture[] tex = new Texture[]{ + private static final AbstractTexture[] tex = new AbstractTexture[]{ hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood }; @@ -314,7 +315,7 @@ public class TripwireHookModel extends QuadModel { })); //endregion - private static final Texture[] texAttached = new Texture[]{ + private static final AbstractTexture[] texAttached = new AbstractTexture[]{ tripwire, tripwire, hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, hookT, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood, wood }; @@ -624,7 +625,7 @@ public class TripwireHookModel extends QuadModel { //endregion private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public TripwireHookModel(int direction, boolean attached, boolean powered) { if (attached) { @@ -642,7 +643,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireModel.java index 041da06447..aa349634a3 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TripwireModel.java @@ -28,6 +28,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -388,11 +389,11 @@ public class TripwireModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public TripwireModel(int connections) { quads = model[connections]; - textures = new Texture[quads.length]; + textures = new AbstractTexture[quads.length]; Arrays.fill(textures, Texture.tripwire); } @@ -402,7 +403,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/TurtleEggModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/TurtleEggModel.java index 14b099489d..7a918ff991 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/TurtleEggModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/TurtleEggModel.java @@ -21,6 +21,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -167,7 +168,7 @@ public class TurtleEggModel extends QuadModel { }; //endregion - private static final Texture[] eggTextures = { + private static final AbstractTexture[] eggTextures = { Texture.turtleEgg, Texture.turtleEggSlightlyCracked, Texture.turtleEggVeryCracked @@ -189,7 +190,7 @@ public class TurtleEggModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public TurtleEggModel(int eggs, int hatch) { eggs = Math.max(1, Math.min(egg_models.length, eggs)); @@ -198,7 +199,7 @@ public TurtleEggModel(int eggs, int hatch) { for (int i = 0; i < eggs; i++) Collections.addAll(quads, rot[hatch][i]); this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(this.textures, eggTextures[hatch]); } @@ -208,7 +209,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/VaultModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/VaultModel.java index 92514ae26c..b268f6fb56 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/VaultModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/VaultModel.java @@ -3,6 +3,7 @@ import se.llbit.chunky.model.Model; import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Vector3; import se.llbit.math.Vector4; @@ -92,15 +93,15 @@ public class VaultModel extends QuadModel { } private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; public VaultModel( String facing, boolean ominous, String vaultState ) { quads = orientedQuads[getOrientationIndex(facing)]; - Texture top = getTopTexture(ominous, vaultState); - Texture bottom = ominous ? Texture.vaultBottomOminous : Texture.vaultBottom; - Texture front, side; + AbstractTexture top = getTopTexture(ominous, vaultState); + AbstractTexture bottom = ominous ? Texture.vaultBottomOminous : Texture.vaultBottom; + AbstractTexture front, side; switch (vaultState) { case "ejecting": case "unlocking": @@ -117,12 +118,12 @@ public VaultModel( side = ominous ? Texture.vaultSideOnOminous : Texture.vaultSideOn; break; } - textures = new Texture[]{ + textures = new AbstractTexture[]{ top, bottom, side, side, front, side, top, bottom, side, side, front, side }; } - public static Texture getTopTexture(boolean ominous, String vaultState) { + public static AbstractTexture getTopTexture(boolean ominous, String vaultState) { switch (vaultState) { case "ejecting": return ominous ? Texture.vaultTopEjectingOminous : Texture.vaultTopEjecting; @@ -154,7 +155,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/VineModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/VineModel.java index 3bc0d6cc37..d8e170a8a8 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/VineModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/VineModel.java @@ -20,6 +20,7 @@ import se.llbit.chunky.model.QuadModel; import se.llbit.chunky.model.Tint; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.Quad; import se.llbit.math.Transform; import se.llbit.math.Vector3; @@ -86,7 +87,7 @@ public class VineModel extends QuadModel { private final Quad[] quads; - private final Texture[] textures; + private final AbstractTexture[] textures; private final Tint[] tints; public VineModel(int connections) { @@ -100,7 +101,7 @@ public VineModel(int connections) { } this.quads = quads.toArray(new Quad[0]); - this.textures = new Texture[this.quads.length]; + this.textures = new AbstractTexture[this.quads.length]; Arrays.fill(textures, Texture.vines); this.tints = new Tint[this.quads.length]; Arrays.fill(tints, Tint.BIOME_FOLIAGE); @@ -112,7 +113,7 @@ public Quad[] getQuads() { } @Override - public Texture[] getTextures() { + public AbstractTexture[] getTextures() { return textures; } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/WallModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/WallModel.java index 6d80aa2138..9b053c7d66 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/WallModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/WallModel.java @@ -18,7 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.model.AABBModel; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.math.AABB; import java.util.ArrayList; @@ -42,9 +42,9 @@ public class WallModel extends AABBModel { }; private final AABB[] boxes; - private final Texture[][] textures; + private final AbstractTexture[][] textures; - public WallModel(Texture texture, int[] connections, boolean midsection) { + public WallModel(AbstractTexture texture, int[] connections, boolean midsection) { ArrayList boxes = new ArrayList<>(); if (midsection) boxes.add(post); @@ -56,9 +56,9 @@ public WallModel(Texture texture, int[] connections, boolean midsection) { } } this.boxes = boxes.toArray(new AABB[0]); - Texture[] tex = new Texture[6]; + AbstractTexture[] tex = new AbstractTexture[6]; Arrays.fill(tex, texture); - this.textures = new Texture[this.boxes.length][]; + this.textures = new AbstractTexture[this.boxes.length][]; Arrays.fill(this.textures, tex); } @@ -68,7 +68,7 @@ public AABB[] getBoxes() { } @Override - public Texture[][] getTextures() { + public AbstractTexture[][] getTextures() { return textures; } } diff --git a/chunky/src/java/se/llbit/chunky/model/minecraft/WaterModel.java b/chunky/src/java/se/llbit/chunky/model/minecraft/WaterModel.java index 3d96c8edfd..e365db31d5 100644 --- a/chunky/src/java/se/llbit/chunky/model/minecraft/WaterModel.java +++ b/chunky/src/java/se/llbit/chunky/model/minecraft/WaterModel.java @@ -18,6 +18,7 @@ package se.llbit.chunky.model.minecraft; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.math.Quad; import se.llbit.math.QuickMath; import se.llbit.math.Ray; @@ -83,7 +84,7 @@ public class WaterModel { static { // precompute normal map - Texture waterHeight = new Texture("water-height"); + BitmapTexture waterHeight = new BitmapTexture("water-height"); normalMapW = waterHeight.getWidth(); normalMap = new float[normalMapW*normalMapW*2]; for (int u = 0; u < normalMapW; ++u) { @@ -184,7 +185,7 @@ public static boolean intersect(Ray ray) { boolean hit = false; for (Quad quad : fullBlock) { if (quad.intersect(ray)) { - Texture.water.getAvgColorLinear(ray.color); + ray.color.set(Texture.water.getAvgColorLinear()); ray.t = ray.tNext; ray.orientNormal(quad.n); hit = true; @@ -279,7 +280,7 @@ public static boolean intersect(Ray ray) { hit = true; } if (hit) { - Texture.water.getAvgColorLinear(ray.color); + ray.color.set(Texture.water.getAvgColorLinear()); ray.distance += ray.t; ray.o.scaleAdd(ray.t, ray.d); } @@ -311,7 +312,7 @@ public static boolean intersectTop(Ray ray) { hit = true; } if (hit) { - Texture.water.getAvgColorLinear(ray.color); + ray.color.set(Texture.water.getAvgColorLinear()); ray.distance += ray.t; ray.o.scaleAdd(ray.t, ray.d); } diff --git a/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sky.java b/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sky.java index a7e20a4f5b..74a29972c8 100644 --- a/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sky.java +++ b/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sky.java @@ -22,8 +22,9 @@ import se.llbit.chunky.renderer.SceneIOProvider; import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.resources.HDRTexture; -import se.llbit.chunky.resources.PFMTexture; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.PFMTexture; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.EmptyTexture; import se.llbit.chunky.world.Clouds; import se.llbit.chunky.world.SkymapTexture; import se.llbit.chunky.world.material.CloudMaterial; @@ -37,10 +38,8 @@ import se.llbit.util.JsonSerializable; import se.llbit.util.JsonUtil; import se.llbit.util.annotation.NotNull; -import se.llbit.util.annotation.Nullable; import java.io.File; -import java.nio.file.Paths; import java.util.*; import java.util.stream.Collectors; @@ -144,10 +143,10 @@ public static SkyMode get(String name) { } - @NotNull private Texture skymap = Texture.EMPTY_TEXTURE; - private final Texture[] skybox = - {Texture.EMPTY_TEXTURE, Texture.EMPTY_TEXTURE, Texture.EMPTY_TEXTURE, Texture.EMPTY_TEXTURE, - Texture.EMPTY_TEXTURE, Texture.EMPTY_TEXTURE}; + @NotNull private AbstractTexture skymap = EmptyTexture.INSTANCE; + private final AbstractTexture[] skybox = + {EmptyTexture.INSTANCE, EmptyTexture.INSTANCE, EmptyTexture.INSTANCE, EmptyTexture.INSTANCE, + EmptyTexture.INSTANCE, EmptyTexture.INSTANCE}; private String skymapFileName = ""; private final String[] skyboxFileName = {"", "", "", "", "", ""}; private final Scene scene; @@ -571,11 +570,11 @@ public void setSkyMode(SkyMode newMode) { this.mode = newMode; if (newMode != SkyMode.SKYMAP_EQUIRECTANGULAR && newMode != SkyMode.SKYMAP_ANGULAR) { skymapFileName = ""; - skymap = Texture.EMPTY_TEXTURE; + skymap = EmptyTexture.INSTANCE; } if (newMode != SkyMode.SKYBOX) { for (int i = 0; i < 6; ++i) { - skybox[i] = Texture.EMPTY_TEXTURE; + skybox[i] = EmptyTexture.INSTANCE; skyboxFileName[i] = ""; } } @@ -650,7 +649,7 @@ public void setSkyCacheResolution(int resolution) { switch (mode) { case SKYMAP_EQUIRECTANGULAR: case SKYMAP_ANGULAR: { - if (!skymap.isEmptyTexture()) { + if (!(skymap instanceof EmptyTexture)) { sky.add("skymap", skymapFileName); } break; @@ -658,7 +657,7 @@ public void setSkyCacheResolution(int resolution) { case SKYBOX: { JsonArray array = new JsonArray(); for (int i = 0; i < 6; ++i) { - if (!skybox[i].isEmptyTexture()) { + if (!(skybox[i] instanceof EmptyTexture)) { array.add(skyboxFileName[i]); } else { array.add(Json.NULL); @@ -872,7 +871,7 @@ public void loadSkyboxTexture(SceneIOProvider ioContext, String fileName, int in scene.refresh(); } - private Texture loadSkyTexture(SceneIOProvider ioContext, String fileName, Texture prevTexture) { + private AbstractTexture loadSkyTexture(SceneIOProvider ioContext, String fileName, AbstractTexture prevTexture) { try { File textureFile = ioContext.resolveLinkedFile(fileName); Log.info("Loading skymap: " + fileName); diff --git a/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sun.java b/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sun.java index 9458b57eb7..065ca9629a 100644 --- a/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sun.java +++ b/chunky/src/java/se/llbit/chunky/renderer/scene/sky/Sun.java @@ -23,7 +23,7 @@ import se.llbit.chunky.renderer.Refreshable; import se.llbit.chunky.renderer.scene.Scene; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.json.JsonObject; import se.llbit.math.QuickMath; import se.llbit.math.Ray; @@ -119,7 +119,7 @@ public class Sun implements JsonSerializable { /** * Sun texture */ - public static Texture texture = new Texture(); + public static BitmapTexture texture = new BitmapTexture(); static { A.x = mdx[0][0] * turb + mdx[0][1]; diff --git a/chunky/src/java/se/llbit/chunky/resources/ChiseledBookshelfTexture.java b/chunky/src/java/se/llbit/chunky/resources/ChiseledBookshelfTexture.java index 46cbefbc4e..5f793f73b4 100644 --- a/chunky/src/java/se/llbit/chunky/resources/ChiseledBookshelfTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/ChiseledBookshelfTexture.java @@ -1,18 +1,19 @@ package se.llbit.chunky.resources; -import se.llbit.math.ColorUtil; +import se.llbit.chunky.resources.texture.AbstractNonlinearTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; -public class ChiseledBookshelfTexture extends Texture { +public class ChiseledBookshelfTexture extends AbstractNonlinearTexture { // The texture when no books are present - private Texture empty; + private AbstractNonlinearTexture empty; // The texture when all six books are present - private Texture full; + private AbstractNonlinearTexture full; // slot0 is top left, slot2 is top right, slot5 is bottom right private boolean slot0, slot1, slot2, slot3, slot4, slot5; - public ChiseledBookshelfTexture(Texture empty, Texture full, boolean slot0, boolean slot1, boolean slot2, boolean slot3, boolean slot4, boolean slot5) { + public ChiseledBookshelfTexture(BitmapTexture empty, BitmapTexture full, boolean slot0, boolean slot1, boolean slot2, boolean slot3, boolean slot4, boolean slot5) { this.empty = empty; this.full = full; this.slot0 = slot0; @@ -23,46 +24,51 @@ public ChiseledBookshelfTexture(Texture empty, Texture full, boolean slot0, bool this.slot5 = slot5; } private boolean bookPresentAt(int x, int y) { - if(y * 2 < empty.image.height) { - if(x * 3 < empty.image.width) { + if(y * 2 < empty.getHeight()) { + if(x * 3 < empty.getWidth()) { return slot0; - } else if(x * 3 / 2 < empty.image.width) { + } else if(x * 3 / 2 < empty.getWidth()) { return slot1; } else { return slot2; } } else { - if(x * 3 < empty.image.width) { + if(x * 3 < empty.getWidth()) { return slot3; - } else if(x * 3 / 2 < empty.image.width) { + } else if(x * 3 / 2 < empty.getWidth()) { return slot4; } else { return slot5; } } } + @Override - public int[] getData() { - int[] overlaidData = new int[image.data.length]; - for(int i = 0; i < overlaidData.length; i++) { - int x = i % empty.image.width; - int y = i / empty.image.height; - boolean shouldOverlay = bookPresentAt(x, y); - overlaidData[i] = shouldOverlay ? full.image.data[i] : empty.image.data[i]; - } - return overlaidData; + public int getWidth() { + return empty.getWidth(); + } + + @Override + public int getHeight() { + return empty.getHeight(); + } + + @Override + public float[] getAvgColorLinear() { + return empty.getAvgColorLinear(); + } + + @Override + public int getAvgColor() { + return empty.getAvgColor(); } + @Override - public float[] getColor(int x, int y) { - if(useAverageColor) - return empty.getAvgColorFlat(); - float[] result = new float[4]; - boolean shouldOverlay = bookPresentAt(x, y); - if(shouldOverlay) { - ColorUtil.getRGBAComponentsGammaCorrected(full.image.data[width * y + x], result); + public int getTextureColorI(int x, int y) { + if (bookPresentAt(x, y)) { + return full.getTextureColorI(x, y); } else { - ColorUtil.getRGBAComponentsGammaCorrected(empty.image.data[width * y + x], result); + return empty.getTextureColorI(x, y); } - return result; } } diff --git a/chunky/src/java/se/llbit/chunky/resources/EntityTexture.java b/chunky/src/java/se/llbit/chunky/resources/EntityTexture.java index 2e4f74547d..b6a69756e7 100644 --- a/chunky/src/java/se/llbit/chunky/resources/EntityTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/EntityTexture.java @@ -17,6 +17,7 @@ */ package se.llbit.chunky.resources; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.math.Vector4; /** @@ -24,7 +25,7 @@ * * @author Jesper Öqvist */ -public class EntityTexture extends Texture { +public class EntityTexture extends BitmapTexture { private static final UVMap UV = new UVMap(false); // e.g. skeleton private static final UVMap UV_EXTENDED = new UVMap(true); // e.g. zombie diff --git a/chunky/src/java/se/llbit/chunky/resources/HDRTexture.java b/chunky/src/java/se/llbit/chunky/resources/HDRTexture.java index 9c9dc0aa72..bad53a9aa1 100644 --- a/chunky/src/java/se/llbit/chunky/resources/HDRTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/HDRTexture.java @@ -24,6 +24,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import se.llbit.chunky.resources.texture.AbstractHdriTexture; import se.llbit.log.Log; public class HDRTexture extends AbstractHdriTexture { diff --git a/chunky/src/java/se/llbit/chunky/resources/ResourcePackPaintingLoader.java b/chunky/src/java/se/llbit/chunky/resources/ResourcePackPaintingLoader.java index 563110d491..88cc5288d8 100644 --- a/chunky/src/java/se/llbit/chunky/resources/ResourcePackPaintingLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/ResourcePackPaintingLoader.java @@ -3,6 +3,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import se.llbit.chunky.entity.PaintingEntity; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.resources.texturepack.SimpleTexture; import se.llbit.log.Log; import se.llbit.util.Pair; @@ -35,7 +36,7 @@ public boolean load(LayeredResourcePacks resourcePacks) { if (!PaintingEntity.containsPainting(paintingVariant.getNamespacedName())) { try (Reader f = Files.newBufferedReader(paintingVariant.path())) { PaintingVariantJson json = GSON.fromJson(f, PaintingVariantJson.class); - Texture paintingTexture = new Texture(); + BitmapTexture paintingTexture = new BitmapTexture(); Pair asset = json.getAsset(); if (!ResourcePackLoader.loadResources( ResourcePackTextureLoader.singletonLoader(json.asset_id, new SimpleTexture("assets/" + asset.thing1 + "/textures/painting/" + asset.thing2, paintingTexture))) diff --git a/chunky/src/java/se/llbit/chunky/resources/ShulkerTexture.java b/chunky/src/java/se/llbit/chunky/resources/ShulkerTexture.java index fd944f459e..bbec78f451 100644 --- a/chunky/src/java/se/llbit/chunky/resources/ShulkerTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/ShulkerTexture.java @@ -17,8 +17,10 @@ */ package se.llbit.chunky.resources; +import se.llbit.chunky.resources.texture.BitmapTexture; + public class ShulkerTexture { - public Texture side = new Texture(); - public Texture top = new Texture(); - public Texture bottom = new Texture(); + public BitmapTexture side = new BitmapTexture(); + public BitmapTexture top = new BitmapTexture(); + public BitmapTexture bottom = new BitmapTexture(); } diff --git a/chunky/src/java/se/llbit/chunky/resources/SignTexture.java b/chunky/src/java/se/llbit/chunky/resources/SignTexture.java index 7a33e4bb18..bf391ca5a8 100644 --- a/chunky/src/java/se/llbit/chunky/resources/SignTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/SignTexture.java @@ -17,13 +17,15 @@ package se.llbit.chunky.resources; import se.llbit.chunky.entity.SignEntity.Color; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.resources.texturepack.FontTexture.Glyph; import se.llbit.json.JsonArray; import se.llbit.json.JsonValue; import se.llbit.math.Ray; import se.llbit.util.annotation.Nullable; -public class SignTexture extends Texture { +public class SignTexture extends BitmapTexture { /** * We use this for the glow dye color to not require more memory (color palette only has 16 colors, the dye color is a 17th color). * If the text mask is false but the color is set to this value, we use the glow dye color (the bright one). @@ -38,7 +40,7 @@ public class SignTexture extends Texture { private final double hh, ww, u0, v0; private final Color dyeColor; private final boolean isGlowing; - private final Texture signTexture; + private final AbstractTexture signTexture; @Nullable private final PalettizedBitmapImage textColor; @Nullable @@ -53,7 +55,7 @@ static private boolean hasVisibleCharacter(JsonArray line) { return false; } - public SignTexture(JsonArray[] text, Color dyeColor, boolean isGlowing, Texture signTexture, int signWidth, int signHeight, double x0, double y0, double x1, double y1, double fontSize, int ymargin, int lineHeight) { + public SignTexture(JsonArray[] text, Color dyeColor, boolean isGlowing, AbstractTexture signTexture, int signWidth, int signHeight, double x0, double y0, double x1, double y1, double fontSize, int ymargin, int lineHeight) { this.dyeColor = dyeColor; this.signTexture = signTexture; this.isGlowing = isGlowing; diff --git a/chunky/src/java/se/llbit/chunky/resources/SolidColorTexture.java b/chunky/src/java/se/llbit/chunky/resources/SolidColorTexture.java deleted file mode 100644 index 0f38969bd4..0000000000 --- a/chunky/src/java/se/llbit/chunky/resources/SolidColorTexture.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2019 Jesper Öqvist - * - * This file is part of Chunky. - * - * Chunky is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Chunky is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with Chunky. If not, see . - */ -package se.llbit.chunky.resources; - -import se.llbit.math.ColorUtil; -import se.llbit.math.Vector4; - -public class SolidColorTexture extends Texture { - - private final Vector4 color; - - public SolidColorTexture(Vector4 color) { - this.color = color; - this.avgColor = ColorUtil.getArgb(color); - } - - @Override public void getColor(double u, double v, Vector4 c) { - c.set(color); - } - -} diff --git a/chunky/src/java/se/llbit/chunky/resources/Texture.java b/chunky/src/java/se/llbit/chunky/resources/Texture.java index 35935029f2..4f140fe610 100644 --- a/chunky/src/java/se/llbit/chunky/resources/Texture.java +++ b/chunky/src/java/se/llbit/chunky/resources/Texture.java @@ -16,19 +16,11 @@ */ package se.llbit.chunky.resources; -import javafx.scene.image.Image; -import org.apache.commons.math3.util.FastMath; -import se.llbit.chunky.PersistentSettings; -import se.llbit.chunky.renderer.scene.Scene; +import se.llbit.chunky.resources.texture.AnimatedTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; +import se.llbit.chunky.resources.texture.SolidColorTexture; import se.llbit.chunky.resources.texturepack.FontTexture; import se.llbit.chunky.resources.texturepack.TexturePath; -import se.llbit.fxutil.FxImageUtil; -import se.llbit.math.ColorUtil; -import se.llbit.math.QuickMath; -import se.llbit.math.Ray; -import se.llbit.math.Vector4; -import se.llbit.resources.ImageLoader; -import se.llbit.util.annotation.NotNull; /** * This class contains static fields for common textures. @@ -39,434 +31,419 @@ * @author Jesper Öqvist */ public class Texture { - - public static final Texture EMPTY_TEXTURE = new Texture() { - @Override public void getColor(double u, double v, Vector4 c) { - c.set(0, 0, 0, 0); - } - - @Override public void getColorInterpolated(double u, double v, Vector4 c) { - c.set(0, 0, 0, 0); - } - - @Override public boolean isEmptyTexture() { - return true; - } - }; - - public static Texture black = new SolidColorTexture(new Vector4(0, 0, 0, 1)); - - public static final Texture paintingAlban = new Texture(); - public static final Texture paintingAztec2 = new Texture(); - public static final Texture paintingAztec = new Texture(); - public static final Texture paintingBack = new Texture(); - public static final Texture paintingBomb = new Texture(); - public static final Texture paintingBurningSkull = new Texture(); - public static final Texture paintingBust = new Texture(); - public static final Texture paintingCourbet = new Texture(); - public static final Texture paintingCreebet = new Texture(); - public static final Texture paintingDonkeyKong = new Texture(); - public static final Texture paintingFighters = new Texture(); - public static final Texture paintingGraham = new Texture(); - public static final Texture paintingKebab = new Texture(); - public static final Texture paintingMatch = new Texture(); - public static final Texture paintingPigscene = new Texture(); - public static final Texture paintingPlant = new Texture(); - public static final Texture paintingPointer = new Texture(); - public static final Texture paintingPool = new Texture(); - public static final Texture paintingSea = new Texture(); - public static final Texture paintingSkeleton = new Texture(); - public static final Texture paintingSkullAndRoses = new Texture(); - public static final Texture paintingStage = new Texture(); - public static final Texture paintingSunset = new Texture(); - public static final Texture paintingVoid = new Texture(); - public static final Texture paintingWanderer = new Texture(); - public static final Texture paintingWasteland = new Texture(); - public static final Texture paintingWither = new Texture(); + public static SolidColorTexture black = new SolidColorTexture(0, 0, 0, 1); + + public static final BitmapTexture paintingAlban = new BitmapTexture(); + public static final BitmapTexture paintingAztec2 = new BitmapTexture(); + public static final BitmapTexture paintingAztec = new BitmapTexture(); + public static final BitmapTexture paintingBack = new BitmapTexture(); + public static final BitmapTexture paintingBomb = new BitmapTexture(); + public static final BitmapTexture paintingBurningSkull = new BitmapTexture(); + public static final BitmapTexture paintingBust = new BitmapTexture(); + public static final BitmapTexture paintingCourbet = new BitmapTexture(); + public static final BitmapTexture paintingCreebet = new BitmapTexture(); + public static final BitmapTexture paintingDonkeyKong = new BitmapTexture(); + public static final BitmapTexture paintingFighters = new BitmapTexture(); + public static final BitmapTexture paintingGraham = new BitmapTexture(); + public static final BitmapTexture paintingKebab = new BitmapTexture(); + public static final BitmapTexture paintingMatch = new BitmapTexture(); + public static final BitmapTexture paintingPigscene = new BitmapTexture(); + public static final BitmapTexture paintingPlant = new BitmapTexture(); + public static final BitmapTexture paintingPointer = new BitmapTexture(); + public static final BitmapTexture paintingPool = new BitmapTexture(); + public static final BitmapTexture paintingSea = new BitmapTexture(); + public static final BitmapTexture paintingSkeleton = new BitmapTexture(); + public static final BitmapTexture paintingSkullAndRoses = new BitmapTexture(); + public static final BitmapTexture paintingStage = new BitmapTexture(); + public static final BitmapTexture paintingSunset = new BitmapTexture(); + public static final BitmapTexture paintingVoid = new BitmapTexture(); + public static final BitmapTexture paintingWanderer = new BitmapTexture(); + public static final BitmapTexture paintingWasteland = new BitmapTexture(); + public static final BitmapTexture paintingWither = new BitmapTexture(); public static final FontTexture fonts = new FontTexture(); - public static final Texture air = new Texture("air"); - public static final Texture stone = new Texture("stone"); - public static final Texture prismarine = new Texture(); - public static final Texture prismarineBricks = new Texture(); - public static final Texture darkPrismarine = new Texture(); - public static final Texture granite = new Texture(); - public static final Texture smoothGranite = new Texture(); - public static final Texture diorite = new Texture(); - public static final Texture smoothDiorite = new Texture(); - public static final Texture andesite = new Texture(); - public static final Texture smoothAndesite = new Texture(); - public static final Texture dirt = new Texture("dirt"); - public static final Texture coarseDirt = new Texture("dirt"); - public static final Texture grassSideSaturated = new Texture("grass-side-saturated"); - public static final Texture grassTop = new Texture("grass"); - public static final Texture grassSide = new Texture(); - public static final Texture water = new Texture("water"); - public static final Texture cauldronSide = new Texture(); - public static final Texture cauldronInside = new Texture(); - public static final Texture cauldronTop = new Texture(); - public static final Texture cauldronBottom = new Texture(); - public static final Texture smoothStone = new Texture(); - public static final Texture smoothStoneSlabSide = new Texture(); - public static final Texture brick = new Texture("bricks"); - public static final Texture tntTop = new Texture(); - public static final Texture tntSide = new Texture("tnt"); - public static final Texture tntBottom = new Texture(); - public static final Texture cobweb = new Texture("cobweb"); - public static final Texture portal = new Texture("nether-portal"); - public static final Texture cobblestone = new Texture("cobblestone"); - public static final Texture bedrock = new Texture("bedrock"); - public static final Texture sand = new Texture("sand"); - public static final Texture gravel = new Texture("gravel"); - public static final Texture ironBlock = new Texture("iron-block"); - public static final Texture goldBlock = new Texture("gold-block"); - public static final Texture diamondBlock = new Texture("diamond-block"); - public static final Texture chestTop = new Texture(); - public static final Texture chestBottom = new Texture(); - public static final Texture chestLeft = new Texture(); - public static final Texture chestRight = new Texture(); - public static final Texture chestFront = new Texture("chest"); - public static final Texture chestBack = new Texture(); - public static final Texture chestLock = new Texture(); - public static final Texture enderChestTop = new Texture(); - public static final Texture enderChestBottom = new Texture(); - public static final Texture enderChestLeft = new Texture(); - public static final Texture enderChestRight = new Texture(); - public static final Texture enderChestFront = new Texture(); - public static final Texture enderChestBack = new Texture(); - public static final Texture enderChestLock = new Texture(); - public static final Texture redMushroom = new Texture("red-mushroom"); - public static final Texture brownMushroom = new Texture("brown-mushroom"); - public static final Texture goldOre = new Texture("gold-ore"); - public static final Texture ironOre = new Texture("iron-ore"); - public static final Texture coalOre = new Texture("coal-ore"); - public static final Texture netherQuartzOre = new Texture(); - public static final Texture bookshelf = new Texture("bookshelf"); - public static final Texture mossStone = new Texture("moss-stone"); - public static final Texture obsidian = new Texture("obsidian"); - public static final Texture workbenchTop = new Texture(); - public static final Texture workbenchSide = new Texture("workbench"); - public static final Texture workbenchFront = new Texture("workbench"); - public static final Texture furnaceTop = new Texture(); - public static final Texture furnaceSide = new Texture(); - public static final Texture furnaceUnlitFront = new Texture("furnace"); - public static final Texture furnaceLitFront = new Texture("furnace-lit"); - public static final Texture dispenserFront = new Texture("dispenser"); - public static final Texture dispenserFrontVertical = new Texture("dispenser"); - public static final Texture dropperFront = new Texture(); - public static final Texture dropperFrontVertical = new Texture(); - public static final Texture sponge = new Texture("sponge"); - public static final Texture wetSponge = new Texture("sponge"); - public static final Texture glass = new Texture("glass"); - public static final Texture diamondOre = new Texture("diamond-ore"); - public static final Texture redstoneOre = new Texture("redstone-ore"); - public static final Texture stoneBrick = new Texture("stone-bricks"); - public static final Texture mossyStoneBrick = new Texture(); - public static final Texture crackedStoneBrick = new Texture(); - public static final Texture circleStoneBrick = new Texture(); - public static final Texture monsterSpawner = new Texture("spawner"); - public static final Texture snowBlock = new Texture("snow"); - public static final Texture snowSide = new Texture(); - public static final Texture ice = new Texture("ice"); - public static final Texture cactusTop = new Texture(); - public static final Texture cactusSide = new Texture(); - public static final Texture cactusBottom = new Texture(); - public static final Texture clay = new Texture("clay"); - public static final Texture sugarCane = new Texture("sugar-canes"); - public static final Texture jukeboxSide = new Texture(); - public static final Texture jukeboxTop = new Texture(); - public static final Texture noteBlock = new Texture(); - public static final Texture torch = new Texture("torch"); - public static final Texture oakDoorTop = new Texture(); - public static final Texture oakDoorBottom = new Texture(); - public static final Texture ironDoorTop = new Texture(); - public static final Texture ironDoorBottom = new Texture(); - public static final Texture ladder = new Texture("ladder"); - public static final Texture trapdoor = new Texture("trapdoor"); - public static final Texture ironTrapdoor = new Texture("trapdoor"); - public static final Texture birchTrapdoor = new Texture("trapdoor"); - public static final Texture spruceTrapdoor = new Texture("trapdoor"); - public static final Texture jungleTrapdoor = new Texture("trapdoor"); - public static final Texture acaciaTrapdoor = new Texture("trapdoor"); - public static final Texture darkOakTrapdoor = new Texture("trapdoor"); - public static final Texture ironBars = new Texture("iron-bars"); - public static final Texture farmlandWet = new Texture(); - public static final Texture farmlandDry = new Texture(); - public static final Texture lever = new Texture(); - public static final Texture redstoneTorchOn = new Texture("redstone-torch-on"); - public static final Texture redstoneTorchOff = new Texture("redstone-torch-off"); - public static final Texture redstoneWireCross = new Texture("redstone-wire-off-intersect"); - public static final Texture redstoneWire = new Texture(); - public static final Texture pumpkinTop = new Texture(); - public static final Texture pumpkinSide = new Texture(); - public static final Texture pumpkinFront = new Texture(); - public static final Texture jackolanternFront = new Texture(); - public static final Texture netherrack = new Texture("netherrack"); - public static final Texture soulsand = new Texture("soul-sand"); - public static final Texture glowstone = new Texture("glowstone"); - public static final Texture seaLantern = new Texture(); - public static final Texture sandstoneSide = new Texture("sandstone"); - public static final Texture sandstoneTop = new Texture(); - public static final Texture sandstoneBottom = new Texture(); - public static final Texture sandstoneDecorated = new Texture(); - public static final Texture sandstoneCut = new Texture(); - public static final Texture redSandstoneSide = new Texture(); - public static final Texture redSandstoneTop = new Texture(); - public static final Texture redSandstoneBottom = new Texture(); - public static final Texture redSandstoneDecorated = new Texture(); - public static final Texture redSandstoneCut = new Texture(); - public static final Texture deadBush = new Texture("dead-bush"); - public static final Texture tallGrass = new Texture("tall-grass"); - public static final Texture fern = new Texture(); - public static final Texture vines = new Texture("vines"); - public static final Texture crops0 = new Texture(); - public static final Texture crops1 = new Texture(); - public static final Texture crops2 = new Texture(); - public static final Texture crops3 = new Texture(); - public static final Texture crops4 = new Texture(); - public static final Texture crops5 = new Texture(); - public static final Texture crops6 = new Texture(); - public static final Texture crops7 = new Texture(); - public static final Texture rails = new Texture("minecart-track"); - public static final Texture railsCurved = new Texture(); - public static final Texture poweredRailOn = new Texture(); - public static final Texture poweredRailOff = new Texture(); - public static final Texture detectorRail = new Texture(); - public static final Texture detectorRailOn = new Texture(); - public static final Texture activatorRail = new Texture(); - public static final Texture activatorRailPowered = new Texture(); - public static final Texture whiteWool = new Texture("wool"); - public static final Texture orangeWool = new Texture("wool"); - public static final Texture magentaWool = new Texture("wool"); - public static final Texture lightBlueWool = new Texture("wool"); - public static final Texture yellowWool = new Texture("wool"); - public static final Texture limeWool = new Texture("wool"); - public static final Texture pinkWool = new Texture("wool"); - public static final Texture grayWool = new Texture("wool"); - public static final Texture lightGrayWool = new Texture("wool"); - public static final Texture cyanWool = new Texture("wool"); - public static final Texture purpleWool = new Texture("wool"); - public static final Texture blueWool = new Texture("wool"); - public static final Texture brownWool = new Texture("wool"); - public static final Texture greenWool = new Texture("wool"); - public static final Texture redWool = new Texture("wool"); - public static final Texture blackWool = new Texture("wool"); - public static final Texture lava = new Texture("lava"); - public static final Texture lapisOre = new Texture("lapis-lazuli-ore"); - public static final Texture lapisBlock = new Texture("lapis-lazuli-block"); - public static final Texture pistonSide = new Texture("piston"); - public static final Texture pistonInnerTop = new Texture(); - public static final Texture pistonBottom = new Texture(); - public static final Texture pistonTop = new Texture("piston-extension"); - public static final Texture pistonTopSticky = new Texture(); - public static final Texture fire = new Texture("fire"); + public static final BitmapTexture air = new BitmapTexture("air"); + public static final BitmapTexture stone = new BitmapTexture("stone"); + public static final BitmapTexture prismarine = new BitmapTexture(); + public static final BitmapTexture prismarineBricks = new BitmapTexture(); + public static final BitmapTexture darkPrismarine = new BitmapTexture(); + public static final BitmapTexture granite = new BitmapTexture(); + public static final BitmapTexture smoothGranite = new BitmapTexture(); + public static final BitmapTexture diorite = new BitmapTexture(); + public static final BitmapTexture smoothDiorite = new BitmapTexture(); + public static final BitmapTexture andesite = new BitmapTexture(); + public static final BitmapTexture smoothAndesite = new BitmapTexture(); + public static final BitmapTexture dirt = new BitmapTexture("dirt"); + public static final BitmapTexture coarseDirt = new BitmapTexture("dirt"); + public static final BitmapTexture grassSideSaturated = new BitmapTexture("grass-side-saturated"); + public static final BitmapTexture grassTop = new BitmapTexture("grass"); + public static final BitmapTexture grassSide = new BitmapTexture(); + public static final BitmapTexture water = new BitmapTexture("water"); + public static final BitmapTexture cauldronSide = new BitmapTexture(); + public static final BitmapTexture cauldronInside = new BitmapTexture(); + public static final BitmapTexture cauldronTop = new BitmapTexture(); + public static final BitmapTexture cauldronBottom = new BitmapTexture(); + public static final BitmapTexture smoothStone = new BitmapTexture(); + public static final BitmapTexture smoothStoneSlabSide = new BitmapTexture(); + public static final BitmapTexture brick = new BitmapTexture("bricks"); + public static final BitmapTexture tntTop = new BitmapTexture(); + public static final BitmapTexture tntSide = new BitmapTexture("tnt"); + public static final BitmapTexture tntBottom = new BitmapTexture(); + public static final BitmapTexture cobweb = new BitmapTexture("cobweb"); + public static final BitmapTexture portal = new BitmapTexture("nether-portal"); + public static final BitmapTexture cobblestone = new BitmapTexture("cobblestone"); + public static final BitmapTexture bedrock = new BitmapTexture("bedrock"); + public static final BitmapTexture sand = new BitmapTexture("sand"); + public static final BitmapTexture gravel = new BitmapTexture("gravel"); + public static final BitmapTexture ironBlock = new BitmapTexture("iron-block"); + public static final BitmapTexture goldBlock = new BitmapTexture("gold-block"); + public static final BitmapTexture diamondBlock = new BitmapTexture("diamond-block"); + public static final BitmapTexture chestTop = new BitmapTexture(); + public static final BitmapTexture chestBottom = new BitmapTexture(); + public static final BitmapTexture chestLeft = new BitmapTexture(); + public static final BitmapTexture chestRight = new BitmapTexture(); + public static final BitmapTexture chestFront = new BitmapTexture("chest"); + public static final BitmapTexture chestBack = new BitmapTexture(); + public static final BitmapTexture chestLock = new BitmapTexture(); + public static final BitmapTexture enderChestTop = new BitmapTexture(); + public static final BitmapTexture enderChestBottom = new BitmapTexture(); + public static final BitmapTexture enderChestLeft = new BitmapTexture(); + public static final BitmapTexture enderChestRight = new BitmapTexture(); + public static final BitmapTexture enderChestFront = new BitmapTexture(); + public static final BitmapTexture enderChestBack = new BitmapTexture(); + public static final BitmapTexture enderChestLock = new BitmapTexture(); + public static final BitmapTexture redMushroom = new BitmapTexture("red-mushroom"); + public static final BitmapTexture brownMushroom = new BitmapTexture("brown-mushroom"); + public static final BitmapTexture goldOre = new BitmapTexture("gold-ore"); + public static final BitmapTexture ironOre = new BitmapTexture("iron-ore"); + public static final BitmapTexture coalOre = new BitmapTexture("coal-ore"); + public static final BitmapTexture netherQuartzOre = new BitmapTexture(); + public static final BitmapTexture bookshelf = new BitmapTexture("bookshelf"); + public static final BitmapTexture mossStone = new BitmapTexture("moss-stone"); + public static final BitmapTexture obsidian = new BitmapTexture("obsidian"); + public static final BitmapTexture workbenchTop = new BitmapTexture(); + public static final BitmapTexture workbenchSide = new BitmapTexture("workbench"); + public static final BitmapTexture workbenchFront = new BitmapTexture("workbench"); + public static final BitmapTexture furnaceTop = new BitmapTexture(); + public static final BitmapTexture furnaceSide = new BitmapTexture(); + public static final BitmapTexture furnaceUnlitFront = new BitmapTexture("furnace"); + public static final BitmapTexture furnaceLitFront = new BitmapTexture("furnace-lit"); + public static final BitmapTexture dispenserFront = new BitmapTexture("dispenser"); + public static final BitmapTexture dispenserFrontVertical = new BitmapTexture("dispenser"); + public static final BitmapTexture dropperFront = new BitmapTexture(); + public static final BitmapTexture dropperFrontVertical = new BitmapTexture(); + public static final BitmapTexture sponge = new BitmapTexture("sponge"); + public static final BitmapTexture wetSponge = new BitmapTexture("sponge"); + public static final BitmapTexture glass = new BitmapTexture("glass"); + public static final BitmapTexture diamondOre = new BitmapTexture("diamond-ore"); + public static final BitmapTexture redstoneOre = new BitmapTexture("redstone-ore"); + public static final BitmapTexture stoneBrick = new BitmapTexture("stone-bricks"); + public static final BitmapTexture mossyStoneBrick = new BitmapTexture(); + public static final BitmapTexture crackedStoneBrick = new BitmapTexture(); + public static final BitmapTexture circleStoneBrick = new BitmapTexture(); + public static final BitmapTexture monsterSpawner = new BitmapTexture("spawner"); + public static final BitmapTexture snowBlock = new BitmapTexture("snow"); + public static final BitmapTexture snowSide = new BitmapTexture(); + public static final BitmapTexture ice = new BitmapTexture("ice"); + public static final BitmapTexture cactusTop = new BitmapTexture(); + public static final BitmapTexture cactusSide = new BitmapTexture(); + public static final BitmapTexture cactusBottom = new BitmapTexture(); + public static final BitmapTexture clay = new BitmapTexture("clay"); + public static final BitmapTexture sugarCane = new BitmapTexture("sugar-canes"); + public static final BitmapTexture jukeboxSide = new BitmapTexture(); + public static final BitmapTexture jukeboxTop = new BitmapTexture(); + public static final BitmapTexture noteBlock = new BitmapTexture(); + public static final BitmapTexture torch = new BitmapTexture("torch"); + public static final BitmapTexture oakDoorTop = new BitmapTexture(); + public static final BitmapTexture oakDoorBottom = new BitmapTexture(); + public static final BitmapTexture ironDoorTop = new BitmapTexture(); + public static final BitmapTexture ironDoorBottom = new BitmapTexture(); + public static final BitmapTexture ladder = new BitmapTexture("ladder"); + public static final BitmapTexture trapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture ironTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture birchTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture spruceTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture jungleTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture acaciaTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture darkOakTrapdoor = new BitmapTexture("trapdoor"); + public static final BitmapTexture ironBars = new BitmapTexture("iron-bars"); + public static final BitmapTexture farmlandWet = new BitmapTexture(); + public static final BitmapTexture farmlandDry = new BitmapTexture(); + public static final BitmapTexture lever = new BitmapTexture(); + public static final BitmapTexture redstoneTorchOn = new BitmapTexture("redstone-torch-on"); + public static final BitmapTexture redstoneTorchOff = new BitmapTexture("redstone-torch-off"); + public static final BitmapTexture redstoneWireCross = new BitmapTexture("redstone-wire-off-intersect"); + public static final BitmapTexture redstoneWire = new BitmapTexture(); + public static final BitmapTexture pumpkinTop = new BitmapTexture(); + public static final BitmapTexture pumpkinSide = new BitmapTexture(); + public static final BitmapTexture pumpkinFront = new BitmapTexture(); + public static final BitmapTexture jackolanternFront = new BitmapTexture(); + public static final BitmapTexture netherrack = new BitmapTexture("netherrack"); + public static final BitmapTexture soulsand = new BitmapTexture("soul-sand"); + public static final BitmapTexture glowstone = new BitmapTexture("glowstone"); + public static final BitmapTexture seaLantern = new BitmapTexture(); + public static final BitmapTexture sandstoneSide = new BitmapTexture("sandstone"); + public static final BitmapTexture sandstoneTop = new BitmapTexture(); + public static final BitmapTexture sandstoneBottom = new BitmapTexture(); + public static final BitmapTexture sandstoneDecorated = new BitmapTexture(); + public static final BitmapTexture sandstoneCut = new BitmapTexture(); + public static final BitmapTexture redSandstoneSide = new BitmapTexture(); + public static final BitmapTexture redSandstoneTop = new BitmapTexture(); + public static final BitmapTexture redSandstoneBottom = new BitmapTexture(); + public static final BitmapTexture redSandstoneDecorated = new BitmapTexture(); + public static final BitmapTexture redSandstoneCut = new BitmapTexture(); + public static final BitmapTexture deadBush = new BitmapTexture("dead-bush"); + public static final BitmapTexture tallGrass = new BitmapTexture("tall-grass"); + public static final BitmapTexture fern = new BitmapTexture(); + public static final BitmapTexture vines = new BitmapTexture("vines"); + public static final BitmapTexture crops0 = new BitmapTexture(); + public static final BitmapTexture crops1 = new BitmapTexture(); + public static final BitmapTexture crops2 = new BitmapTexture(); + public static final BitmapTexture crops3 = new BitmapTexture(); + public static final BitmapTexture crops4 = new BitmapTexture(); + public static final BitmapTexture crops5 = new BitmapTexture(); + public static final BitmapTexture crops6 = new BitmapTexture(); + public static final BitmapTexture crops7 = new BitmapTexture(); + public static final BitmapTexture rails = new BitmapTexture("minecart-track"); + public static final BitmapTexture railsCurved = new BitmapTexture(); + public static final BitmapTexture poweredRailOn = new BitmapTexture(); + public static final BitmapTexture poweredRailOff = new BitmapTexture(); + public static final BitmapTexture detectorRail = new BitmapTexture(); + public static final BitmapTexture detectorRailOn = new BitmapTexture(); + public static final BitmapTexture activatorRail = new BitmapTexture(); + public static final BitmapTexture activatorRailPowered = new BitmapTexture(); + public static final BitmapTexture whiteWool = new BitmapTexture("wool"); + public static final BitmapTexture orangeWool = new BitmapTexture("wool"); + public static final BitmapTexture magentaWool = new BitmapTexture("wool"); + public static final BitmapTexture lightBlueWool = new BitmapTexture("wool"); + public static final BitmapTexture yellowWool = new BitmapTexture("wool"); + public static final BitmapTexture limeWool = new BitmapTexture("wool"); + public static final BitmapTexture pinkWool = new BitmapTexture("wool"); + public static final BitmapTexture grayWool = new BitmapTexture("wool"); + public static final BitmapTexture lightGrayWool = new BitmapTexture("wool"); + public static final BitmapTexture cyanWool = new BitmapTexture("wool"); + public static final BitmapTexture purpleWool = new BitmapTexture("wool"); + public static final BitmapTexture blueWool = new BitmapTexture("wool"); + public static final BitmapTexture brownWool = new BitmapTexture("wool"); + public static final BitmapTexture greenWool = new BitmapTexture("wool"); + public static final BitmapTexture redWool = new BitmapTexture("wool"); + public static final BitmapTexture blackWool = new BitmapTexture("wool"); + public static final BitmapTexture lava = new BitmapTexture("lava"); + public static final BitmapTexture lapisOre = new BitmapTexture("lapis-lazuli-ore"); + public static final BitmapTexture lapisBlock = new BitmapTexture("lapis-lazuli-block"); + public static final BitmapTexture pistonSide = new BitmapTexture("piston"); + public static final BitmapTexture pistonInnerTop = new BitmapTexture(); + public static final BitmapTexture pistonBottom = new BitmapTexture(); + public static final BitmapTexture pistonTop = new BitmapTexture("piston-extension"); + public static final BitmapTexture pistonTopSticky = new BitmapTexture(); + public static final BitmapTexture fire = new BitmapTexture("fire"); public static final AnimatedTexture fireLayer0 = new AnimatedTexture("fire"); public static final AnimatedTexture fireLayer1 = new AnimatedTexture("fire"); - public static final Texture redstoneRepeaterOn = new Texture("redstone-repeater-off"); - public static final Texture redstoneRepeaterOff = new Texture("redstone-repeater-on"); - public static final Texture redstoneLampOn = new Texture("redstone-lamp-off"); - public static final Texture redstoneLampOff = new Texture("redstone-lamp-on"); - public static final Texture endPortalFrameTop = new Texture(); - public static final Texture endPortalFrameSide = new Texture(); - public static final Texture endPortal = new Texture("end-portal"); - public static final Texture endStone = new Texture("end-stone"); - public static final Texture brewingStandSide = new Texture(); - public static final Texture brewingStandBase = new Texture(); - public static final Texture cakeTop = new Texture(); - public static final Texture cakeSide = new Texture(); - public static final Texture cakeInside = new Texture(); - public static final Texture cakeBottom = new Texture(); - public static final Texture hugeBrownMushroom = new Texture(); - public static final Texture hugeRedMushroom = new Texture(); - public static final Texture mushroomStem = new Texture(); - public static final Texture mushroomPores = new Texture(); - public static final Texture melonSide = new Texture(); - public static final Texture melonTop = new Texture(); - public static final Texture stemStraight = new Texture(); - public static final Texture stemBent = new Texture(); - public static final Texture myceliumTop = new Texture(); - public static final Texture myceliumSide = new Texture(); - public static final Texture lilyPad = new Texture("lily-pad"); - public static final Texture netherBrick = new Texture(); - public static final Texture netherWart0 = new Texture(); - public static final Texture netherWart1 = new Texture(); - public static final Texture netherWart2 = new Texture(); - public static final Texture largeChestFrontLeft = new Texture(); - public static final Texture largeChestFrontRight = new Texture(); - public static final Texture largeChestBackLeft = new Texture(); - public static final Texture largeChestBackRight = new Texture(); - public static final Texture largeChestTopLeft = new Texture(); - public static final Texture largeChestTopRight = new Texture(); - public static final Texture largeChestBottomLeft = new Texture(); - public static final Texture largeChestBottomRight = new Texture(); - public static final Texture largeChestLeft = new Texture(); - public static final Texture largeChestRight = new Texture(); - public static final Texture enchantmentTableSide = new Texture(); - public static final Texture enchantmentTableTop = new Texture(); - public static final Texture enchantmentTableBottom = new Texture(); - - public static final Texture commandBlockBack = new Texture(); - public static final Texture commandBlockFront = new Texture(); - public static final Texture commandBlockSide = new Texture(); - public static final Texture commandBlockConditional = new Texture(); - - public static final Texture repeatingCommandBlockBack = new Texture(); - public static final Texture repeatingCommandBlockFront = new Texture(); - public static final Texture repeatingCommandBlockSide = new Texture(); - public static final Texture repeatingCommandBlockConditional = new Texture(); - - public static final Texture chainCommandBlockBack = new Texture(); - public static final Texture chainCommandBlockFront = new Texture(); - public static final Texture chainCommandBlockSide = new Texture(); - public static final Texture chainCommandBlockConditional = new Texture(); - - public static final Texture eyeOfTheEnder = new Texture(); - public static final Texture dragonEgg = new Texture(); - public static final Texture cocoaPlantSmall = new Texture(); - public static final Texture cocoaPlantMedium = new Texture(); - public static final Texture cocoaPlantLarge = new Texture(); - public static final Texture emeraldOre = new Texture(); - public static final Texture emeraldBlock = new Texture(); - public static final Texture redstoneBlock = new Texture(); - public static final Texture tripwireHook = new Texture(); - public static final Texture tripwire = new Texture(); - public static final Texture carrots0 = new Texture(); - public static final Texture carrots1 = new Texture(); - public static final Texture carrots2 = new Texture(); - public static final Texture carrots3 = new Texture(); - public static final Texture potatoes0 = new Texture(); - public static final Texture potatoes1 = new Texture(); - public static final Texture potatoes2 = new Texture(); - public static final Texture potatoes3 = new Texture(); - public static final Texture beacon = new Texture(); - public static final Texture beaconBeam = new Texture(); - public static final Texture anvilSide = new Texture(); - public static final Texture anvilTop = new Texture(); - public static final Texture anvilTopDamaged1 = new Texture(); - public static final Texture anvilTopDamaged2 = new Texture(); - public static final Texture flowerPot = new Texture(); - public static final Texture quartzSide = new Texture(); - public static final Texture quartzTop = new Texture(); - public static final Texture quartzBottom = new Texture(); - public static final Texture quartzChiseled = new Texture(); - public static final Texture quartzChiseledTop = new Texture(); - public static final Texture quartzPillar = new Texture(); - public static final Texture quartzPillarTop = new Texture(); - public static final Texture daylightDetectorTop = new Texture(); - public static final Texture daylightDetectorInvertedTop = new Texture(); - public static final Texture daylightDetectorSide = new Texture(); - public static final Texture comparatorOff = new Texture(); - public static final Texture comparatorOn = new Texture(); - public static final Texture hopperOutside = new Texture(); - public static final Texture hopperInside = new Texture(); - public static final Texture hopperTop = new Texture(); - public static final Texture slime = new Texture(); + public static final BitmapTexture redstoneRepeaterOn = new BitmapTexture("redstone-repeater-off"); + public static final BitmapTexture redstoneRepeaterOff = new BitmapTexture("redstone-repeater-on"); + public static final BitmapTexture redstoneLampOn = new BitmapTexture("redstone-lamp-off"); + public static final BitmapTexture redstoneLampOff = new BitmapTexture("redstone-lamp-on"); + public static final BitmapTexture endPortalFrameTop = new BitmapTexture(); + public static final BitmapTexture endPortalFrameSide = new BitmapTexture(); + public static final BitmapTexture endPortal = new BitmapTexture("end-portal"); + public static final BitmapTexture endStone = new BitmapTexture("end-stone"); + public static final BitmapTexture brewingStandSide = new BitmapTexture(); + public static final BitmapTexture brewingStandBase = new BitmapTexture(); + public static final BitmapTexture cakeTop = new BitmapTexture(); + public static final BitmapTexture cakeSide = new BitmapTexture(); + public static final BitmapTexture cakeInside = new BitmapTexture(); + public static final BitmapTexture cakeBottom = new BitmapTexture(); + public static final BitmapTexture hugeBrownMushroom = new BitmapTexture(); + public static final BitmapTexture hugeRedMushroom = new BitmapTexture(); + public static final BitmapTexture mushroomStem = new BitmapTexture(); + public static final BitmapTexture mushroomPores = new BitmapTexture(); + public static final BitmapTexture melonSide = new BitmapTexture(); + public static final BitmapTexture melonTop = new BitmapTexture(); + public static final BitmapTexture stemStraight = new BitmapTexture(); + public static final BitmapTexture stemBent = new BitmapTexture(); + public static final BitmapTexture myceliumTop = new BitmapTexture(); + public static final BitmapTexture myceliumSide = new BitmapTexture(); + public static final BitmapTexture lilyPad = new BitmapTexture("lily-pad"); + public static final BitmapTexture netherBrick = new BitmapTexture(); + public static final BitmapTexture netherWart0 = new BitmapTexture(); + public static final BitmapTexture netherWart1 = new BitmapTexture(); + public static final BitmapTexture netherWart2 = new BitmapTexture(); + public static final BitmapTexture largeChestFrontLeft = new BitmapTexture(); + public static final BitmapTexture largeChestFrontRight = new BitmapTexture(); + public static final BitmapTexture largeChestBackLeft = new BitmapTexture(); + public static final BitmapTexture largeChestBackRight = new BitmapTexture(); + public static final BitmapTexture largeChestTopLeft = new BitmapTexture(); + public static final BitmapTexture largeChestTopRight = new BitmapTexture(); + public static final BitmapTexture largeChestBottomLeft = new BitmapTexture(); + public static final BitmapTexture largeChestBottomRight = new BitmapTexture(); + public static final BitmapTexture largeChestLeft = new BitmapTexture(); + public static final BitmapTexture largeChestRight = new BitmapTexture(); + public static final BitmapTexture enchantmentTableSide = new BitmapTexture(); + public static final BitmapTexture enchantmentTableTop = new BitmapTexture(); + public static final BitmapTexture enchantmentTableBottom = new BitmapTexture(); + + public static final BitmapTexture commandBlockBack = new BitmapTexture(); + public static final BitmapTexture commandBlockFront = new BitmapTexture(); + public static final BitmapTexture commandBlockSide = new BitmapTexture(); + public static final BitmapTexture commandBlockConditional = new BitmapTexture(); + + public static final BitmapTexture repeatingCommandBlockBack = new BitmapTexture(); + public static final BitmapTexture repeatingCommandBlockFront = new BitmapTexture(); + public static final BitmapTexture repeatingCommandBlockSide = new BitmapTexture(); + public static final BitmapTexture repeatingCommandBlockConditional = new BitmapTexture(); + + public static final BitmapTexture chainCommandBlockBack = new BitmapTexture(); + public static final BitmapTexture chainCommandBlockFront = new BitmapTexture(); + public static final BitmapTexture chainCommandBlockSide = new BitmapTexture(); + public static final BitmapTexture chainCommandBlockConditional = new BitmapTexture(); + + public static final BitmapTexture eyeOfTheEnder = new BitmapTexture(); + public static final BitmapTexture dragonEgg = new BitmapTexture(); + public static final BitmapTexture cocoaPlantSmall = new BitmapTexture(); + public static final BitmapTexture cocoaPlantMedium = new BitmapTexture(); + public static final BitmapTexture cocoaPlantLarge = new BitmapTexture(); + public static final BitmapTexture emeraldOre = new BitmapTexture(); + public static final BitmapTexture emeraldBlock = new BitmapTexture(); + public static final BitmapTexture redstoneBlock = new BitmapTexture(); + public static final BitmapTexture tripwireHook = new BitmapTexture(); + public static final BitmapTexture tripwire = new BitmapTexture(); + public static final BitmapTexture carrots0 = new BitmapTexture(); + public static final BitmapTexture carrots1 = new BitmapTexture(); + public static final BitmapTexture carrots2 = new BitmapTexture(); + public static final BitmapTexture carrots3 = new BitmapTexture(); + public static final BitmapTexture potatoes0 = new BitmapTexture(); + public static final BitmapTexture potatoes1 = new BitmapTexture(); + public static final BitmapTexture potatoes2 = new BitmapTexture(); + public static final BitmapTexture potatoes3 = new BitmapTexture(); + public static final BitmapTexture beacon = new BitmapTexture(); + public static final BitmapTexture beaconBeam = new BitmapTexture(); + public static final BitmapTexture anvilSide = new BitmapTexture(); + public static final BitmapTexture anvilTop = new BitmapTexture(); + public static final BitmapTexture anvilTopDamaged1 = new BitmapTexture(); + public static final BitmapTexture anvilTopDamaged2 = new BitmapTexture(); + public static final BitmapTexture flowerPot = new BitmapTexture(); + public static final BitmapTexture quartzSide = new BitmapTexture(); + public static final BitmapTexture quartzTop = new BitmapTexture(); + public static final BitmapTexture quartzBottom = new BitmapTexture(); + public static final BitmapTexture quartzChiseled = new BitmapTexture(); + public static final BitmapTexture quartzChiseledTop = new BitmapTexture(); + public static final BitmapTexture quartzPillar = new BitmapTexture(); + public static final BitmapTexture quartzPillarTop = new BitmapTexture(); + public static final BitmapTexture daylightDetectorTop = new BitmapTexture(); + public static final BitmapTexture daylightDetectorInvertedTop = new BitmapTexture(); + public static final BitmapTexture daylightDetectorSide = new BitmapTexture(); + public static final BitmapTexture comparatorOff = new BitmapTexture(); + public static final BitmapTexture comparatorOn = new BitmapTexture(); + public static final BitmapTexture hopperOutside = new BitmapTexture(); + public static final BitmapTexture hopperInside = new BitmapTexture(); + public static final BitmapTexture hopperTop = new BitmapTexture(); + public static final BitmapTexture slime = new BitmapTexture(); // [1.6] Hay Block, Hardened Clay, Coal Block - public static final Texture hayBlockSide = new Texture(); - public static final Texture hayBlockTop = new Texture(); - public static final Texture hardenedClay = new Texture(); - public static final Texture coalBlock = new Texture(); + public static final BitmapTexture hayBlockSide = new BitmapTexture(); + public static final BitmapTexture hayBlockTop = new BitmapTexture(); + public static final BitmapTexture hardenedClay = new BitmapTexture(); + public static final BitmapTexture coalBlock = new BitmapTexture(); // [1.6] Colored Clay - public static final Texture whiteClay = new Texture(); - public static final Texture orangeClay = new Texture(); - public static final Texture magentaClay = new Texture(); - public static final Texture lightBlueClay = new Texture(); - public static final Texture yellowClay = new Texture(); - public static final Texture limeClay = new Texture(); - public static final Texture pinkClay = new Texture(); - public static final Texture grayClay = new Texture(); - public static final Texture lightGrayClay = new Texture(); - public static final Texture cyanClay = new Texture(); - public static final Texture purpleClay = new Texture(); - public static final Texture blueClay = new Texture(); - public static final Texture brownClay = new Texture(); - public static final Texture greenClay = new Texture(); - public static final Texture redClay = new Texture(); - public static final Texture blackClay = new Texture(); + public static final BitmapTexture whiteClay = new BitmapTexture(); + public static final BitmapTexture orangeClay = new BitmapTexture(); + public static final BitmapTexture magentaClay = new BitmapTexture(); + public static final BitmapTexture lightBlueClay = new BitmapTexture(); + public static final BitmapTexture yellowClay = new BitmapTexture(); + public static final BitmapTexture limeClay = new BitmapTexture(); + public static final BitmapTexture pinkClay = new BitmapTexture(); + public static final BitmapTexture grayClay = new BitmapTexture(); + public static final BitmapTexture lightGrayClay = new BitmapTexture(); + public static final BitmapTexture cyanClay = new BitmapTexture(); + public static final BitmapTexture purpleClay = new BitmapTexture(); + public static final BitmapTexture blueClay = new BitmapTexture(); + public static final BitmapTexture brownClay = new BitmapTexture(); + public static final BitmapTexture greenClay = new BitmapTexture(); + public static final BitmapTexture redClay = new BitmapTexture(); + public static final BitmapTexture blackClay = new BitmapTexture(); // [1.7.2] Stained Glass - public static final Texture whiteGlass = new Texture("glass"); - public static final Texture orangeGlass = new Texture("glass"); - public static final Texture magentaGlass = new Texture("glass"); - public static final Texture lightBlueGlass = new Texture("glass"); - public static final Texture yellowGlass = new Texture("glass"); - public static final Texture limeGlass = new Texture("glass"); - public static final Texture pinkGlass = new Texture("glass"); - public static final Texture grayGlass = new Texture("glass"); - public static final Texture lightGrayGlass = new Texture("glass"); - public static final Texture cyanGlass = new Texture("glass"); - public static final Texture purpleGlass = new Texture("glass"); - public static final Texture blueGlass = new Texture("glass"); - public static final Texture brownGlass = new Texture("glass"); - public static final Texture greenGlass = new Texture("glass"); - public static final Texture redGlass = new Texture("glass"); - public static final Texture blackGlass = new Texture("glass"); + public static final BitmapTexture whiteGlass = new BitmapTexture("glass"); + public static final BitmapTexture orangeGlass = new BitmapTexture("glass"); + public static final BitmapTexture magentaGlass = new BitmapTexture("glass"); + public static final BitmapTexture lightBlueGlass = new BitmapTexture("glass"); + public static final BitmapTexture yellowGlass = new BitmapTexture("glass"); + public static final BitmapTexture limeGlass = new BitmapTexture("glass"); + public static final BitmapTexture pinkGlass = new BitmapTexture("glass"); + public static final BitmapTexture grayGlass = new BitmapTexture("glass"); + public static final BitmapTexture lightGrayGlass = new BitmapTexture("glass"); + public static final BitmapTexture cyanGlass = new BitmapTexture("glass"); + public static final BitmapTexture purpleGlass = new BitmapTexture("glass"); + public static final BitmapTexture blueGlass = new BitmapTexture("glass"); + public static final BitmapTexture brownGlass = new BitmapTexture("glass"); + public static final BitmapTexture greenGlass = new BitmapTexture("glass"); + public static final BitmapTexture redGlass = new BitmapTexture("glass"); + public static final BitmapTexture blackGlass = new BitmapTexture("glass"); // [1.7.2] Podzol - public static final Texture podzolTop = new Texture(); - public static final Texture podzolSide = new Texture(); + public static final BitmapTexture podzolTop = new BitmapTexture(); + public static final BitmapTexture podzolSide = new BitmapTexture(); // [1.7.2] Flowers - public static final Texture dandelion = new Texture("yellow-flower"); - public static final Texture poppy = new Texture("rose"); - public static final Texture blueOrchid = new Texture(); - public static final Texture allium = new Texture(); - public static final Texture azureBluet = new Texture(); - public static final Texture redTulip = new Texture(); - public static final Texture orangeTulip = new Texture(); - public static final Texture whiteTulip = new Texture(); - public static final Texture pinkTulip = new Texture(); - public static final Texture oxeyeDaisy = new Texture(); + public static final BitmapTexture dandelion = new BitmapTexture("yellow-flower"); + public static final BitmapTexture poppy = new BitmapTexture("rose"); + public static final BitmapTexture blueOrchid = new BitmapTexture(); + public static final BitmapTexture allium = new BitmapTexture(); + public static final BitmapTexture azureBluet = new BitmapTexture(); + public static final BitmapTexture redTulip = new BitmapTexture(); + public static final BitmapTexture orangeTulip = new BitmapTexture(); + public static final BitmapTexture whiteTulip = new BitmapTexture(); + public static final BitmapTexture pinkTulip = new BitmapTexture(); + public static final BitmapTexture oxeyeDaisy = new BitmapTexture(); // [1.7.2] Large Flowers - public static final Texture sunflowerBottom = new Texture(); - public static final Texture sunflowerTop = new Texture(); - public static final Texture sunflowerFront = new Texture(); - public static final Texture sunflowerBack = new Texture(); - public static final Texture lilacBottom = new Texture(); - public static final Texture lilacTop = new Texture(); - public static final Texture doubleTallGrassBottom = new Texture(); - public static final Texture doubleTallGrassTop = new Texture(); - public static final Texture largeFernBottom = new Texture(); - public static final Texture largeFernTop = new Texture(); - public static final Texture roseBushBottom = new Texture(); - public static final Texture roseBushTop = new Texture(); - public static final Texture peonyBottom = new Texture(); - public static final Texture peonyTop = new Texture(); + public static final BitmapTexture sunflowerBottom = new BitmapTexture(); + public static final BitmapTexture sunflowerTop = new BitmapTexture(); + public static final BitmapTexture sunflowerFront = new BitmapTexture(); + public static final BitmapTexture sunflowerBack = new BitmapTexture(); + public static final BitmapTexture lilacBottom = new BitmapTexture(); + public static final BitmapTexture lilacTop = new BitmapTexture(); + public static final BitmapTexture doubleTallGrassBottom = new BitmapTexture(); + public static final BitmapTexture doubleTallGrassTop = new BitmapTexture(); + public static final BitmapTexture largeFernBottom = new BitmapTexture(); + public static final BitmapTexture largeFernTop = new BitmapTexture(); + public static final BitmapTexture roseBushBottom = new BitmapTexture(); + public static final BitmapTexture roseBushTop = new BitmapTexture(); + public static final BitmapTexture peonyBottom = new BitmapTexture(); + public static final BitmapTexture peonyTop = new BitmapTexture(); // [1.7.2] Colored Glass Panes - public static final Texture glassPaneTop = new Texture(); - public static final Texture whiteGlassPaneSide = new Texture(); - public static final Texture orangeGlassPaneSide = new Texture(); - public static final Texture magentaGlassPaneSide = new Texture(); - public static final Texture lightBlueGlassPaneSide = new Texture(); - public static final Texture yellowGlassPaneSide = new Texture(); - public static final Texture limeGlassPaneSide = new Texture(); - public static final Texture pinkGlassPaneSide = new Texture(); - public static final Texture grayGlassPaneSide = new Texture(); - public static final Texture lightGrayGlassPaneSide = new Texture(); - public static final Texture cyanGlassPaneSide = new Texture(); - public static final Texture purpleGlassPaneSide = new Texture(); - public static final Texture blueGlassPaneSide = new Texture(); - public static final Texture brownGlassPaneSide = new Texture(); - public static final Texture greenGlassPaneSide = new Texture(); - public static final Texture redGlassPaneSide = new Texture(); - public static final Texture blackGlassPaneSide = new Texture(); + public static final BitmapTexture glassPaneTop = new BitmapTexture(); + public static final BitmapTexture whiteGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture orangeGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture magentaGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture lightBlueGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture yellowGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture limeGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture pinkGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture grayGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture lightGrayGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture cyanGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture purpleGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture blueGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture brownGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture greenGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture redGlassPaneSide = new BitmapTexture(); + public static final BitmapTexture blackGlassPaneSide = new BitmapTexture(); // Minecraft 1.9 blocks. - public static final Texture grassPathSide = new Texture(); - public static final Texture grassPathTop = new Texture(); - public static final Texture endBricks = new Texture(); - public static final Texture purpurBlock = new Texture(); - public static final Texture purpurPillarTop = new Texture(); - public static final Texture purpurPillarSide = new Texture(); - public static final Texture chorusFlower = new Texture(); - public static final Texture chorusFlowerDead = new Texture(); - public static final Texture chorusPlant = new Texture(); - public static final Texture endRod = new Texture(); + public static final BitmapTexture grassPathSide = new BitmapTexture(); + public static final BitmapTexture grassPathTop = new BitmapTexture(); + public static final BitmapTexture endBricks = new BitmapTexture(); + public static final BitmapTexture purpurBlock = new BitmapTexture(); + public static final BitmapTexture purpurPillarTop = new BitmapTexture(); + public static final BitmapTexture purpurPillarSide = new BitmapTexture(); + public static final BitmapTexture chorusFlower = new BitmapTexture(); + public static final BitmapTexture chorusFlowerDead = new BitmapTexture(); + public static final BitmapTexture chorusPlant = new BitmapTexture(); + public static final BitmapTexture endRod = new BitmapTexture(); // [1.11] Shulker boxes. public static final ShulkerTexture shulker = new ShulkerTexture(); @@ -488,31 +465,31 @@ public class Texture { public static final ShulkerTexture shulkerYellow = new ShulkerTexture(); // [1.11] Observer block. - public static final Texture observerBack = new Texture(); - public static final Texture observerBackOn = new Texture(); - public static final Texture observerFront = new Texture(); - public static final Texture observerSide = new Texture(); - public static final Texture observerTop = new Texture(); + public static final BitmapTexture observerBack = new BitmapTexture(); + public static final BitmapTexture observerBackOn = new BitmapTexture(); + public static final BitmapTexture observerFront = new BitmapTexture(); + public static final BitmapTexture observerSide = new BitmapTexture(); + public static final BitmapTexture observerTop = new BitmapTexture(); // Trapped Chest. - public static final Texture trappedChestTop = new Texture(); - public static final Texture trappedChestBottom = new Texture(); - public static final Texture trappedChestLeft = new Texture(); - public static final Texture trappedChestRight = new Texture(); - public static final Texture trappedChestFront = new Texture("chest"); - public static final Texture trappedChestBack = new Texture(); - public static final Texture trappedChestLock = new Texture(); - - public static final Texture largeTrappedChestFrontLeft = new Texture(); - public static final Texture largeTrappedChestFrontRight = new Texture(); - public static final Texture largeTrappedChestBackLeft = new Texture(); - public static final Texture largeTrappedChestBackRight = new Texture(); - public static final Texture largeTrappedChestTopLeft = new Texture(); - public static final Texture largeTrappedChestTopRight = new Texture(); - public static final Texture largeTrappedChestBottomLeft = new Texture(); - public static final Texture largeTrappedChestBottomRight = new Texture(); - public static final Texture largeTrappedChestLeft = new Texture(); - public static final Texture largeTrappedChestRight = new Texture(); + public static final BitmapTexture trappedChestTop = new BitmapTexture(); + public static final BitmapTexture trappedChestBottom = new BitmapTexture(); + public static final BitmapTexture trappedChestLeft = new BitmapTexture(); + public static final BitmapTexture trappedChestRight = new BitmapTexture(); + public static final BitmapTexture trappedChestFront = new BitmapTexture("chest"); + public static final BitmapTexture trappedChestBack = new BitmapTexture(); + public static final BitmapTexture trappedChestLock = new BitmapTexture(); + + public static final BitmapTexture largeTrappedChestFrontLeft = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestFrontRight = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestBackLeft = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestBackRight = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestTopLeft = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestTopRight = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestBottomLeft = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestBottomRight = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestLeft = new BitmapTexture(); + public static final BitmapTexture largeTrappedChestRight = new BitmapTexture(); // Entity textures. public static final PlayerTexture alex = new PlayerTexture(); @@ -525,664 +502,664 @@ public class Texture { public static final EntityTexture book = new EntityTexture(); // [1.10] Bone, magma, nether wart block, red nether brick. - public static final Texture boneSide = new Texture(); - public static final Texture boneTop = new Texture(); - public static final Texture magma = new Texture(); - public static final Texture netherWartBlock = new Texture(); - public static final Texture redNetherBrick = new Texture(); + public static final BitmapTexture boneSide = new BitmapTexture(); + public static final BitmapTexture boneTop = new BitmapTexture(); + public static final BitmapTexture magma = new BitmapTexture(); + public static final BitmapTexture netherWartBlock = new BitmapTexture(); + public static final BitmapTexture redNetherBrick = new BitmapTexture(); // [1.12] Glazed Terracotta: - public static final Texture terracottaBlack = new Texture(); - public static final Texture terracottaBlue = new Texture(); - public static final Texture terracottaBrown = new Texture(); - public static final Texture terracottaCyan = new Texture(); - public static final Texture terracottaGray = new Texture(); - public static final Texture terracottaGreen = new Texture(); - public static final Texture terracottaLightBlue = new Texture(); - public static final Texture terracottaLime = new Texture(); - public static final Texture terracottaMagenta = new Texture(); - public static final Texture terracottaOrange = new Texture(); - public static final Texture terracottaPink = new Texture(); - public static final Texture terracottaPurple = new Texture(); - public static final Texture terracottaRed = new Texture(); - public static final Texture terracottaSilver = new Texture(); - public static final Texture terracottaWhite = new Texture(); - public static final Texture terracottaYellow = new Texture(); + public static final BitmapTexture terracottaBlack = new BitmapTexture(); + public static final BitmapTexture terracottaBlue = new BitmapTexture(); + public static final BitmapTexture terracottaBrown = new BitmapTexture(); + public static final BitmapTexture terracottaCyan = new BitmapTexture(); + public static final BitmapTexture terracottaGray = new BitmapTexture(); + public static final BitmapTexture terracottaGreen = new BitmapTexture(); + public static final BitmapTexture terracottaLightBlue = new BitmapTexture(); + public static final BitmapTexture terracottaLime = new BitmapTexture(); + public static final BitmapTexture terracottaMagenta = new BitmapTexture(); + public static final BitmapTexture terracottaOrange = new BitmapTexture(); + public static final BitmapTexture terracottaPink = new BitmapTexture(); + public static final BitmapTexture terracottaPurple = new BitmapTexture(); + public static final BitmapTexture terracottaRed = new BitmapTexture(); + public static final BitmapTexture terracottaSilver = new BitmapTexture(); + public static final BitmapTexture terracottaWhite = new BitmapTexture(); + public static final BitmapTexture terracottaYellow = new BitmapTexture(); // [1.12] Concrete: - public static final Texture concreteBlack = new Texture(); - public static final Texture concreteBlue = new Texture(); - public static final Texture concreteBrown = new Texture(); - public static final Texture concreteCyan = new Texture(); - public static final Texture concreteGray = new Texture(); - public static final Texture concreteGreen = new Texture(); - public static final Texture concreteLightBlue = new Texture(); - public static final Texture concreteLime = new Texture(); - public static final Texture concreteMagenta = new Texture(); - public static final Texture concreteOrange = new Texture(); - public static final Texture concretePink = new Texture(); - public static final Texture concretePurple = new Texture(); - public static final Texture concreteRed = new Texture(); - public static final Texture concreteSilver = new Texture(); - public static final Texture concreteWhite = new Texture(); - public static final Texture concreteYellow = new Texture(); - - public static final Texture concretePowderBlack = new Texture(); - public static final Texture concretePowderBlue = new Texture(); - public static final Texture concretePowderBrown = new Texture(); - public static final Texture concretePowderCyan = new Texture(); - public static final Texture concretePowderGray = new Texture(); - public static final Texture concretePowderGreen = new Texture(); - public static final Texture concretePowderLightBlue = new Texture(); - public static final Texture concretePowderLime = new Texture(); - public static final Texture concretePowderMagenta = new Texture(); - public static final Texture concretePowderOrange = new Texture(); - public static final Texture concretePowderPink = new Texture(); - public static final Texture concretePowderPurple = new Texture(); - public static final Texture concretePowderRed = new Texture(); - public static final Texture concretePowderSilver = new Texture(); - public static final Texture concretePowderWhite = new Texture(); - public static final Texture concretePowderYellow = new Texture(); + public static final BitmapTexture concreteBlack = new BitmapTexture(); + public static final BitmapTexture concreteBlue = new BitmapTexture(); + public static final BitmapTexture concreteBrown = new BitmapTexture(); + public static final BitmapTexture concreteCyan = new BitmapTexture(); + public static final BitmapTexture concreteGray = new BitmapTexture(); + public static final BitmapTexture concreteGreen = new BitmapTexture(); + public static final BitmapTexture concreteLightBlue = new BitmapTexture(); + public static final BitmapTexture concreteLime = new BitmapTexture(); + public static final BitmapTexture concreteMagenta = new BitmapTexture(); + public static final BitmapTexture concreteOrange = new BitmapTexture(); + public static final BitmapTexture concretePink = new BitmapTexture(); + public static final BitmapTexture concretePurple = new BitmapTexture(); + public static final BitmapTexture concreteRed = new BitmapTexture(); + public static final BitmapTexture concreteSilver = new BitmapTexture(); + public static final BitmapTexture concreteWhite = new BitmapTexture(); + public static final BitmapTexture concreteYellow = new BitmapTexture(); + + public static final BitmapTexture concretePowderBlack = new BitmapTexture(); + public static final BitmapTexture concretePowderBlue = new BitmapTexture(); + public static final BitmapTexture concretePowderBrown = new BitmapTexture(); + public static final BitmapTexture concretePowderCyan = new BitmapTexture(); + public static final BitmapTexture concretePowderGray = new BitmapTexture(); + public static final BitmapTexture concretePowderGreen = new BitmapTexture(); + public static final BitmapTexture concretePowderLightBlue = new BitmapTexture(); + public static final BitmapTexture concretePowderLime = new BitmapTexture(); + public static final BitmapTexture concretePowderMagenta = new BitmapTexture(); + public static final BitmapTexture concretePowderOrange = new BitmapTexture(); + public static final BitmapTexture concretePowderPink = new BitmapTexture(); + public static final BitmapTexture concretePowderPurple = new BitmapTexture(); + public static final BitmapTexture concretePowderRed = new BitmapTexture(); + public static final BitmapTexture concretePowderSilver = new BitmapTexture(); + public static final BitmapTexture concretePowderWhite = new BitmapTexture(); + public static final BitmapTexture concretePowderYellow = new BitmapTexture(); // [1.12] Beetroots: - public static final Texture beets0 = new Texture(); - public static final Texture beets1 = new Texture(); - public static final Texture beets2 = new Texture(); - public static final Texture beets3 = new Texture(); + public static final BitmapTexture beets0 = new BitmapTexture(); + public static final BitmapTexture beets1 = new BitmapTexture(); + public static final BitmapTexture beets2 = new BitmapTexture(); + public static final BitmapTexture beets3 = new BitmapTexture(); /** * Missing or unknown texture. */ - public static final Texture unknown = new Texture("unknown"); + public static final BitmapTexture unknown = new BitmapTexture("unknown"); - public static final Texture oakSignPost = new Texture(); - public static final Texture packedIce = new Texture(); - public static final Texture redSand = new Texture(); + public static final BitmapTexture oakSignPost = new BitmapTexture(); + public static final BitmapTexture packedIce = new BitmapTexture(); + public static final BitmapTexture redSand = new BitmapTexture(); // Tree variants. - public static final Texture oakWoodTop = new Texture("wood-top"); - public static final Texture spruceWoodTop = new Texture("wood-top"); - public static final Texture birchWoodTop = new Texture("wood-top"); - public static final Texture jungleTreeTop = new Texture("wood-top"); - public static final Texture acaciaWoodTop = new Texture("wood-top"); - public static final Texture darkOakWoodTop = new Texture("wood-top"); - - public static final Texture oakLeaves = new Texture("leaves"); - public static final Texture spruceLeaves = new Texture("leaves"); - public static final Texture birchLeaves = new Texture("leaves"); - public static final Texture jungleTreeLeaves = new Texture("leaves"); - public static final Texture acaciaLeaves = new Texture("leaves"); - public static final Texture darkOakLeaves = new Texture("leaves"); - - public static final Texture oakSapling = new Texture("sapling"); - public static final Texture spruceSapling = new Texture("sapling"); - public static final Texture birchSapling = new Texture("sapling"); - public static final Texture jungleSapling = new Texture("sapling"); - public static final Texture acaciaSapling = new Texture("sapling"); - public static final Texture darkOakSapling = new Texture("sapling"); - - public static final Texture oakPlanks = new Texture("wooden-planks"); - public static final Texture sprucePlanks = new Texture("wooden-planks"); - public static final Texture birchPlanks = new Texture("wooden-planks"); - public static final Texture jungleTreePlanks = new Texture("wooden-planks"); - public static final Texture acaciaPlanks = new Texture("wooden-planks"); - public static final Texture darkOakPlanks = new Texture("wooden-planks"); - - public static final Texture oakWood = new Texture("wood"); - public static final Texture spruceWood = new Texture("wood"); - public static final Texture birchWood = new Texture("wood"); - public static final Texture jungleWood = new Texture("wood"); - public static final Texture acaciaWood = new Texture("wood"); - public static final Texture darkOakWood = new Texture("wood"); - - public static final Texture frostedIce0 = new Texture(); - public static final Texture frostedIce1 = new Texture(); - public static final Texture frostedIce2 = new Texture(); - public static final Texture frostedIce3 = new Texture(); - - public static final Texture spruceDoorTop = new Texture(); - public static final Texture birchDoorTop = new Texture(); - public static final Texture jungleDoorTop = new Texture(); - public static final Texture acaciaDoorTop = new Texture(); - public static final Texture darkOakDoorTop = new Texture(); - - public static final Texture spruceDoorBottom = new Texture(); - public static final Texture birchDoorBottom = new Texture(); - public static final Texture jungleDoorBottom = new Texture(); - public static final Texture acaciaDoorBottom = new Texture(); - public static final Texture darkOakDoorBottom = new Texture(); - - public static final Texture strippedOakLog = new Texture(); - public static final Texture strippedOakLogTop = new Texture(); - - public static final Texture strippedDarkOakLog = new Texture(); - public static final Texture strippedDarkOakLogTop = new Texture(); - - public static final Texture strippedSpruceLog = new Texture(); - public static final Texture strippedSpruceLogTop = new Texture(); - - public static final Texture strippedBirchLog = new Texture(); - public static final Texture strippedBirchLogTop = new Texture(); - - public static final Texture strippedJungleLog = new Texture(); - public static final Texture strippedJungleLogTop = new Texture(); - - public static final Texture strippedAcaciaLog = new Texture(); - public static final Texture strippedAcaciaLogTop = new Texture(); - - public static final Texture bedWhite = new Texture(); - public static final Texture bedOrange = new Texture(); - public static final Texture bedMagenta = new Texture(); - public static final Texture bedLightBlue = new Texture(); - public static final Texture bedYellow = new Texture(); - public static final Texture bedLime = new Texture(); - public static final Texture bedPink = new Texture(); - public static final Texture bedGray = new Texture(); - public static final Texture bedSilver = new Texture(); - public static final Texture bedCyan = new Texture(); - public static final Texture bedPurple = new Texture(); - public static final Texture bedBlue = new Texture(); - public static final Texture bedBrown = new Texture(); - public static final Texture bedGreen = new Texture(); - public static final Texture bedRed = new Texture(); - public static final Texture bedBlack = new Texture(); + public static final BitmapTexture oakWoodTop = new BitmapTexture("wood-top"); + public static final BitmapTexture spruceWoodTop = new BitmapTexture("wood-top"); + public static final BitmapTexture birchWoodTop = new BitmapTexture("wood-top"); + public static final BitmapTexture jungleTreeTop = new BitmapTexture("wood-top"); + public static final BitmapTexture acaciaWoodTop = new BitmapTexture("wood-top"); + public static final BitmapTexture darkOakWoodTop = new BitmapTexture("wood-top"); + + public static final BitmapTexture oakLeaves = new BitmapTexture("leaves"); + public static final BitmapTexture spruceLeaves = new BitmapTexture("leaves"); + public static final BitmapTexture birchLeaves = new BitmapTexture("leaves"); + public static final BitmapTexture jungleTreeLeaves = new BitmapTexture("leaves"); + public static final BitmapTexture acaciaLeaves = new BitmapTexture("leaves"); + public static final BitmapTexture darkOakLeaves = new BitmapTexture("leaves"); + + public static final BitmapTexture oakSapling = new BitmapTexture("sapling"); + public static final BitmapTexture spruceSapling = new BitmapTexture("sapling"); + public static final BitmapTexture birchSapling = new BitmapTexture("sapling"); + public static final BitmapTexture jungleSapling = new BitmapTexture("sapling"); + public static final BitmapTexture acaciaSapling = new BitmapTexture("sapling"); + public static final BitmapTexture darkOakSapling = new BitmapTexture("sapling"); + + public static final BitmapTexture oakPlanks = new BitmapTexture("wooden-planks"); + public static final BitmapTexture sprucePlanks = new BitmapTexture("wooden-planks"); + public static final BitmapTexture birchPlanks = new BitmapTexture("wooden-planks"); + public static final BitmapTexture jungleTreePlanks = new BitmapTexture("wooden-planks"); + public static final BitmapTexture acaciaPlanks = new BitmapTexture("wooden-planks"); + public static final BitmapTexture darkOakPlanks = new BitmapTexture("wooden-planks"); + + public static final BitmapTexture oakWood = new BitmapTexture("wood"); + public static final BitmapTexture spruceWood = new BitmapTexture("wood"); + public static final BitmapTexture birchWood = new BitmapTexture("wood"); + public static final BitmapTexture jungleWood = new BitmapTexture("wood"); + public static final BitmapTexture acaciaWood = new BitmapTexture("wood"); + public static final BitmapTexture darkOakWood = new BitmapTexture("wood"); + + public static final BitmapTexture frostedIce0 = new BitmapTexture(); + public static final BitmapTexture frostedIce1 = new BitmapTexture(); + public static final BitmapTexture frostedIce2 = new BitmapTexture(); + public static final BitmapTexture frostedIce3 = new BitmapTexture(); + + public static final BitmapTexture spruceDoorTop = new BitmapTexture(); + public static final BitmapTexture birchDoorTop = new BitmapTexture(); + public static final BitmapTexture jungleDoorTop = new BitmapTexture(); + public static final BitmapTexture acaciaDoorTop = new BitmapTexture(); + public static final BitmapTexture darkOakDoorTop = new BitmapTexture(); + + public static final BitmapTexture spruceDoorBottom = new BitmapTexture(); + public static final BitmapTexture birchDoorBottom = new BitmapTexture(); + public static final BitmapTexture jungleDoorBottom = new BitmapTexture(); + public static final BitmapTexture acaciaDoorBottom = new BitmapTexture(); + public static final BitmapTexture darkOakDoorBottom = new BitmapTexture(); + + public static final BitmapTexture strippedOakLog = new BitmapTexture(); + public static final BitmapTexture strippedOakLogTop = new BitmapTexture(); + + public static final BitmapTexture strippedDarkOakLog = new BitmapTexture(); + public static final BitmapTexture strippedDarkOakLogTop = new BitmapTexture(); + + public static final BitmapTexture strippedSpruceLog = new BitmapTexture(); + public static final BitmapTexture strippedSpruceLogTop = new BitmapTexture(); + + public static final BitmapTexture strippedBirchLog = new BitmapTexture(); + public static final BitmapTexture strippedBirchLogTop = new BitmapTexture(); + + public static final BitmapTexture strippedJungleLog = new BitmapTexture(); + public static final BitmapTexture strippedJungleLogTop = new BitmapTexture(); + + public static final BitmapTexture strippedAcaciaLog = new BitmapTexture(); + public static final BitmapTexture strippedAcaciaLogTop = new BitmapTexture(); + + public static final BitmapTexture bedWhite = new BitmapTexture(); + public static final BitmapTexture bedOrange = new BitmapTexture(); + public static final BitmapTexture bedMagenta = new BitmapTexture(); + public static final BitmapTexture bedLightBlue = new BitmapTexture(); + public static final BitmapTexture bedYellow = new BitmapTexture(); + public static final BitmapTexture bedLime = new BitmapTexture(); + public static final BitmapTexture bedPink = new BitmapTexture(); + public static final BitmapTexture bedGray = new BitmapTexture(); + public static final BitmapTexture bedSilver = new BitmapTexture(); + public static final BitmapTexture bedCyan = new BitmapTexture(); + public static final BitmapTexture bedPurple = new BitmapTexture(); + public static final BitmapTexture bedBlue = new BitmapTexture(); + public static final BitmapTexture bedBrown = new BitmapTexture(); + public static final BitmapTexture bedGreen = new BitmapTexture(); + public static final BitmapTexture bedRed = new BitmapTexture(); + public static final BitmapTexture bedBlack = new BitmapTexture(); // [1.13] - public static final Texture kelp = new Texture(); - public static final Texture kelpPlant = new Texture(); - public static final Texture seagrass = new Texture(); - public static final Texture tallSeagrassTop = new Texture(); - public static final Texture tallSeagrassBottom = new Texture(); - - public static final Texture driedKelpSide = new Texture(); - public static final Texture driedKelpTop = new Texture(); - public static final Texture driedKelpBottom = new Texture(); - - public static final Texture tubeCoral = new Texture(); - public static final Texture brainCoral = new Texture(); - public static final Texture bubbleCoral = new Texture(); - public static final Texture fireCoral = new Texture(); - public static final Texture hornCoral = new Texture(); - - public static final Texture tubeCoralBlock = new Texture(); - public static final Texture brainCoralBlock = new Texture(); - public static final Texture bubbleCoralBlock = new Texture(); - public static final Texture fireCoralBlock = new Texture(); - public static final Texture hornCoralBlock = new Texture(); - - public static final Texture deadTubeCoralBlock = new Texture(); - public static final Texture deadBrainCoralBlock = new Texture(); - public static final Texture deadBubbleCoralBlock = new Texture(); - public static final Texture deadFireCoralBlock = new Texture(); - public static final Texture deadHornCoralBlock = new Texture(); - - public static final Texture tubeCoralFan = new Texture(); - public static final Texture brainCoralFan = new Texture(); - public static final Texture bubbleCoralFan = new Texture(); - public static final Texture fireCoralFan = new Texture(); - public static final Texture hornCoralFan = new Texture(); - - public static final Texture deadTubeCoral = new Texture(); - public static final Texture deadBrainCoral = new Texture(); - public static final Texture deadBubbleCoral = new Texture(); - public static final Texture deadFireCoral = new Texture(); - public static final Texture deadHornCoral = new Texture(); - - public static final Texture deadTubeCoralFan = new Texture(); - public static final Texture deadBrainCoralFan = new Texture(); - public static final Texture deadBubbleCoralFan = new Texture(); - public static final Texture deadFireCoralFan = new Texture(); - public static final Texture deadHornCoralFan = new Texture(); - - public static final Texture turtleEgg = new Texture(); - public static final Texture turtleEggSlightlyCracked = new Texture(); - public static final Texture turtleEggVeryCracked = new Texture(); - - public static final Texture blueIce = new Texture(); - public static final Texture seaPickle = new Texture(); - public static final Texture conduit = new Texture(); - public static final Texture structureBlock = new Texture(); - public static final Texture structureBlockCorner = new Texture(); - public static final Texture structureBlockData = new Texture(); - public static final Texture structureBlockLoad = new Texture(); - public static final Texture structureBlockSave = new Texture(); + public static final BitmapTexture kelp = new BitmapTexture(); + public static final BitmapTexture kelpPlant = new BitmapTexture(); + public static final BitmapTexture seagrass = new BitmapTexture(); + public static final BitmapTexture tallSeagrassTop = new BitmapTexture(); + public static final BitmapTexture tallSeagrassBottom = new BitmapTexture(); + + public static final BitmapTexture driedKelpSide = new BitmapTexture(); + public static final BitmapTexture driedKelpTop = new BitmapTexture(); + public static final BitmapTexture driedKelpBottom = new BitmapTexture(); + + public static final BitmapTexture tubeCoral = new BitmapTexture(); + public static final BitmapTexture brainCoral = new BitmapTexture(); + public static final BitmapTexture bubbleCoral = new BitmapTexture(); + public static final BitmapTexture fireCoral = new BitmapTexture(); + public static final BitmapTexture hornCoral = new BitmapTexture(); + + public static final BitmapTexture tubeCoralBlock = new BitmapTexture(); + public static final BitmapTexture brainCoralBlock = new BitmapTexture(); + public static final BitmapTexture bubbleCoralBlock = new BitmapTexture(); + public static final BitmapTexture fireCoralBlock = new BitmapTexture(); + public static final BitmapTexture hornCoralBlock = new BitmapTexture(); + + public static final BitmapTexture deadTubeCoralBlock = new BitmapTexture(); + public static final BitmapTexture deadBrainCoralBlock = new BitmapTexture(); + public static final BitmapTexture deadBubbleCoralBlock = new BitmapTexture(); + public static final BitmapTexture deadFireCoralBlock = new BitmapTexture(); + public static final BitmapTexture deadHornCoralBlock = new BitmapTexture(); + + public static final BitmapTexture tubeCoralFan = new BitmapTexture(); + public static final BitmapTexture brainCoralFan = new BitmapTexture(); + public static final BitmapTexture bubbleCoralFan = new BitmapTexture(); + public static final BitmapTexture fireCoralFan = new BitmapTexture(); + public static final BitmapTexture hornCoralFan = new BitmapTexture(); + + public static final BitmapTexture deadTubeCoral = new BitmapTexture(); + public static final BitmapTexture deadBrainCoral = new BitmapTexture(); + public static final BitmapTexture deadBubbleCoral = new BitmapTexture(); + public static final BitmapTexture deadFireCoral = new BitmapTexture(); + public static final BitmapTexture deadHornCoral = new BitmapTexture(); + + public static final BitmapTexture deadTubeCoralFan = new BitmapTexture(); + public static final BitmapTexture deadBrainCoralFan = new BitmapTexture(); + public static final BitmapTexture deadBubbleCoralFan = new BitmapTexture(); + public static final BitmapTexture deadFireCoralFan = new BitmapTexture(); + public static final BitmapTexture deadHornCoralFan = new BitmapTexture(); + + public static final BitmapTexture turtleEgg = new BitmapTexture(); + public static final BitmapTexture turtleEggSlightlyCracked = new BitmapTexture(); + public static final BitmapTexture turtleEggVeryCracked = new BitmapTexture(); + + public static final BitmapTexture blueIce = new BitmapTexture(); + public static final BitmapTexture seaPickle = new BitmapTexture(); + public static final BitmapTexture conduit = new BitmapTexture(); + public static final BitmapTexture structureBlock = new BitmapTexture(); + public static final BitmapTexture structureBlockCorner = new BitmapTexture(); + public static final BitmapTexture structureBlockData = new BitmapTexture(); + public static final BitmapTexture structureBlockLoad = new BitmapTexture(); + public static final BitmapTexture structureBlockSave = new BitmapTexture(); // [1.14] - public static final Texture barrelTop = new Texture(); - public static final Texture barrelOpen = new Texture(); - public static final Texture barrelSide = new Texture(); - public static final Texture barrelBottom = new Texture(); - public static final Texture loomBottom = new Texture(); - public static final Texture loomFront = new Texture(); - public static final Texture loomSide = new Texture(); - public static final Texture loomTop = new Texture(); - public static final Texture acaciaSignPost = new Texture(); - public static final Texture birchSignPost = new Texture(); - public static final Texture darkOakSignPost = new Texture(); - public static final Texture jungleSignPost = new Texture(); - public static final Texture spruceSignPost = new Texture(); - public static final Texture cartographyTableSide1 = new Texture(); - public static final Texture cartographyTableSide2 = new Texture(); - public static final Texture cartographyTableSide3 = new Texture(); - public static final Texture cartographyTableTop = new Texture(); - public static final Texture fletchingTableFront = new Texture(); - public static final Texture fletchingTableSide = new Texture(); - public static final Texture fletchingTableTop = new Texture(); - public static final Texture smithingTableFront = new Texture(); - public static final Texture smithingTableSide = new Texture(); - public static final Texture smithingTableTop = new Texture(); - public static final Texture smithingTableBottom = new Texture(); - public static final Texture blastFurnaceTop = new Texture(); - public static final Texture blastFurnaceSide = new Texture(); - public static final Texture blastFurnaceFrontOn = new Texture(); - public static final Texture blastFurnaceFront = new Texture(); - public static final Texture smokerTop = new Texture(); - public static final Texture smokerSide = new Texture(); - public static final Texture smokerBottom = new Texture(); - public static final Texture smokerFrontOn = new Texture(); - public static final Texture smokerFront = new Texture(); - public static final Texture sweetBerryBushStage0 = new Texture(); - public static final Texture sweetBerryBushStage1 = new Texture(); - public static final Texture sweetBerryBushStage2 = new Texture(); - public static final Texture sweetBerryBushStage3 = new Texture(); - public static final Texture cornflower = new Texture(); - public static final Texture lilyOfTheValley = new Texture(); - public static final Texture witherRose = new Texture(); - public static final Texture bambooSapling = new Texture(); - public static final Texture lecternBase = new Texture(); - public static final Texture lecternFront = new Texture(); - public static final Texture lecternSides = new Texture(); - public static final Texture lecternTop = new Texture(); - public static final Texture composterTop = new Texture(); - public static final Texture composterBottom = new Texture(); - public static final Texture composterSide = new Texture(); - public static final Texture composterCompost = new Texture(); - public static final Texture composterReady = new Texture(); - public static final Texture bambooStalk = new Texture(); - public static final Texture bambooSmallLeaves = new Texture(); - public static final Texture bambooLargeLeaves = new Texture(); - public static final Texture bambooSingleLeaf = new Texture(); - public static final Texture stonecutterBottom = new Texture(); - public static final Texture stonecutterTop = new Texture(); - public static final Texture stonecutterSide = new Texture(); - public static final Texture stonecutterSaw = new Texture(); - public static final Texture grindstonePivot = new Texture(); - public static final Texture grindstoneRound = new Texture(); - public static final Texture grindstoneSide = new Texture(); - public static final Texture campfireLog = new Texture(); - public static final Texture campfireLogLit = new Texture(); - public static final Texture campfireFire = new Texture(); - public static final Texture lantern = new Texture(); - public static final Texture bellBody = new Texture(); - public static final Texture scaffoldingTop = new Texture(); - public static final Texture scaffoldingSide = new Texture(); - public static final Texture scaffoldingBottom = new Texture(); - public static final Texture jigsawTop = new Texture(); - public static final Texture jigsawSide = new Texture(); - public static final Texture jigsawBottom = new Texture(); + public static final BitmapTexture barrelTop = new BitmapTexture(); + public static final BitmapTexture barrelOpen = new BitmapTexture(); + public static final BitmapTexture barrelSide = new BitmapTexture(); + public static final BitmapTexture barrelBottom = new BitmapTexture(); + public static final BitmapTexture loomBottom = new BitmapTexture(); + public static final BitmapTexture loomFront = new BitmapTexture(); + public static final BitmapTexture loomSide = new BitmapTexture(); + public static final BitmapTexture loomTop = new BitmapTexture(); + public static final BitmapTexture acaciaSignPost = new BitmapTexture(); + public static final BitmapTexture birchSignPost = new BitmapTexture(); + public static final BitmapTexture darkOakSignPost = new BitmapTexture(); + public static final BitmapTexture jungleSignPost = new BitmapTexture(); + public static final BitmapTexture spruceSignPost = new BitmapTexture(); + public static final BitmapTexture cartographyTableSide1 = new BitmapTexture(); + public static final BitmapTexture cartographyTableSide2 = new BitmapTexture(); + public static final BitmapTexture cartographyTableSide3 = new BitmapTexture(); + public static final BitmapTexture cartographyTableTop = new BitmapTexture(); + public static final BitmapTexture fletchingTableFront = new BitmapTexture(); + public static final BitmapTexture fletchingTableSide = new BitmapTexture(); + public static final BitmapTexture fletchingTableTop = new BitmapTexture(); + public static final BitmapTexture smithingTableFront = new BitmapTexture(); + public static final BitmapTexture smithingTableSide = new BitmapTexture(); + public static final BitmapTexture smithingTableTop = new BitmapTexture(); + public static final BitmapTexture smithingTableBottom = new BitmapTexture(); + public static final BitmapTexture blastFurnaceTop = new BitmapTexture(); + public static final BitmapTexture blastFurnaceSide = new BitmapTexture(); + public static final BitmapTexture blastFurnaceFrontOn = new BitmapTexture(); + public static final BitmapTexture blastFurnaceFront = new BitmapTexture(); + public static final BitmapTexture smokerTop = new BitmapTexture(); + public static final BitmapTexture smokerSide = new BitmapTexture(); + public static final BitmapTexture smokerBottom = new BitmapTexture(); + public static final BitmapTexture smokerFrontOn = new BitmapTexture(); + public static final BitmapTexture smokerFront = new BitmapTexture(); + public static final BitmapTexture sweetBerryBushStage0 = new BitmapTexture(); + public static final BitmapTexture sweetBerryBushStage1 = new BitmapTexture(); + public static final BitmapTexture sweetBerryBushStage2 = new BitmapTexture(); + public static final BitmapTexture sweetBerryBushStage3 = new BitmapTexture(); + public static final BitmapTexture cornflower = new BitmapTexture(); + public static final BitmapTexture lilyOfTheValley = new BitmapTexture(); + public static final BitmapTexture witherRose = new BitmapTexture(); + public static final BitmapTexture bambooSapling = new BitmapTexture(); + public static final BitmapTexture lecternBase = new BitmapTexture(); + public static final BitmapTexture lecternFront = new BitmapTexture(); + public static final BitmapTexture lecternSides = new BitmapTexture(); + public static final BitmapTexture lecternTop = new BitmapTexture(); + public static final BitmapTexture composterTop = new BitmapTexture(); + public static final BitmapTexture composterBottom = new BitmapTexture(); + public static final BitmapTexture composterSide = new BitmapTexture(); + public static final BitmapTexture composterCompost = new BitmapTexture(); + public static final BitmapTexture composterReady = new BitmapTexture(); + public static final BitmapTexture bambooStalk = new BitmapTexture(); + public static final BitmapTexture bambooSmallLeaves = new BitmapTexture(); + public static final BitmapTexture bambooLargeLeaves = new BitmapTexture(); + public static final BitmapTexture bambooSingleLeaf = new BitmapTexture(); + public static final BitmapTexture stonecutterBottom = new BitmapTexture(); + public static final BitmapTexture stonecutterTop = new BitmapTexture(); + public static final BitmapTexture stonecutterSide = new BitmapTexture(); + public static final BitmapTexture stonecutterSaw = new BitmapTexture(); + public static final BitmapTexture grindstonePivot = new BitmapTexture(); + public static final BitmapTexture grindstoneRound = new BitmapTexture(); + public static final BitmapTexture grindstoneSide = new BitmapTexture(); + public static final BitmapTexture campfireLog = new BitmapTexture(); + public static final BitmapTexture campfireLogLit = new BitmapTexture(); + public static final BitmapTexture campfireFire = new BitmapTexture(); + public static final BitmapTexture lantern = new BitmapTexture(); + public static final BitmapTexture bellBody = new BitmapTexture(); + public static final BitmapTexture scaffoldingTop = new BitmapTexture(); + public static final BitmapTexture scaffoldingSide = new BitmapTexture(); + public static final BitmapTexture scaffoldingBottom = new BitmapTexture(); + public static final BitmapTexture jigsawTop = new BitmapTexture(); + public static final BitmapTexture jigsawSide = new BitmapTexture(); + public static final BitmapTexture jigsawBottom = new BitmapTexture(); // [1.15] - public static final Texture honeyBlockTop = new Texture(); - public static final Texture honeyBlockSide = new Texture(); - public static final Texture honeyBlockBottom = new Texture(); - public static final Texture beeNestFront = new Texture(); - public static final Texture beeNestFrontHoney = new Texture(); - public static final Texture beeNestSide = new Texture(); - public static final Texture beeNestTop = new Texture(); - public static final Texture beeNestBottom = new Texture(); - public static final Texture beehiveFront = new Texture(); - public static final Texture beehiveFrontHoney = new Texture(); - public static final Texture beehiveSide = new Texture(); - public static final Texture beehiveEnd = new Texture(); - public static final Texture honeycombBlock = new Texture(); + public static final BitmapTexture honeyBlockTop = new BitmapTexture(); + public static final BitmapTexture honeyBlockSide = new BitmapTexture(); + public static final BitmapTexture honeyBlockBottom = new BitmapTexture(); + public static final BitmapTexture beeNestFront = new BitmapTexture(); + public static final BitmapTexture beeNestFrontHoney = new BitmapTexture(); + public static final BitmapTexture beeNestSide = new BitmapTexture(); + public static final BitmapTexture beeNestTop = new BitmapTexture(); + public static final BitmapTexture beeNestBottom = new BitmapTexture(); + public static final BitmapTexture beehiveFront = new BitmapTexture(); + public static final BitmapTexture beehiveFrontHoney = new BitmapTexture(); + public static final BitmapTexture beehiveSide = new BitmapTexture(); + public static final BitmapTexture beehiveEnd = new BitmapTexture(); + public static final BitmapTexture honeycombBlock = new BitmapTexture(); // [1.16] - public static final Texture soulSoil = new Texture(); - public static final Texture crimsonNylium = new Texture(); - public static final Texture crimsonNyliumSide = new Texture(); - public static final Texture warpedNylium = new Texture(); - public static final Texture warpedNyliumSide = new Texture(); - public static final Texture netherGoldOre = new Texture(); - public static final Texture targetSide = new Texture(); - public static final Texture targetTop = new Texture(); - public static final Texture netheriteBlock = new Texture(); - public static final Texture shroomlight = new Texture(); - public static final Texture warpedWartBlock = new Texture(); - public static final Texture basaltSide = new Texture(); - public static final Texture basaltTop = new Texture(); - public static final Texture polishedBasaltSide = new Texture(); - public static final Texture polishedBasaltTop = new Texture(); - public static final Texture ancientDebrisSide = new Texture(); - public static final Texture ancientDebrisTop = new Texture(); - public static final Texture warpedFungus = new Texture(); - public static final Texture crimsonFungus = new Texture(); - public static final Texture netherSprouts = new Texture(); - public static final Texture warpedRoots = new Texture(); - public static final Texture crimsonRoots = new Texture(); - public static final Texture warpedRootsPot = new Texture(); - public static final Texture crimsonRootsPot = new Texture(); - public static final Texture cryingObsidian = new Texture(); - public static final Texture warpedStem = new Texture(); - public static final Texture warpedStemTop = new Texture(); - public static final Texture strippedWarpedStem = new Texture(); - public static final Texture strippedWarpedStemTop = new Texture(); - public static final Texture crimsonStem = new Texture(); - public static final Texture crimsonStemTop = new Texture(); - public static final Texture strippedCrimsonStem = new Texture(); - public static final Texture strippedCrimsonStemTop = new Texture(); - public static final Texture soulFireLantern = new Texture(); - public static final Texture twistingVines = new Texture(); - public static final Texture twistingVinesPlant = new Texture(); - public static final Texture weepingVines = new Texture(); - public static final Texture weepingVinesPlant = new Texture(); - public static final Texture soulFireTorch = new Texture(); - public static final Texture respawnAnchorTop = new Texture(); - public static final Texture respawnAnchorBottom = new Texture(); - public static final Texture respawnAnchorSide0 = new Texture(); - public static final Texture respawnAnchorSide1 = new Texture(); - public static final Texture respawnAnchorSide2 = new Texture(); - public static final Texture respawnAnchorSide3 = new Texture(); - public static final Texture respawnAnchorSide4 = new Texture(); - public static final Texture crimsonSignPost = new Texture(); - public static final Texture warpedSignPost = new Texture(); - public static final Texture crimsonPlanks = new Texture(); - public static final Texture warpedPlanks = new Texture(); - public static final Texture crimsonDoorTop = new Texture(); - public static final Texture crimsonDoorBottom = new Texture(); - public static final Texture warpedDoorTop = new Texture(); - public static final Texture warpedDoorBottom = new Texture(); - public static final Texture crimsonTrapdoor = new Texture(); - public static final Texture warpedTrapdoor = new Texture(); - public static final Texture soulFire = new Texture(); + public static final BitmapTexture soulSoil = new BitmapTexture(); + public static final BitmapTexture crimsonNylium = new BitmapTexture(); + public static final BitmapTexture crimsonNyliumSide = new BitmapTexture(); + public static final BitmapTexture warpedNylium = new BitmapTexture(); + public static final BitmapTexture warpedNyliumSide = new BitmapTexture(); + public static final BitmapTexture netherGoldOre = new BitmapTexture(); + public static final BitmapTexture targetSide = new BitmapTexture(); + public static final BitmapTexture targetTop = new BitmapTexture(); + public static final BitmapTexture netheriteBlock = new BitmapTexture(); + public static final BitmapTexture shroomlight = new BitmapTexture(); + public static final BitmapTexture warpedWartBlock = new BitmapTexture(); + public static final BitmapTexture basaltSide = new BitmapTexture(); + public static final BitmapTexture basaltTop = new BitmapTexture(); + public static final BitmapTexture polishedBasaltSide = new BitmapTexture(); + public static final BitmapTexture polishedBasaltTop = new BitmapTexture(); + public static final BitmapTexture ancientDebrisSide = new BitmapTexture(); + public static final BitmapTexture ancientDebrisTop = new BitmapTexture(); + public static final BitmapTexture warpedFungus = new BitmapTexture(); + public static final BitmapTexture crimsonFungus = new BitmapTexture(); + public static final BitmapTexture netherSprouts = new BitmapTexture(); + public static final BitmapTexture warpedRoots = new BitmapTexture(); + public static final BitmapTexture crimsonRoots = new BitmapTexture(); + public static final BitmapTexture warpedRootsPot = new BitmapTexture(); + public static final BitmapTexture crimsonRootsPot = new BitmapTexture(); + public static final BitmapTexture cryingObsidian = new BitmapTexture(); + public static final BitmapTexture warpedStem = new BitmapTexture(); + public static final BitmapTexture warpedStemTop = new BitmapTexture(); + public static final BitmapTexture strippedWarpedStem = new BitmapTexture(); + public static final BitmapTexture strippedWarpedStemTop = new BitmapTexture(); + public static final BitmapTexture crimsonStem = new BitmapTexture(); + public static final BitmapTexture crimsonStemTop = new BitmapTexture(); + public static final BitmapTexture strippedCrimsonStem = new BitmapTexture(); + public static final BitmapTexture strippedCrimsonStemTop = new BitmapTexture(); + public static final BitmapTexture soulFireLantern = new BitmapTexture(); + public static final BitmapTexture twistingVines = new BitmapTexture(); + public static final BitmapTexture twistingVinesPlant = new BitmapTexture(); + public static final BitmapTexture weepingVines = new BitmapTexture(); + public static final BitmapTexture weepingVinesPlant = new BitmapTexture(); + public static final BitmapTexture soulFireTorch = new BitmapTexture(); + public static final BitmapTexture respawnAnchorTop = new BitmapTexture(); + public static final BitmapTexture respawnAnchorBottom = new BitmapTexture(); + public static final BitmapTexture respawnAnchorSide0 = new BitmapTexture(); + public static final BitmapTexture respawnAnchorSide1 = new BitmapTexture(); + public static final BitmapTexture respawnAnchorSide2 = new BitmapTexture(); + public static final BitmapTexture respawnAnchorSide3 = new BitmapTexture(); + public static final BitmapTexture respawnAnchorSide4 = new BitmapTexture(); + public static final BitmapTexture crimsonSignPost = new BitmapTexture(); + public static final BitmapTexture warpedSignPost = new BitmapTexture(); + public static final BitmapTexture crimsonPlanks = new BitmapTexture(); + public static final BitmapTexture warpedPlanks = new BitmapTexture(); + public static final BitmapTexture crimsonDoorTop = new BitmapTexture(); + public static final BitmapTexture crimsonDoorBottom = new BitmapTexture(); + public static final BitmapTexture warpedDoorTop = new BitmapTexture(); + public static final BitmapTexture warpedDoorBottom = new BitmapTexture(); + public static final BitmapTexture crimsonTrapdoor = new BitmapTexture(); + public static final BitmapTexture warpedTrapdoor = new BitmapTexture(); + public static final BitmapTexture soulFire = new BitmapTexture(); public static final AnimatedTexture soulFireLayer0 = new AnimatedTexture(); public static final AnimatedTexture soulFireLayer1 = new AnimatedTexture(); - public static final Texture lodestoneSide = new Texture(); - public static final Texture lodestoneTop = new Texture(); - public static final Texture blackstone = new Texture(); - public static final Texture blackstoneTop = new Texture(); - public static final Texture chiseledNetherBricks = new Texture(); - public static final Texture crackedNetherBricks = new Texture(); - public static final Texture gildedBlackstone = new Texture(); - public static final Texture soulCampfireLogLit = new Texture(); - public static final Texture soulCampfireFire = new Texture(); - public static final Texture polishedBlackstone = new Texture(); - public static final Texture chiseledPolishedBlackstone = new Texture(); - public static final Texture polishedBlackstoneBricks = new Texture(); - public static final Texture crackedPolishedBlackstoneBricks = new Texture(); - public static final Texture quartzBricks = new Texture(); - public static final Texture chain = new Texture(); - public static final Texture jigsawLock = new Texture(); + public static final BitmapTexture lodestoneSide = new BitmapTexture(); + public static final BitmapTexture lodestoneTop = new BitmapTexture(); + public static final BitmapTexture blackstone = new BitmapTexture(); + public static final BitmapTexture blackstoneTop = new BitmapTexture(); + public static final BitmapTexture chiseledNetherBricks = new BitmapTexture(); + public static final BitmapTexture crackedNetherBricks = new BitmapTexture(); + public static final BitmapTexture gildedBlackstone = new BitmapTexture(); + public static final BitmapTexture soulCampfireLogLit = new BitmapTexture(); + public static final BitmapTexture soulCampfireFire = new BitmapTexture(); + public static final BitmapTexture polishedBlackstone = new BitmapTexture(); + public static final BitmapTexture chiseledPolishedBlackstone = new BitmapTexture(); + public static final BitmapTexture polishedBlackstoneBricks = new BitmapTexture(); + public static final BitmapTexture crackedPolishedBlackstoneBricks = new BitmapTexture(); + public static final BitmapTexture quartzBricks = new BitmapTexture(); + public static final BitmapTexture chain = new BitmapTexture(); + public static final BitmapTexture jigsawLock = new BitmapTexture(); // [1.17] - public static final Texture candle = new Texture(); - public static final Texture whiteCandle = new Texture(); - public static final Texture orangeCandle = new Texture(); - public static final Texture magentaCandle = new Texture(); - public static final Texture lightBlueCandle = new Texture(); - public static final Texture yellowCandle = new Texture(); - public static final Texture limeCandle = new Texture(); - public static final Texture pinkCandle = new Texture(); - public static final Texture grayCandle = new Texture(); - public static final Texture lightGrayCandle = new Texture(); - public static final Texture cyanCandle = new Texture(); - public static final Texture purpleCandle = new Texture(); - public static final Texture blueCandle = new Texture(); - public static final Texture brownCandle = new Texture(); - public static final Texture greenCandle = new Texture(); - public static final Texture redCandle = new Texture(); - public static final Texture blackCandle = new Texture(); - public static final Texture candleLit = new Texture(); - public static final Texture whiteCandleLit = new Texture(); - public static final Texture orangeCandleLit = new Texture(); - public static final Texture magentaCandleLit = new Texture(); - public static final Texture lightBlueCandleLit = new Texture(); - public static final Texture yellowCandleLit = new Texture(); - public static final Texture limeCandleLit = new Texture(); - public static final Texture pinkCandleLit = new Texture(); - public static final Texture grayCandleLit = new Texture(); - public static final Texture lightGrayCandleLit = new Texture(); - public static final Texture cyanCandleLit = new Texture(); - public static final Texture purpleCandleLit = new Texture(); - public static final Texture blueCandleLit = new Texture(); - public static final Texture brownCandleLit = new Texture(); - public static final Texture greenCandleLit = new Texture(); - public static final Texture redCandleLit = new Texture(); - public static final Texture blackCandleLit = new Texture(); - public static final Texture flameParticle = new Texture(); - public static final Texture copperOre = new Texture(); - public static final Texture calcite = new Texture(); - public static final Texture tuff = new Texture(); - public static final Texture amethyst = new Texture(); - public static final Texture buddingAmethyst = new Texture(); - public static final Texture copperBlock = new Texture(); - public static final Texture exposedCopper = new Texture(); - public static final Texture weatheredCopper = new Texture(); - public static final Texture oxidizedCopper = new Texture(); - public static final Texture cutCopper = new Texture(); - public static final Texture exposedCutCopper = new Texture(); - public static final Texture weatheredCutCopper = new Texture(); - public static final Texture oxidizedCutCopper = new Texture(); - public static final Texture lightningRod = new Texture(); - public static final Texture smallAmethystBud = new Texture(); - public static final Texture mediumAmethystBud = new Texture(); - public static final Texture largeAmethystBud = new Texture(); - public static final Texture amethystCluster = new Texture(); - public static final Texture tintedGlass = new Texture(); - public static final Texture powderSnow = new Texture(); - public static final Texture dripstoneBlock = new Texture(); - public static final Texture pointedDripstoneDownBase = new Texture(); - public static final Texture pointedDripstoneDownFrustum = new Texture(); - public static final Texture pointedDripstoneDownMiddle = new Texture(); - public static final Texture pointedDripstoneDownTip = new Texture(); - public static final Texture pointedDripstoneDownTipMerge = new Texture(); - public static final Texture pointedDripstoneUpBase = new Texture(); - public static final Texture pointedDripstoneUpFrustum = new Texture(); - public static final Texture pointedDripstoneUpMiddle = new Texture(); - public static final Texture pointedDripstoneUpTip = new Texture(); - public static final Texture pointedDripstoneUpTipMerge = new Texture(); - public static final Texture sculkSensorBottom = new Texture(); - public static final Texture sculkSensorSide = new Texture(); - public static final Texture sculkSensorTendrilActive = new Texture(); - public static final Texture sculkSensorTendrilInactive = new Texture(); - public static final Texture sculkSensorTop = new Texture(); - public static final Texture glowLichen = new Texture(); - public static final Texture azaleaTop = new Texture(); - public static final Texture azaleaSide = new Texture(); - public static final Texture azaleaPlant = new Texture(); - public static final Texture floweringAzaleaTop = new Texture(); - public static final Texture floweringAzaleaSide = new Texture(); - public static final Texture azaleaLeaves = new Texture(); - public static final Texture floweringAzaleaLeaves = new Texture(); - public static final Texture mossBlock = new Texture(); - public static final Texture caveVinesPlant = new Texture(); - public static final Texture caveVinesPlantLit = new Texture(); - public static final Texture caveVines = new Texture(); - public static final Texture caveVinesLit = new Texture(); - public static final Texture hangingRoots = new Texture(); - public static final Texture rootedDirt = new Texture(); - public static final Texture bigDripleafStem = new Texture(); - public static final Texture bigDripleafTop = new Texture(); - public static final Texture bigDripleafSide = new Texture(); - public static final Texture bigDripleafTip = new Texture(); - public static final Texture smallDripleafTop = new Texture(); - public static final Texture smallDripleafSide = new Texture(); - public static final Texture smallDripleafStemTop = new Texture(); - public static final Texture smallDripleafStemBottom = new Texture(); - public static final Texture sporeBlossom = new Texture(); - public static final Texture sporeBlossomBase = new Texture(); - public static final Texture deepslate = new Texture(); - public static final Texture deepslateTop = new Texture(); - public static final Texture polishedDeepslate = new Texture(); - public static final Texture chiseledDeepslate = new Texture(); - public static final Texture deepslateBricks = new Texture(); - public static final Texture deepslateTiles = new Texture(); - public static final Texture smoothBasalt = new Texture(); - public static final Texture cobbledDeepslate = new Texture(); - public static final Texture deepslateGoldOre = new Texture(); - public static final Texture deepslateIronOre = new Texture(); - public static final Texture deepslateDiamondOre = new Texture(); - public static final Texture deepslateLapisOre = new Texture(); - public static final Texture deepslateRedstoneOre = new Texture(); - public static final Texture crackedDeepslateBricks = new Texture(); - public static final Texture crackedDeepslateTiles = new Texture(); - public static final Texture deepslateCoalOre = new Texture(); - public static final Texture deepslateCopperOre = new Texture(); - public static final Texture deepslateEmeraldOre = new Texture(); - public static final Texture lightningRodOn = new Texture(); - public static final Texture light = new Texture(); - public static final Texture rawCopperBlock = new Texture(); - public static final Texture rawGoldBlock = new Texture(); - public static final Texture rawIronBlock = new Texture(); - public static final Texture pottedAzaleaBushTop = new Texture(); - public static final Texture pottedAzaleaBushSide = new Texture(); - public static final Texture pottedAzaleaBushPlant = new Texture(); - public static final Texture pottedFloweringAzaleaBushTop = new Texture(); - public static final Texture pottedFloweringAzaleaBushSide = new Texture(); + public static final BitmapTexture candle = new BitmapTexture(); + public static final BitmapTexture whiteCandle = new BitmapTexture(); + public static final BitmapTexture orangeCandle = new BitmapTexture(); + public static final BitmapTexture magentaCandle = new BitmapTexture(); + public static final BitmapTexture lightBlueCandle = new BitmapTexture(); + public static final BitmapTexture yellowCandle = new BitmapTexture(); + public static final BitmapTexture limeCandle = new BitmapTexture(); + public static final BitmapTexture pinkCandle = new BitmapTexture(); + public static final BitmapTexture grayCandle = new BitmapTexture(); + public static final BitmapTexture lightGrayCandle = new BitmapTexture(); + public static final BitmapTexture cyanCandle = new BitmapTexture(); + public static final BitmapTexture purpleCandle = new BitmapTexture(); + public static final BitmapTexture blueCandle = new BitmapTexture(); + public static final BitmapTexture brownCandle = new BitmapTexture(); + public static final BitmapTexture greenCandle = new BitmapTexture(); + public static final BitmapTexture redCandle = new BitmapTexture(); + public static final BitmapTexture blackCandle = new BitmapTexture(); + public static final BitmapTexture candleLit = new BitmapTexture(); + public static final BitmapTexture whiteCandleLit = new BitmapTexture(); + public static final BitmapTexture orangeCandleLit = new BitmapTexture(); + public static final BitmapTexture magentaCandleLit = new BitmapTexture(); + public static final BitmapTexture lightBlueCandleLit = new BitmapTexture(); + public static final BitmapTexture yellowCandleLit = new BitmapTexture(); + public static final BitmapTexture limeCandleLit = new BitmapTexture(); + public static final BitmapTexture pinkCandleLit = new BitmapTexture(); + public static final BitmapTexture grayCandleLit = new BitmapTexture(); + public static final BitmapTexture lightGrayCandleLit = new BitmapTexture(); + public static final BitmapTexture cyanCandleLit = new BitmapTexture(); + public static final BitmapTexture purpleCandleLit = new BitmapTexture(); + public static final BitmapTexture blueCandleLit = new BitmapTexture(); + public static final BitmapTexture brownCandleLit = new BitmapTexture(); + public static final BitmapTexture greenCandleLit = new BitmapTexture(); + public static final BitmapTexture redCandleLit = new BitmapTexture(); + public static final BitmapTexture blackCandleLit = new BitmapTexture(); + public static final BitmapTexture flameParticle = new BitmapTexture(); + public static final BitmapTexture copperOre = new BitmapTexture(); + public static final BitmapTexture calcite = new BitmapTexture(); + public static final BitmapTexture tuff = new BitmapTexture(); + public static final BitmapTexture amethyst = new BitmapTexture(); + public static final BitmapTexture buddingAmethyst = new BitmapTexture(); + public static final BitmapTexture copperBlock = new BitmapTexture(); + public static final BitmapTexture exposedCopper = new BitmapTexture(); + public static final BitmapTexture weatheredCopper = new BitmapTexture(); + public static final BitmapTexture oxidizedCopper = new BitmapTexture(); + public static final BitmapTexture cutCopper = new BitmapTexture(); + public static final BitmapTexture exposedCutCopper = new BitmapTexture(); + public static final BitmapTexture weatheredCutCopper = new BitmapTexture(); + public static final BitmapTexture oxidizedCutCopper = new BitmapTexture(); + public static final BitmapTexture lightningRod = new BitmapTexture(); + public static final BitmapTexture smallAmethystBud = new BitmapTexture(); + public static final BitmapTexture mediumAmethystBud = new BitmapTexture(); + public static final BitmapTexture largeAmethystBud = new BitmapTexture(); + public static final BitmapTexture amethystCluster = new BitmapTexture(); + public static final BitmapTexture tintedGlass = new BitmapTexture(); + public static final BitmapTexture powderSnow = new BitmapTexture(); + public static final BitmapTexture dripstoneBlock = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneDownBase = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneDownFrustum = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneDownMiddle = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneDownTip = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneDownTipMerge = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneUpBase = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneUpFrustum = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneUpMiddle = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneUpTip = new BitmapTexture(); + public static final BitmapTexture pointedDripstoneUpTipMerge = new BitmapTexture(); + public static final BitmapTexture sculkSensorBottom = new BitmapTexture(); + public static final BitmapTexture sculkSensorSide = new BitmapTexture(); + public static final BitmapTexture sculkSensorTendrilActive = new BitmapTexture(); + public static final BitmapTexture sculkSensorTendrilInactive = new BitmapTexture(); + public static final BitmapTexture sculkSensorTop = new BitmapTexture(); + public static final BitmapTexture glowLichen = new BitmapTexture(); + public static final BitmapTexture azaleaTop = new BitmapTexture(); + public static final BitmapTexture azaleaSide = new BitmapTexture(); + public static final BitmapTexture azaleaPlant = new BitmapTexture(); + public static final BitmapTexture floweringAzaleaTop = new BitmapTexture(); + public static final BitmapTexture floweringAzaleaSide = new BitmapTexture(); + public static final BitmapTexture azaleaLeaves = new BitmapTexture(); + public static final BitmapTexture floweringAzaleaLeaves = new BitmapTexture(); + public static final BitmapTexture mossBlock = new BitmapTexture(); + public static final BitmapTexture caveVinesPlant = new BitmapTexture(); + public static final BitmapTexture caveVinesPlantLit = new BitmapTexture(); + public static final BitmapTexture caveVines = new BitmapTexture(); + public static final BitmapTexture caveVinesLit = new BitmapTexture(); + public static final BitmapTexture hangingRoots = new BitmapTexture(); + public static final BitmapTexture rootedDirt = new BitmapTexture(); + public static final BitmapTexture bigDripleafStem = new BitmapTexture(); + public static final BitmapTexture bigDripleafTop = new BitmapTexture(); + public static final BitmapTexture bigDripleafSide = new BitmapTexture(); + public static final BitmapTexture bigDripleafTip = new BitmapTexture(); + public static final BitmapTexture smallDripleafTop = new BitmapTexture(); + public static final BitmapTexture smallDripleafSide = new BitmapTexture(); + public static final BitmapTexture smallDripleafStemTop = new BitmapTexture(); + public static final BitmapTexture smallDripleafStemBottom = new BitmapTexture(); + public static final BitmapTexture sporeBlossom = new BitmapTexture(); + public static final BitmapTexture sporeBlossomBase = new BitmapTexture(); + public static final BitmapTexture deepslate = new BitmapTexture(); + public static final BitmapTexture deepslateTop = new BitmapTexture(); + public static final BitmapTexture polishedDeepslate = new BitmapTexture(); + public static final BitmapTexture chiseledDeepslate = new BitmapTexture(); + public static final BitmapTexture deepslateBricks = new BitmapTexture(); + public static final BitmapTexture deepslateTiles = new BitmapTexture(); + public static final BitmapTexture smoothBasalt = new BitmapTexture(); + public static final BitmapTexture cobbledDeepslate = new BitmapTexture(); + public static final BitmapTexture deepslateGoldOre = new BitmapTexture(); + public static final BitmapTexture deepslateIronOre = new BitmapTexture(); + public static final BitmapTexture deepslateDiamondOre = new BitmapTexture(); + public static final BitmapTexture deepslateLapisOre = new BitmapTexture(); + public static final BitmapTexture deepslateRedstoneOre = new BitmapTexture(); + public static final BitmapTexture crackedDeepslateBricks = new BitmapTexture(); + public static final BitmapTexture crackedDeepslateTiles = new BitmapTexture(); + public static final BitmapTexture deepslateCoalOre = new BitmapTexture(); + public static final BitmapTexture deepslateCopperOre = new BitmapTexture(); + public static final BitmapTexture deepslateEmeraldOre = new BitmapTexture(); + public static final BitmapTexture lightningRodOn = new BitmapTexture(); + public static final BitmapTexture light = new BitmapTexture(); + public static final BitmapTexture rawCopperBlock = new BitmapTexture(); + public static final BitmapTexture rawGoldBlock = new BitmapTexture(); + public static final BitmapTexture rawIronBlock = new BitmapTexture(); + public static final BitmapTexture pottedAzaleaBushTop = new BitmapTexture(); + public static final BitmapTexture pottedAzaleaBushSide = new BitmapTexture(); + public static final BitmapTexture pottedAzaleaBushPlant = new BitmapTexture(); + public static final BitmapTexture pottedFloweringAzaleaBushTop = new BitmapTexture(); + public static final BitmapTexture pottedFloweringAzaleaBushSide = new BitmapTexture(); // [1.19] @TexturePath("assets/minecraft/textures/block/mud") - public static final Texture mud = new Texture(); + public static final BitmapTexture mud = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mud_bricks") - public static final Texture mudBricks = new Texture(); + public static final BitmapTexture mudBricks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/packed_mud") - public static final Texture packedMud = new Texture(); + public static final BitmapTexture packedMud = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/muddy_mangrove_roots_side") - public static final Texture muddyMangroveRootsSide = new Texture(); + public static final BitmapTexture muddyMangroveRootsSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/muddy_mangrove_roots_top") - public static final Texture muddyMangroveRootsTop = new Texture(); + public static final BitmapTexture muddyMangroveRootsTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/reinforced_deepslate_top") - public static final Texture reinforcedDeepslateTop = new Texture(); + public static final BitmapTexture reinforcedDeepslateTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/reinforced_deepslate_side") - public static final Texture reinforcedDeepslateSide = new Texture(); + public static final BitmapTexture reinforcedDeepslateSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/reinforced_deepslate_bottom") - public static final Texture reinforcedDeepslateBottom = new Texture(); + public static final BitmapTexture reinforcedDeepslateBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/frogspawn") - public static final Texture frogspawn = new Texture(); + public static final BitmapTexture frogspawn = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/ochre_froglight_side") - public static final Texture ochreFroglightSide = new Texture(); + public static final BitmapTexture ochreFroglightSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/ochre_froglight_top") - public static final Texture ochreFroglightTop = new Texture(); + public static final BitmapTexture ochreFroglightTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/verdant_froglight_side") - public static final Texture verdantFroglightSide = new Texture(); + public static final BitmapTexture verdantFroglightSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/verdant_froglight_top") - public static final Texture verdantFroglightTop = new Texture(); + public static final BitmapTexture verdantFroglightTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pearlescent_froglight_side") - public static final Texture pearlescentFroglightSide = new Texture(); + public static final BitmapTexture pearlescentFroglightSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pearlescent_froglight_top") - public static final Texture pearlescentFroglightTop = new Texture(); + public static final BitmapTexture pearlescentFroglightTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_planks") - public static final Texture mangrovePlanks = new Texture(); + public static final BitmapTexture mangrovePlanks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_door_top") - public static final Texture mangroveDoorTop = new Texture(); + public static final BitmapTexture mangroveDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_door_bottom") - public static final Texture mangroveDoorBottom = new Texture(); + public static final BitmapTexture mangroveDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_leaves") - public static final Texture mangroveLeaves = new Texture(); + public static final BitmapTexture mangroveLeaves = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_log") - public static final Texture mangroveLog = new Texture(); + public static final BitmapTexture mangroveLog = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_log_top") - public static final Texture mangroveLogTop = new Texture(); + public static final BitmapTexture mangroveLogTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_mangrove_log") - public static final Texture strippedMangroveLog = new Texture(); + public static final BitmapTexture strippedMangroveLog = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_mangrove_log_top") - public static final Texture strippedMangroveLogTop = new Texture(); + public static final BitmapTexture strippedMangroveLogTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/mangrove") - public static final Texture mangroveSignPost = new Texture(); + public static final BitmapTexture mangroveSignPost = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_trapdoor") - public static final Texture mangroveTrapdoor = new Texture(); + public static final BitmapTexture mangroveTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_roots_side") - public static final Texture mangroveRootsSide = new Texture(); + public static final BitmapTexture mangroveRootsSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_roots_top") - public static final Texture mangroveRootsTop = new Texture(); + public static final BitmapTexture mangroveRootsTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_propagule") - public static final Texture mangrovePropagule = new Texture(); + public static final BitmapTexture mangrovePropagule = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/mangrove_propagule_hanging") - public static final Texture mangrovePropaguleHanging = new Texture(); + public static final BitmapTexture mangrovePropaguleHanging = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_catalyst_top") - public static final Texture sculkCatalystTop = new Texture(); + public static final BitmapTexture sculkCatalystTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_catalyst_side") - public static final Texture sculkCatalystSide = new Texture(); + public static final BitmapTexture sculkCatalystSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_catalyst_bottom") - public static final Texture sculkCatalystBottom = new Texture(); + public static final BitmapTexture sculkCatalystBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_catalyst_top_bloom") - public static final Texture sculkCatalystTopBloom = new Texture(); + public static final BitmapTexture sculkCatalystTopBloom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_catalyst_side_bloom") - public static final Texture sculkCatalystSideBloom = new Texture(); + public static final BitmapTexture sculkCatalystSideBloom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk") - public static final Texture sculk = new Texture(); + public static final BitmapTexture sculk = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_shrieker_top") - public static final Texture sculkShriekerTop = new Texture(); + public static final BitmapTexture sculkShriekerTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_shrieker_side") - public static final Texture sculkShriekerSide = new Texture(); + public static final BitmapTexture sculkShriekerSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_shrieker_bottom") - public static final Texture sculkShriekerBottom = new Texture(); + public static final BitmapTexture sculkShriekerBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_shrieker_can_summon_inner_top") - public static final Texture sculkShriekerCanSummonInnerTop = new Texture(); + public static final BitmapTexture sculkShriekerCanSummonInnerTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_shrieker_inner_top") - public static final Texture sculkShriekerInnerTop = new Texture(); + public static final BitmapTexture sculkShriekerInnerTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sculk_vein") - public static final Texture sculkVein = new Texture(); + public static final BitmapTexture sculkVein = new BitmapTexture(); //1.20 @TexturePath("assets/minecraft/textures/block/bamboo_planks") - public static final Texture bambooPlanks = new Texture(); + public static final BitmapTexture bambooPlanks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_mosaic") - public static final Texture bambooMosaic = new Texture(); + public static final BitmapTexture bambooMosaic = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_door_top") - public static final Texture bambooDoorTop = new Texture(); + public static final BitmapTexture bambooDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_door_bottom") - public static final Texture bambooDoorBottom = new Texture(); + public static final BitmapTexture bambooDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_block") - public static final Texture bambooBlock = new Texture(); + public static final BitmapTexture bambooBlock = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_block_top") - public static final Texture bambooBlockTop = new Texture(); + public static final BitmapTexture bambooBlockTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_bamboo_block") - public static final Texture strippedBambooBlock = new Texture(); + public static final BitmapTexture strippedBambooBlock = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_bamboo_block_top") - public static final Texture strippedBambooBlockTop = new Texture(); + public static final BitmapTexture strippedBambooBlockTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/bamboo") - public static final Texture bambooSignPost = new Texture(); + public static final BitmapTexture bambooSignPost = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/bamboo_trapdoor") - public static final Texture bambooTrapdoor = new Texture(); + public static final BitmapTexture bambooTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_planks") - public static final Texture cherryPlanks = new Texture(); + public static final BitmapTexture cherryPlanks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_door_top") - public static final Texture cherryDoorTop = new Texture(); + public static final BitmapTexture cherryDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_door_bottom") - public static final Texture cherryDoorBottom = new Texture(); + public static final BitmapTexture cherryDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_leaves") - public static final Texture cherryLeaves = new Texture(); + public static final BitmapTexture cherryLeaves = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_log") - public static final Texture cherryLog = new Texture(); + public static final BitmapTexture cherryLog = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_log_top") - public static final Texture cherryLogTop = new Texture(); + public static final BitmapTexture cherryLogTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_cherry_log") - public static final Texture strippedCherryLog = new Texture(); + public static final BitmapTexture strippedCherryLog = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/stripped_cherry_log_top") - public static final Texture strippedCherryLogTop = new Texture(); + public static final BitmapTexture strippedCherryLogTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/cherry") - public static final Texture cherrySignPost = new Texture(); + public static final BitmapTexture cherrySignPost = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_trapdoor") - public static final Texture cherryTrapdoor = new Texture(); + public static final BitmapTexture cherryTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/cherry_sapling") - public static final Texture cherrySapling = new Texture(); + public static final BitmapTexture cherrySapling = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/torchflower") - public static final Texture torchflower = new Texture(); + public static final BitmapTexture torchflower = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/torchflower_crop_stage0") - public static final Texture torchflowerCropStage0 = new Texture(); + public static final BitmapTexture torchflowerCropStage0 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/torchflower_crop_stage1") - public static final Texture torchflowerCropStage1 = new Texture(); + public static final BitmapTexture torchflowerCropStage1 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_bookshelf_empty") - public static final Texture chiseledBookshelfEmpty = new Texture(); + public static final BitmapTexture chiseledBookshelfEmpty = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_bookshelf_occupied") - public static final Texture chiseledBookshelfOccupied = new Texture(); + public static final BitmapTexture chiseledBookshelfOccupied = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_bookshelf_side") - public static final Texture chiseledBookshelfSide = new Texture(); + public static final BitmapTexture chiseledBookshelfSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_bookshelf_top") - public static final Texture chiseledBookshelfTop = new Texture(); + public static final BitmapTexture chiseledBookshelfTop = new BitmapTexture(); - public static final Texture[] chiseledBookshelfCombinations = new ChiseledBookshelfTexture[64]; + public static final ChiseledBookshelfTexture[] chiseledBookshelfCombinations = new ChiseledBookshelfTexture[64]; static { for(int i = 0; i < chiseledBookshelfCombinations.length; i++) { chiseledBookshelfCombinations[i] = new ChiseledBookshelfTexture(Texture.chiseledBookshelfEmpty, Texture.chiseledBookshelfOccupied, @@ -1191,534 +1168,331 @@ public class Texture { } @TexturePath("assets/minecraft/textures/block/suspicious_sand_0") - public static final Texture suspiciousSandStage0 = new Texture(); + public static final BitmapTexture suspiciousSandStage0 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_sand_1") - public static final Texture suspiciousSandStage1 = new Texture(); + public static final BitmapTexture suspiciousSandStage1 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_sand_2") - public static final Texture suspiciousSandStage2 = new Texture(); + public static final BitmapTexture suspiciousSandStage2 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_sand_3") - public static final Texture suspiciousSandStage3 = new Texture(); + public static final BitmapTexture suspiciousSandStage3 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_gravel_0") - public static final Texture suspiciousGravelStage0 = new Texture(); + public static final BitmapTexture suspiciousGravelStage0 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_gravel_1") - public static final Texture suspiciousGravelStage1 = new Texture(); + public static final BitmapTexture suspiciousGravelStage1 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_gravel_2") - public static final Texture suspiciousGravelStage2 = new Texture(); + public static final BitmapTexture suspiciousGravelStage2 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/suspicious_gravel_3") - public static final Texture suspiciousGravelStage3 = new Texture(); + public static final BitmapTexture suspiciousGravelStage3 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/decorated_pot_base") - public static final Texture decoratedPotBase = new Texture(); + public static final BitmapTexture decoratedPotBase = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/decorated_pot_side") - public static final Texture decoratedPotSide = new Texture(); + public static final BitmapTexture decoratedPotSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/angler_pottery_pattern") - public static final Texture decoratedPotPatternAngler = new Texture(); + public static final BitmapTexture decoratedPotPatternAngler = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/archer_pottery_pattern") - public static final Texture decoratedPotPatternArcher = new Texture(); + public static final BitmapTexture decoratedPotPatternArcher = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/arms_up_pottery_pattern") - public static final Texture decoratedPotPatternArmsUp = new Texture(); + public static final BitmapTexture decoratedPotPatternArmsUp = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/blade_pottery_pattern") - public static final Texture decoratedPotPatternBlade = new Texture(); + public static final BitmapTexture decoratedPotPatternBlade = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/brewer_pottery_pattern") - public static final Texture decoratedPotPatternBrewer = new Texture(); + public static final BitmapTexture decoratedPotPatternBrewer = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/burn_pottery_pattern") - public static final Texture decoratedPotPatternBurn = new Texture(); + public static final BitmapTexture decoratedPotPatternBurn = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/danger_pottery_pattern") - public static final Texture decoratedPotPatternDanger = new Texture(); + public static final BitmapTexture decoratedPotPatternDanger = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/explorer_pottery_pattern") - public static final Texture decoratedPotPatternExplorer = new Texture(); + public static final BitmapTexture decoratedPotPatternExplorer = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/friend_pottery_pattern") - public static final Texture decoratedPotPatternFriend = new Texture(); + public static final BitmapTexture decoratedPotPatternFriend = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/heartbreak_pottery_pattern") - public static final Texture decoratedPotPatternHeartbreak = new Texture(); + public static final BitmapTexture decoratedPotPatternHeartbreak = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/heart_pottery_pattern") - public static final Texture decoratedPotPatternHeart = new Texture(); + public static final BitmapTexture decoratedPotPatternHeart = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/howl_pottery_pattern") - public static final Texture decoratedPotPatternHowl = new Texture(); + public static final BitmapTexture decoratedPotPatternHowl = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/miner_pottery_pattern") - public static final Texture decoratedPotPatternMiner = new Texture(); + public static final BitmapTexture decoratedPotPatternMiner = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/mourner_pottery_pattern") - public static final Texture decoratedPotPatternMourner = new Texture(); + public static final BitmapTexture decoratedPotPatternMourner = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/plenty_pottery_pattern") - public static final Texture decoratedPotPatternPlenty = new Texture(); + public static final BitmapTexture decoratedPotPatternPlenty = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/prize_pottery_pattern") - public static final Texture decoratedPotPatternPrize = new Texture(); + public static final BitmapTexture decoratedPotPatternPrize = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/sheaf_pottery_pattern") - public static final Texture decoratedPotPatternSheaf = new Texture(); + public static final BitmapTexture decoratedPotPatternSheaf = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/shelter_pottery_pattern") - public static final Texture decoratedPotPatternShelter = new Texture(); + public static final BitmapTexture decoratedPotPatternShelter = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/skull_pottery_pattern") - public static final Texture decoratedPotPatternSkull = new Texture(); + public static final BitmapTexture decoratedPotPatternSkull = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/snort_pottery_pattern") - public static final Texture decoratedPotPatternSnort = new Texture(); + public static final BitmapTexture decoratedPotPatternSnort = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_bottom") - public static final Texture snifferEggNotCrackedBottom = new Texture(); + public static final BitmapTexture snifferEggNotCrackedBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_east") - public static final Texture snifferEggNotCrackedEast = new Texture(); + public static final BitmapTexture snifferEggNotCrackedEast = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_north") - public static final Texture snifferEggNotCrackedNorth = new Texture(); + public static final BitmapTexture snifferEggNotCrackedNorth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_south") - public static final Texture snifferEggNotCrackedSouth = new Texture(); + public static final BitmapTexture snifferEggNotCrackedSouth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_top") - public static final Texture snifferEggNotCrackedTop = new Texture(); + public static final BitmapTexture snifferEggNotCrackedTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_not_cracked_west") - public static final Texture snifferEggNotCrackedWest = new Texture(); + public static final BitmapTexture snifferEggNotCrackedWest = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_bottom") - public static final Texture snifferEggSlightlyCrackedBottom = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_east") - public static final Texture snifferEggSlightlyCrackedEast = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedEast = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_north") - public static final Texture snifferEggSlightlyCrackedNorth = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedNorth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_south") - public static final Texture snifferEggSlightlyCrackedSouth = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedSouth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_top") - public static final Texture snifferEggSlightlyCrackedTop = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_slightly_cracked_west") - public static final Texture snifferEggSlightlyCrackedWest = new Texture(); + public static final BitmapTexture snifferEggSlightlyCrackedWest = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_bottom") - public static final Texture snifferEggVeryCrackedBottom = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_east") - public static final Texture snifferEggVeryCrackedEast = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedEast = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_north") - public static final Texture snifferEggVeryCrackedNorth = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedNorth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_south") - public static final Texture snifferEggVeryCrackedSouth = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedSouth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_top") - public static final Texture snifferEggVeryCrackedTop = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/sniffer_egg_very_cracked_west") - public static final Texture snifferEggVeryCrackedWest = new Texture(); + public static final BitmapTexture snifferEggVeryCrackedWest = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pink_petals") - public static final Texture pinkPetals = new Texture(); + public static final BitmapTexture pinkPetals = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pink_petals_stem") - public static final Texture pinkPetalsStem = new Texture(); + public static final BitmapTexture pinkPetalsStem = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom_stage_1") - public static final Texture pitcherCropBottomStage1 = new Texture(); + public static final BitmapTexture pitcherCropBottomStage1 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom_stage_2") - public static final Texture pitcherCropBottomStage2 = new Texture(); + public static final BitmapTexture pitcherCropBottomStage2 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom_stage_3") - public static final Texture pitcherCropBottomStage3 = new Texture(); + public static final BitmapTexture pitcherCropBottomStage3 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom_stage_4") - public static final Texture pitcherCropBottomStage4 = new Texture(); + public static final BitmapTexture pitcherCropBottomStage4 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_top_stage_3") - public static final Texture pitcherCropTopStage3 = new Texture(); + public static final BitmapTexture pitcherCropTopStage3 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_top_stage_4") - public static final Texture pitcherCropTopStage4 = new Texture(); + public static final BitmapTexture pitcherCropTopStage4 = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_top") - public static final Texture pitcherCropTop = new Texture(); + public static final BitmapTexture pitcherCropTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_side") - public static final Texture pitcherCropSide = new Texture(); + public static final BitmapTexture pitcherCropSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/pitcher_crop_bottom") - public static final Texture pitcherCropBottom = new Texture(); + public static final BitmapTexture pitcherCropBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_amethyst") - public static final Texture calibratedSculkSensorAmethyst = new Texture(); + public static final BitmapTexture calibratedSculkSensorAmethyst = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_top") - public static final Texture calibratedSculkSensorTop = new Texture(); + public static final BitmapTexture calibratedSculkSensorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/calibrated_sculk_sensor_input_side") - public static final Texture calibratedSculkSensorInputSide = new Texture(); + public static final BitmapTexture calibratedSculkSensorInputSide = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/oak") - public static final Texture oakHangingSign = new Texture(); + public static final BitmapTexture oakHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/spruce") - public static final Texture spruceHangingSign = new Texture(); + public static final BitmapTexture spruceHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/birch") - public static final Texture birchHangingSign = new Texture(); + public static final BitmapTexture birchHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/jungle") - public static final Texture jungleHangingSign = new Texture(); + public static final BitmapTexture jungleHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/acacia") - public static final Texture acaciaHangingSign = new Texture(); + public static final BitmapTexture acaciaHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/dark_oak") - public static final Texture darkOakHangingSign = new Texture(); + public static final BitmapTexture darkOakHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/crimson") - public static final Texture crimsonHangingSign = new Texture(); + public static final BitmapTexture crimsonHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/warped") - public static final Texture warpedHangingSign = new Texture(); + public static final BitmapTexture warpedHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/mangrove") - public static final Texture mangroveHangingSign = new Texture(); + public static final BitmapTexture mangroveHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/bamboo") - public static final Texture bambooHangingSign = new Texture(); + public static final BitmapTexture bambooHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/signs/hanging/cherry") - public static final Texture cherryHangingSign = new Texture(); + public static final BitmapTexture cherryHangingSign = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/piglin/piglin") - public static final Texture piglin = new Texture(); + public static final BitmapTexture piglin = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/polished_tuff") - public static final Texture polishedTuff = new Texture(); + public static final BitmapTexture polishedTuff = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/tuff_bricks") - public static final Texture tuffBricks = new Texture(); + public static final BitmapTexture tuffBricks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_tuff") - public static final Texture chiseledTuff = new Texture(); + public static final BitmapTexture chiseledTuff = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_tuff_bricks") - public static final Texture chiseledTuffBricks = new Texture(); + public static final BitmapTexture chiseledTuffBricks = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/chiseled_copper") - public static final Texture chiseledCopper = new Texture(); + public static final BitmapTexture chiseledCopper = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_grate") - public static final Texture copperGrate = new Texture(); + public static final BitmapTexture copperGrate = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_bulb") - public static final Texture copperBulb = new Texture(); + public static final BitmapTexture copperBulb = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_bulb_lit") - public static final Texture copperBulbLit = new Texture(); + public static final BitmapTexture copperBulbLit = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_bulb_powered") - public static final Texture copperBulbPowered = new Texture(); + public static final BitmapTexture copperBulbPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_bulb_lit_powered") - public static final Texture copperBulbLitPowered = new Texture(); + public static final BitmapTexture copperBulbLitPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_door_top") - public static final Texture copperDoorTop = new Texture(); + public static final BitmapTexture copperDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_door_bottom") - public static final Texture copperDoorBottom = new Texture(); + public static final BitmapTexture copperDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/copper_trapdoor") - public static final Texture copperTrapdoor = new Texture(); + public static final BitmapTexture copperTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_chiseled_copper") - public static final Texture exposedChiseledCopper = new Texture(); + public static final BitmapTexture exposedChiseledCopper = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_grate") - public static final Texture exposedCopperGrate = new Texture(); + public static final BitmapTexture exposedCopperGrate = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_bulb") - public static final Texture exposedCopperBulb = new Texture(); + public static final BitmapTexture exposedCopperBulb = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_bulb_lit") - public static final Texture exposedCopperBulbLit = new Texture(); + public static final BitmapTexture exposedCopperBulbLit = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_bulb_powered") - public static final Texture exposedCopperBulbPowered = new Texture(); + public static final BitmapTexture exposedCopperBulbPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_bulb_lit_powered") - public static final Texture exposedCopperBulbLitPowered = new Texture(); + public static final BitmapTexture exposedCopperBulbLitPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_door_top") - public static final Texture exposedCopperDoorTop = new Texture(); + public static final BitmapTexture exposedCopperDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_door_bottom") - public static final Texture exposedCopperDoorBottom = new Texture(); + public static final BitmapTexture exposedCopperDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/exposed_copper_trapdoor") - public static final Texture exposedCopperTrapdoor = new Texture(); + public static final BitmapTexture exposedCopperTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_chiseled_copper") - public static final Texture weatheredChiseledCopper = new Texture(); + public static final BitmapTexture weatheredChiseledCopper = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_grate") - public static final Texture weatheredCopperGrate = new Texture(); + public static final BitmapTexture weatheredCopperGrate = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_bulb") - public static final Texture weatheredCopperBulb = new Texture(); + public static final BitmapTexture weatheredCopperBulb = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_bulb_lit") - public static final Texture weatheredCopperBulbLit = new Texture(); + public static final BitmapTexture weatheredCopperBulbLit = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_bulb_powered") - public static final Texture weatheredCopperBulbPowered = new Texture(); + public static final BitmapTexture weatheredCopperBulbPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_bulb_lit_powered") - public static final Texture weatheredCopperBulbLitPowered = new Texture(); + public static final BitmapTexture weatheredCopperBulbLitPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_door_top") - public static final Texture weatheredCopperDoorTop = new Texture(); + public static final BitmapTexture weatheredCopperDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_door_bottom") - public static final Texture weatheredCopperDoorBottom = new Texture(); + public static final BitmapTexture weatheredCopperDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/weathered_copper_trapdoor") - public static final Texture weatheredCopperTrapdoor = new Texture(); + public static final BitmapTexture weatheredCopperTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_chiseled_copper") - public static final Texture oxidizedChiseledCopper = new Texture(); + public static final BitmapTexture oxidizedChiseledCopper = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_grate") - public static final Texture oxidizedCopperGrate = new Texture(); + public static final BitmapTexture oxidizedCopperGrate = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_bulb") - public static final Texture oxidizedCopperBulb = new Texture(); + public static final BitmapTexture oxidizedCopperBulb = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_bulb_lit") - public static final Texture oxidizedCopperBulbLit = new Texture(); + public static final BitmapTexture oxidizedCopperBulbLit = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_bulb_powered") - public static final Texture oxidizedCopperBulbPowered = new Texture(); + public static final BitmapTexture oxidizedCopperBulbPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_bulb_lit_powered") - public static final Texture oxidizedCopperBulbLitPowered = new Texture(); + public static final BitmapTexture oxidizedCopperBulbLitPowered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_door_top") - public static final Texture oxidizedCopperDoorTop = new Texture(); + public static final BitmapTexture oxidizedCopperDoorTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_door_bottom") - public static final Texture oxidizedCopperDoorBottom = new Texture(); + public static final BitmapTexture oxidizedCopperDoorBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/oxidized_copper_trapdoor") - public static final Texture oxidizedCopperTrapdoor = new Texture(); + public static final BitmapTexture oxidizedCopperTrapdoor = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_north") - public static final Texture crafterNorth = new Texture(); + public static final BitmapTexture crafterNorth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_north_crafting") - public static final Texture crafterNorthCrafting = new Texture(); + public static final BitmapTexture crafterNorthCrafting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_east") - public static final Texture crafterEast = new Texture(); + public static final BitmapTexture crafterEast = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_east_crafting") - public static final Texture crafterEastCrafting = new Texture(); + public static final BitmapTexture crafterEastCrafting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_east_triggered") - public static final Texture crafterEastTriggered = new Texture(); + public static final BitmapTexture crafterEastTriggered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_south") - public static final Texture crafterSouth = new Texture(); + public static final BitmapTexture crafterSouth = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_south_triggered") - public static final Texture crafterSouthTriggered = new Texture(); + public static final BitmapTexture crafterSouthTriggered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_west") - public static final Texture crafterWest = new Texture(); + public static final BitmapTexture crafterWest = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_west_crafting") - public static final Texture crafterWestCrafting = new Texture(); + public static final BitmapTexture crafterWestCrafting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_west_triggered") - public static final Texture crafterWestTriggered = new Texture(); + public static final BitmapTexture crafterWestTriggered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_top") - public static final Texture crafterTop = new Texture(); + public static final BitmapTexture crafterTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_top_crafting") - public static final Texture crafterTopCrafting = new Texture(); + public static final BitmapTexture crafterTopCrafting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_top_triggered") - public static final Texture crafterTopTriggered = new Texture(); + public static final BitmapTexture crafterTopTriggered = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/crafter_bottom") - public static final Texture crafterBottom = new Texture(); + public static final BitmapTexture crafterBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_top") - public static final Texture vaultTop = new Texture(); + public static final BitmapTexture vaultTop = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_top_ejecting") - public static final Texture vaultTopEjecting = new Texture(); + public static final BitmapTexture vaultTopEjecting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_bottom") - public static final Texture vaultBottom = new Texture(); + public static final BitmapTexture vaultBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_on") - public static final Texture vaultFrontOn = new Texture(); + public static final BitmapTexture vaultFrontOn = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_off") - public static final Texture vaultFrontOff = new Texture(); + public static final BitmapTexture vaultFrontOff = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_ejecting") - public static final Texture vaultFrontEjecting = new Texture(); + public static final BitmapTexture vaultFrontEjecting = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_side_off") - public static final Texture vaultSideOff = new Texture(); + public static final BitmapTexture vaultSideOff = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_ejecting") - public static final Texture vaultSideOn = new Texture(); + public static final BitmapTexture vaultSideOn = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/flow_pottery_pattern") - public static final Texture decoratedPotPatternFlow = new Texture(); + public static final BitmapTexture decoratedPotPatternFlow = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/guster_pottery_pattern") - public static final Texture decoratedPotPatternGuster = new Texture(); + public static final BitmapTexture decoratedPotPatternGuster = new BitmapTexture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/scrape_pottery_pattern") - public static final Texture decoratedPotPatternScrape = new Texture(); + public static final BitmapTexture decoratedPotPatternScrape = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/heavy_core") - public static final Texture heavyCore = new Texture(); + public static final BitmapTexture heavyCore = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_bottom_ominous") - public static final Texture vaultBottomOminous = new Texture(); + public static final BitmapTexture vaultBottomOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_off_ominous") - public static final Texture vaultFrontOffOminous = new Texture(); + public static final BitmapTexture vaultFrontOffOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_side_off_ominous") - public static final Texture vaultSideOffOminous = new Texture(); + public static final BitmapTexture vaultSideOffOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_top_ominous") - public static final Texture vaultTopOminous = new Texture(); + public static final BitmapTexture vaultTopOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_side_on_ominous") - public static final Texture vaultSideOnOminous = new Texture(); + public static final BitmapTexture vaultSideOnOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_on_ominous") - public static final Texture vaultFrontOnOminous = new Texture(); + public static final BitmapTexture vaultFrontOnOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_top_ejecting_ominous") - public static final Texture vaultTopEjectingOminous = new Texture(); + public static final BitmapTexture vaultTopEjectingOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/vault_front_ejecting_ominous") - public static final Texture vaultFrontEjectingOminous = new Texture(); + public static final BitmapTexture vaultFrontEjectingOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_bottom") - public static final Texture trialSpawnerBottom = new Texture(); + public static final BitmapTexture trialSpawnerBottom = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_side_inactive") - public static final Texture trialSpawnerSideInactive = new Texture(); + public static final BitmapTexture trialSpawnerSideInactive = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_side_inactive_ominous") - public static final Texture trialSpawnerSideInactiveOminous = new Texture(); + public static final BitmapTexture trialSpawnerSideInactiveOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_inactive") - public static final Texture trialSpawnerTopInactive = new Texture(); + public static final BitmapTexture trialSpawnerTopInactive = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_inactive_ominous") - public static final Texture trialSpawnerTopInactiveOminous = new Texture(); + public static final BitmapTexture trialSpawnerTopInactiveOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_side_active") - public static final Texture trialSpawnerSideActive = new Texture(); + public static final BitmapTexture trialSpawnerSideActive = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_side_active_ominous") - public static final Texture trialSpawnerSideActiveOminous = new Texture(); + public static final BitmapTexture trialSpawnerSideActiveOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_active") - public static final Texture trialSpawnerTopActive = new Texture(); + public static final BitmapTexture trialSpawnerTopActive = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_active_ominous") - public static final Texture trialSpawnerTopActiveOminous = new Texture(); + public static final BitmapTexture trialSpawnerTopActiveOminous = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_ejecting_reward") - public static final Texture trialSpawnerTopEjectingReward = new Texture(); + public static final BitmapTexture trialSpawnerTopEjectingReward = new BitmapTexture(); @TexturePath("assets/minecraft/textures/block/trial_spawner_top_ejecting_reward_ominous") - public static final Texture trialSpawnerTopEjectingRewardOminous = new Texture(); + public static final BitmapTexture trialSpawnerTopEjectingRewardOminous = new BitmapTexture(); /** Banner base texture. */ - public static final Texture bannerBase = new Texture(); - - public static final Texture armorStand = new Texture(); - - protected static boolean useAverageColor = PersistentSettings.getSingleColorTextures(); - - @NotNull protected BitmapImage image; - protected int width; - protected int height; - protected int avgColor; - private float[] avgColorLinear; - private float[] avgColorFlat; - - private Image fxImage = null; + public static final BitmapTexture bannerBase = new BitmapTexture(); - public Texture() { - this(ImageLoader.missingImage); - } - - public Texture(String resourceName) { - this(ImageLoader.readResourceNonNull("textures/" + resourceName + ".png")); - } - - public Texture(BitmapImage img) { - setTexture(img); - } + public static final BitmapTexture armorStand = new BitmapTexture(); - public void setTexture(Texture texture) { - setTexture(texture.image); - } - - public void setTexture(BitmapImage newImage) { - image = newImage; - - // Gamma correct the texture. - avgColorLinear = new float[] {0, 0, 0, 0}; - - int[] data = image.data; - width = image.width; - height = image.height; - float[] pixelBuffer = new float[4]; - for (int y = 0; y < height; ++y) { - for (int x = 0; x < width; ++x) { - int index = width * y + x; - ColorUtil.getRGBAComponentsGammaCorrected(data[index], pixelBuffer); - avgColorLinear[0] += pixelBuffer[3] * pixelBuffer[0]; - avgColorLinear[1] += pixelBuffer[3] * pixelBuffer[1]; - avgColorLinear[2] += pixelBuffer[3] * pixelBuffer[2]; - avgColorLinear[3] += pixelBuffer[3]; - } - } - - avgColorFlat = new float[4]; - if (avgColorLinear[3] > 0.001) { - avgColorFlat[0] = avgColorLinear[0] / avgColorLinear[3]; - avgColorFlat[1] = avgColorLinear[1] / avgColorLinear[3]; - avgColorFlat[2] = avgColorLinear[2] / avgColorLinear[3]; - avgColorFlat[3] = 1; - } - - avgColorLinear[0] /= width * height; - avgColorLinear[1] /= width * height; - avgColorLinear[2] /= width * height; - avgColorLinear[3] /= width * height; - - avgColor = ColorUtil.getArgb(FastMath.pow(avgColorLinear[0], 1 / Scene.DEFAULT_GAMMA), - FastMath.pow(avgColorLinear[1], 1 / Scene.DEFAULT_GAMMA), - FastMath.pow(avgColorLinear[2], 1 / Scene.DEFAULT_GAMMA), avgColorLinear[3]); - } - - /** - * Get linear color values. - */ - public void getColor(double u, double v, Vector4 c) { - c.set(getColor(u, v)); - } - - /** - * Get linear color values. - * - * @param ray ray to store color value in. - */ - public void getColor(Ray ray) { - getColor(ray.u, ray.v, ray.color); - } - - /** - * Get linear color values. - * - * @return color - */ - public float[] getColor(double u, double v) { - return getColor((int) (u * width - Ray.EPSILON), (int) ((1 - v) * height - Ray.EPSILON)); - } - - /** - * Get linear color values - * - * @return color - */ - public float[] getColor(int x, int y) { - if(useAverageColor) - return avgColorFlat; - float[] result = new float[4]; - ColorUtil.getRGBAComponentsGammaCorrected(image.data[width*y + x], result); - return result; - } - - /** - * Get bilinear interpolated color value. - */ - public void getColorInterpolated(double u, double v, Vector4 c) { - - double x = u * (width - 1); - double y = (1 - v) * (height - 1); - double weight; - int fx = (int) QuickMath.floor(x); - int cx = (int) QuickMath.ceil(x); - int fy = (int) QuickMath.floor(y); - int cy = (int) QuickMath.ceil(y); - - float[] rgb = getColor(fx, fy); - weight = (1 - (y - fy)) * (1 - (x - fx)); - c.x = weight * rgb[0]; - c.y = weight * rgb[1]; - c.z = weight * rgb[2]; - rgb = getColor(cx, fy); - weight = (1 - (y - fy)) * (1 - (cx - x)); - c.x += weight * rgb[0]; - c.y += weight * rgb[1]; - c.z += weight * rgb[2]; - rgb = getColor(fx, cy); - weight = (1 - (cy - y)) * (1 - (x - fx)); - c.x += weight * rgb[0]; - c.y += weight * rgb[1]; - c.z += weight * rgb[2]; - rgb = getColor(cx, cy); - weight = (1 - (cy - y)) * (1 - (cx - x)); - c.x += weight * rgb[0]; - c.y += weight * rgb[1]; - c.z += weight * rgb[2]; - } - - public int getColorWrapped(int u, int v) { - return image.getPixel((u + width) % width, (v + height) % height); - } - - /** - * @return The average color of this texture - */ - public int getAvgColor() { - return avgColor; - } - - /** - * Get the average linear color of this texture - */ - public void getAvgColorLinear(Vector4 c) { - c.set(avgColorLinear); - } - - /** - * @return The average color of this texture - */ - public float[] getAvgColorLinear() { - return avgColorLinear; - } - /** - * @return The average flat color of this texture - */ - public float[] getAvgColorFlat() { - return avgColorFlat; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - /** - * @return {@code true} if this is the dedicated empty texture - */ - public boolean isEmptyTexture() { - return false; - } - - public Image fxImage() { - if (fxImage == null) { - fxImage = FxImageUtil.toFxImage(image); - } - return fxImage; - } - - /** Access the raw image data for this texture. */ - public int[] getData() { - return image.data; - } - - public BitmapImage getBitmap() { - return image; - } - - public static void setUseAverageColor(boolean useAverageColor) { - Texture.useAverageColor = useAverageColor; - } + private Texture() {} } diff --git a/chunky/src/java/se/llbit/chunky/resources/TextureCache.java b/chunky/src/java/se/llbit/chunky/resources/TextureCache.java index 1a8a0e593f..f664ebf6dc 100644 --- a/chunky/src/java/se/llbit/chunky/resources/TextureCache.java +++ b/chunky/src/java/se/llbit/chunky/resources/TextureCache.java @@ -16,6 +16,8 @@ */ package se.llbit.chunky.resources; +import se.llbit.chunky.resources.texture.BitmapTexture; + import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; @@ -25,13 +27,13 @@ */ public class TextureCache { - private static Map map = Collections.synchronizedMap(new WeakHashMap<>()); + private static Map map = Collections.synchronizedMap(new WeakHashMap<>()); - public static Texture get(Object key) { + public static BitmapTexture get(Object key) { return map.get(key); } - public static Texture put(Object key, Texture texture) { + public static BitmapTexture put(Object key, BitmapTexture texture) { return map.put(key, texture); } diff --git a/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java b/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java index f772e33ca5..356f70c668 100644 --- a/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java @@ -18,6 +18,7 @@ import se.llbit.chunky.renderer.scene.PlayerModel; import se.llbit.chunky.renderer.scene.sky.Sun; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.chunky.resources.texturepack.*; import java.lang.reflect.Field; @@ -3651,18 +3652,18 @@ private static void addTextureLoader(Field textureField) { TexturePath path = textureField.getAnnotation(TexturePath.class); if (path != null) { try { - addSimpleTexture(path.value(), (Texture) textureField.get(Texture.class)); + addSimpleTexture(path.value(), (BitmapTexture) textureField.get(BitmapTexture.class)); } catch (IllegalAccessException e) { throw new RuntimeException("Could not get texture field for " + path.value(), e); } } } - private static void addSimpleTexture(String file, Texture texture) { + private static void addSimpleTexture(String file, BitmapTexture texture) { addSimpleTexture(file, file, texture); } - private static void addSimpleTexture(String name, String file, Texture texture) { + private static void addSimpleTexture(String name, String file, BitmapTexture texture) { ALL_TEXTURES.put(name, new SimpleTexture(file, texture)); } } diff --git a/chunky/src/java/se/llbit/chunky/resources/AbstractHdriTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractHdriTexture.java similarity index 79% rename from chunky/src/java/se/llbit/chunky/resources/AbstractHdriTexture.java rename to chunky/src/java/se/llbit/chunky/resources/texture/AbstractHdriTexture.java index 1e319b0504..5ff3b0bde3 100644 --- a/chunky/src/java/se/llbit/chunky/resources/AbstractHdriTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractHdriTexture.java @@ -14,13 +14,44 @@ * You should have received a copy of the GNU General Public License * along with Chunky. If not, see . */ -package se.llbit.chunky.resources; +package se.llbit.chunky.resources.texture; import se.llbit.math.Vector4; -public class AbstractHdriTexture extends Texture { +public class AbstractHdriTexture extends AbstractTexture { + protected int width; + protected int height; + private final float[] avgColor = new float[] {0, 0, 0, 1}; + public float[] buf; + public AbstractHdriTexture() { + this.followAverageColor = false; + } + + @Override + public int getWidth() { + return width; + } + + @Override + public int getHeight() { + return height; + } + + @Override + public float[] getTextureColor(int x, int y) { + float[] result = new float[4]; + System.arraycopy(buf, (y*width + x)*3, result, 0, 3); + result[4] = 1; + return result; + } + + @Override + public float[] getAvgColorLinear() { + return avgColor; + } + @Override public void getColorInterpolated(double u, double v, Vector4 sample) { double x = width * u; double y = height * v; diff --git a/chunky/src/java/se/llbit/chunky/resources/texture/AbstractNonlinearTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractNonlinearTexture.java new file mode 100644 index 0000000000..9cd5d48934 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractNonlinearTexture.java @@ -0,0 +1,48 @@ +package se.llbit.chunky.resources.texture; + +import se.llbit.math.ColorUtil; +import se.llbit.math.Vector4; + +public abstract class AbstractNonlinearTexture extends AbstractTexture { + /** + * Get the width of the texture. + */ + @Override + public abstract int getWidth(); + + /** + * Get the height of the texture. + */ + @Override + public abstract int getHeight(); + + /** + * @return The average linear color of this texture + */ + @Override + public abstract float[] getAvgColorLinear(); + + /** + * Get the average non-linear color of this texture. + */ + @Override + public abstract int getAvgColor(); + + /** + * @return Get the non-linear color at the given texture coordinate. + */ + @Override + public abstract int getTextureColorI(int x, int y); + + @Override + public float[] getTextureColor(int x, int y) { + float[] result = new float[4]; + ColorUtil.getRGBAComponentsGammaCorrected(this.getTextureColorI(x, y), result); + return result; + } + + @Override + public void getTextureColor(int x, int y, Vector4 color) { + ColorUtil.getRGBAComponentsGammaCorrected(this.getTextureColorI(x, y), color); + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/texture/AbstractTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractTexture.java new file mode 100644 index 0000000000..d171aac8b0 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/resources/texture/AbstractTexture.java @@ -0,0 +1,203 @@ +package se.llbit.chunky.resources.texture; + +import javafx.scene.image.Image; +import se.llbit.chunky.PersistentSettings; +import se.llbit.chunky.plugin.PluginApi; +import se.llbit.chunky.resources.BitmapImage; +import se.llbit.fxutil.FxImageUtil; +import se.llbit.math.ColorUtil; +import se.llbit.math.QuickMath; +import se.llbit.math.Ray; +import se.llbit.math.Vector4; + + +public abstract class AbstractTexture { + /** Should the average color be used? */ + public static boolean useAverageColor = PersistentSettings.getSingleColorTextures(); + + /** True if {@code useAverageColor} should be respected */ + protected boolean followAverageColor = true; + + /** + * Get the width of the texture. + */ + public abstract int getWidth(); + + /** + * Get the height of the texture. + */ + public abstract int getHeight(); + + /** + * Get the linear color at the given texture coordinate. This should never return the average color. + * @return The RGBA color + */ + public abstract float[] getTextureColor(int x, int y); + + /** + * Get the average linear color of this texture. + * @return The RGBA color + */ + public abstract float[] getAvgColorLinear(); + + /** + * Get the average non-linear color of this texture. It is recommended + * to override this with a more efficient implementation. + * @return The average non-linear color + */ + public int getAvgColor() { + return ColorUtil.ArgbFromLinear(this.getAvgColorLinear()); + } + + /** + * Get the linear color at the given texture coordinate. This should never return the average color. + * It is recommended to override this with a more efficient implementation. + * @param color The vector to store the resulting color in + */ + public void getTextureColor(int x, int y, Vector4 color) { + color.set(this.getTextureColor(x, y)); + } + + /** + * Get the non-linear color at the given texture coordinate. It is recommended + * to override this with a more efficient implementation. + * + * @return The ARGB color + */ + public int getTextureColorI(int x, int y) { + return ColorUtil.ArgbFromLinear(this.getTextureColor(x, y)); + } + + + + /** + * Get the linear color at the given texture coordinate + */ + public void getColor(int x, int y, Vector4 color) { + if (AbstractTexture.useAverageColor && this.followAverageColor) { + color.set(this.getAvgColorLinear()); + } else { + getTextureColor(x, y, color); + } + } + + /** + * Get the linear color at the given texture coordinate + */ + public float[] getColor(int x, int y) { + if (AbstractTexture.useAverageColor && this.followAverageColor) { + return this.getAvgColorLinear(); + } else { + return getTextureColor(x, y); + } + } + + /** + * Get the linear color at the given UV coordinate + */ + public void getColor(double u, double v, Vector4 color) { + int x = (int) (u * this.getWidth() - Ray.EPSILON); + int y = (int) ((1 - v) * this.getHeight() - Ray.EPSILON); + this.getColor(x, y, color); + } + + /** + * Get the linear color value at the given UV coordinate + * @return The RGBA color + */ + public float[] getColor(double u, double v) { + int x = (int) (u * this.getWidth() - Ray.EPSILON); + int y = (int) ((1 - v) * this.getHeight() - Ray.EPSILON); + return this.getColor(x, y); + } + + /** + * Get the linear color at the ray's UV coordinate and store the value in the ray. + */ + public void getColor(Ray ray) { + getColor(ray.u, ray.v, ray.color); + } + + /** + * Get the non-linear color at the given texture coordinate, wrapping the texture. + * This will never return the average color. + * + * @return The ARGB color + */ + public int getColorWrapped(int x, int y) { + x = (x + this.getWidth()) % this.getWidth(); + y = (y + this.getHeight()) % this.getHeight(); + return getTextureColorI(x, y); + } + + /** + * Get bilinear interpolated color value. + */ + public void getColorInterpolated(double u, double v, Vector4 c) { + double x = u * (this.getWidth() - 1); + double y = (1 - v) * (this.getHeight() - 1); + double weight; + float[] rgb; + int fx = (int) QuickMath.floor(x); + int cx = (int) QuickMath.ceil(x); + int fy = (int) QuickMath.floor(y); + int cy = (int) QuickMath.ceil(y); + + rgb = this.getColor(fx, fy); + weight = (1 - (y - fy)) * (1 - (x - fx)); + c.x = weight * rgb[0]; + c.y = weight * rgb[1]; + c.z = weight * rgb[2]; + rgb = this.getColor(cx, fy); + weight = (1 - (y - fy)) * (1 - (cx - x)); + c.x += weight * rgb[0]; + c.y += weight * rgb[1]; + c.z += weight * rgb[2]; + rgb = this.getColor(fx, cy); + weight = (1 - (cy - y)) * (1 - (x - fx)); + c.x += weight * rgb[0]; + c.y += weight * rgb[1]; + c.z += weight * rgb[2]; + rgb = this.getColor(cx, cy); + weight = (1 - (cy - y)) * (1 - (cx - x)); + c.x += weight * rgb[0]; + c.y += weight * rgb[1]; + c.z += weight * rgb[2]; + } + + /** + * Export the current texture as a bitmap image. + */ + @PluginApi + public BitmapImage getBitmap() { + BitmapImage img = new BitmapImage(this.getWidth(), this.getHeight()); + for (int x = 0; x < img.width; x++) { + for (int y = 0; y < img.height; y++) { + img.setPixel(x, y, this.getTextureColorI(x, y)); + } + } + return img; + } + + /** + * Transform this texture into a JavaFX image. Warning: This will cache the + * image on first use. The cached image can be purged by calling {@code clearFxImage} + */ + public Image fxImage() { + Image img = fxImage; + if (img == null) { + img = FxImageUtil.toFxImage(this.getBitmap()); + fxImage = img; + } + return img; + } + + /** + * Clear the cached JavaFX image. + */ + public void clearFxImage() { + fxImage = null; + } + + protected Image fxImage = null; +} diff --git a/chunky/src/java/se/llbit/chunky/resources/AnimatedTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/AnimatedTexture.java similarity index 92% rename from chunky/src/java/se/llbit/chunky/resources/AnimatedTexture.java rename to chunky/src/java/se/llbit/chunky/resources/texture/AnimatedTexture.java index 2c98c8d4f3..3a026c452b 100644 --- a/chunky/src/java/se/llbit/chunky/resources/AnimatedTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texture/AnimatedTexture.java @@ -14,8 +14,9 @@ * You should have received a copy of the GNU General Public License * along with Chunky. If not, see . */ -package se.llbit.chunky.resources; +package se.llbit.chunky.resources.texture; +import se.llbit.chunky.resources.BitmapImage; import se.llbit.math.Ray; /** @@ -23,7 +24,7 @@ * * @author Jesper Öqvist */ -public class AnimatedTexture extends Texture { +public class AnimatedTexture extends BitmapTexture { protected int numFrames = 1; protected int frameHeight = 0; diff --git a/chunky/src/java/se/llbit/chunky/resources/texture/BitmapTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/BitmapTexture.java new file mode 100644 index 0000000000..bbe90bb130 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/resources/texture/BitmapTexture.java @@ -0,0 +1,96 @@ +package se.llbit.chunky.resources.texture; + +import org.apache.commons.math3.util.FastMath; +import se.llbit.chunky.renderer.scene.Scene; +import se.llbit.chunky.resources.BitmapImage; +import se.llbit.math.ColorUtil; +import se.llbit.resources.ImageLoader; +import se.llbit.util.annotation.NotNull; + +public class BitmapTexture extends AbstractNonlinearTexture { + @NotNull protected BitmapImage image; + protected int width; + protected int height; + protected int avgColor; + protected float[] avgColorLinear; + + public BitmapTexture() { + this(ImageLoader.missingImage); + } + + public BitmapTexture(String resourceName) { + this(ImageLoader.readResourceNonNull("textures/" + resourceName + ".png")); + } + + public BitmapTexture(BitmapImage img) { + this.setTexture(img); + } + + public void setTexture(AbstractTexture texture) { + this.setTexture(texture.getBitmap()); + } + + public void setTexture(BitmapImage newImage) { + image = newImage; + + // Gamma correct the texture. + avgColorLinear = new float[] {0, 0, 0, 0}; + + int[] data = image.data; + width = image.width; + height = image.height; + float[] pixelBuffer = new float[4]; + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + int index = width * y + x; + ColorUtil.getRGBAComponentsGammaCorrected(data[index], pixelBuffer); + avgColorLinear[0] += pixelBuffer[3] * pixelBuffer[0]; + avgColorLinear[1] += pixelBuffer[3] * pixelBuffer[1]; + avgColorLinear[2] += pixelBuffer[3] * pixelBuffer[2]; + avgColorLinear[3] += pixelBuffer[3]; + } + } + +// avgColorFlat = new float[4]; +// if (avgColorLinear[3] > 0.001) { +// avgColorFlat[0] = avgColorLinear[0] / avgColorLinear[3]; +// avgColorFlat[1] = avgColorLinear[1] / avgColorLinear[3]; +// avgColorFlat[2] = avgColorLinear[2] / avgColorLinear[3]; +// avgColorFlat[3] = 1; +// } + + avgColorLinear[0] /= width * height; + avgColorLinear[1] /= width * height; + avgColorLinear[2] /= width * height; + avgColorLinear[3] /= width * height; + + avgColor = ColorUtil.getArgb(FastMath.pow(avgColorLinear[0], 1 / Scene.DEFAULT_GAMMA), + FastMath.pow(avgColorLinear[1], 1 / Scene.DEFAULT_GAMMA), + FastMath.pow(avgColorLinear[2], 1 / Scene.DEFAULT_GAMMA), avgColorLinear[3]); + } + + @Override + public int getWidth() { + return image.width; + } + + @Override + public int getHeight() { + return image.height; + } + + @Override + public float[] getAvgColorLinear() { + return avgColorLinear; + } + + @Override + public int getAvgColor() { + return avgColor; + } + + @Override + public int getTextureColorI(int x, int y) { + return image.data[width*y + x]; + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/texture/EmptyTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/EmptyTexture.java new file mode 100644 index 0000000000..6469917100 --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/resources/texture/EmptyTexture.java @@ -0,0 +1,46 @@ +package se.llbit.chunky.resources.texture; + +import se.llbit.math.Vector4; + +public class EmptyTexture extends AbstractTexture { + public static final EmptyTexture INSTANCE = new EmptyTexture(); + + private final float[] zeros = new float[4]; + + private EmptyTexture() {} + + @Override + public int getWidth() { + return 1; + } + + @Override + public int getHeight() { + return 1; + } + + @Override + public float[] getTextureColor(int x, int y) { + return zeros; + } + + @Override + public float[] getAvgColorLinear() { + return zeros; + } + + @Override + public int getAvgColor() { + return 0; + } + + @Override + public int getTextureColorI(int x, int y) { + return 0; + } + + @Override + public void getColorInterpolated(double u, double v, Vector4 c) { + c.set(0, 0, 0, 0); + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/PFMTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/PFMTexture.java similarity index 98% rename from chunky/src/java/se/llbit/chunky/resources/PFMTexture.java rename to chunky/src/java/se/llbit/chunky/resources/texture/PFMTexture.java index 99af07e129..58d5aa84c6 100644 --- a/chunky/src/java/se/llbit/chunky/resources/PFMTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texture/PFMTexture.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with Chunky. If not, see . */ -package se.llbit.chunky.resources; +package se.llbit.chunky.resources.texture; import java.io.File; import java.io.FileInputStream; diff --git a/chunky/src/java/se/llbit/chunky/resources/texture/SolidColorTexture.java b/chunky/src/java/se/llbit/chunky/resources/texture/SolidColorTexture.java new file mode 100644 index 0000000000..57ed42c53b --- /dev/null +++ b/chunky/src/java/se/llbit/chunky/resources/texture/SolidColorTexture.java @@ -0,0 +1,49 @@ +package se.llbit.chunky.resources.texture; + +import se.llbit.math.ColorUtil; +import se.llbit.math.Vector4; + +public class SolidColorTexture extends AbstractTexture { + private final float[] value; + private final int valueI; + + public SolidColorTexture(float r, float g, float b, float a) { + this.value = new float[] {r, g, b, a}; + this.valueI = ColorUtil.ArgbFromLinear(this.value); + } + + @Override + public int getWidth() { + return 1; + } + + @Override + public int getHeight() { + return 1; + } + + @Override + public float[] getTextureColor(int x, int y) { + return value; + } + + @Override + public float[] getAvgColorLinear() { + return value; + } + + @Override + public int getAvgColor() { + return valueI; + } + + @Override + public int getTextureColorI(int x, int y) { + return valueI; + } + + @Override + public void getColorInterpolated(double u, double v, Vector4 c) { + c.set(value); + } +} diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/AnimatedTextureLoader.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/AnimatedTextureLoader.java index d707edc6bb..b7f66071f8 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/AnimatedTextureLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/AnimatedTextureLoader.java @@ -18,12 +18,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AnimatedTexture; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Animated texture loader. @@ -33,9 +32,9 @@ public class AnimatedTextureLoader extends TextureLoader { private final String file; - protected Texture texture; + protected AnimatedTexture texture; - public AnimatedTextureLoader(String file, Texture texture) { + public AnimatedTextureLoader(String file, AnimatedTexture texture) { this.file = file; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/BedTextureAdapter.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/BedTextureAdapter.java index 43471d78d0..09ffcf3190 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/BedTextureAdapter.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/BedTextureAdapter.java @@ -20,11 +20,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.log.Log; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * This texture loader is an adapter for the pre-1.12 bed textures. @@ -33,13 +33,13 @@ *

This texture loader is only used if a post-1.12 red bed texture is not found. */ public class BedTextureAdapter extends TextureLoader { - private final Texture bedHeadTop = new Texture(); - private final Texture bedFootTop = new Texture(); - private final Texture bedFootEnd = new Texture(); - private final Texture bedFootSide = new Texture(); - private final Texture bedHeadSide = new Texture(); - private final Texture bedHeadEnd = new Texture(); - private final Texture bottom = new Texture(); + private final BitmapTexture bedHeadTop = new BitmapTexture(); + private final BitmapTexture bedFootTop = new BitmapTexture(); + private final BitmapTexture bedFootEnd = new BitmapTexture(); + private final BitmapTexture bedFootSide = new BitmapTexture(); + private final BitmapTexture bedHeadSide = new BitmapTexture(); + private final BitmapTexture bedHeadEnd = new BitmapTexture(); + private final BitmapTexture bottom = new BitmapTexture(); private final AlternateTextures bottomLoader; private final AlternateTextures footTopLoader; private final AlternateTextures headTopLoader; @@ -196,7 +196,7 @@ public BedTextureAdapter() { * Ensures that the bed texture part has the right dimensions. * @return {@code true} if the texture has the correct size */ - private boolean checkSize(Texture texture, int scale) { + private boolean checkSize(BitmapTexture texture, int scale) { if (texture.getWidth() != 16 * scale) { Log.warnf("Bed texture has wrong scale: expected %d, but was %d.", 16 * scale, texture.getWidth()); diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/ChestTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/ChestTexture.java index bf238c27c7..b604c02dbe 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/ChestTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/ChestTexture.java @@ -18,10 +18,9 @@ import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; /** @author Jesper Öqvist */ @@ -33,36 +32,36 @@ public enum Layout { private final String file; private Layout layout; - private final Texture lock; - private final Texture top; - private final Texture bottom; - private final Texture left; - private final Texture right; - private final Texture front; - private final Texture back; + private final BitmapTexture lock; + private final BitmapTexture top; + private final BitmapTexture bottom; + private final BitmapTexture left; + private final BitmapTexture right; + private final BitmapTexture front; + private final BitmapTexture back; public ChestTexture( String file, - Texture lock, - Texture top, - Texture bottom, - Texture left, - Texture right, - Texture front, - Texture back) { + BitmapTexture lock, + BitmapTexture top, + BitmapTexture bottom, + BitmapTexture left, + BitmapTexture right, + BitmapTexture front, + BitmapTexture back) { this(file, Layout.OLD_LAYOUT, lock, top, bottom, left, right, front, back); } public ChestTexture( String file, Layout layout, - Texture lock, - Texture top, - Texture bottom, - Texture left, - Texture right, - Texture front, - Texture back) { + BitmapTexture lock, + BitmapTexture top, + BitmapTexture bottom, + BitmapTexture left, + BitmapTexture right, + BitmapTexture front, + BitmapTexture back) { this.file = file; this.layout = layout; this.lock = lock; diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/ColoredTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/ColoredTexture.java index f9531c4704..51058678da 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/ColoredTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/ColoredTexture.java @@ -19,13 +19,12 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.math.ColorUtil; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; import java.util.Arrays; /** @@ -36,9 +35,9 @@ public class ColoredTexture extends TextureLoader { private final String textureName; private final float[] color = new float[4]; - private final Texture texture; + private final BitmapTexture texture; - public ColoredTexture(String textureName, int color, Texture texture) { + public ColoredTexture(String textureName, int color, BitmapTexture texture) { this.textureName = textureName; this.texture = texture; ColorUtil.getRGBAComponents(color, this.color); diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/IndexedTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/IndexedTexture.java index e8da617cce..908c6d956e 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/IndexedTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/IndexedTexture.java @@ -18,11 +18,10 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * A texture indexed by position in Minecraft's old terrain.png. @@ -35,13 +34,13 @@ public class IndexedTexture extends TextureLoader { private final int index; - private final Texture texture; + private final BitmapTexture texture; /** * @param index Index of the texture in the terrain file * @param texture The loaded image is written to this texture */ - public IndexedTexture(int index, Texture texture) { + public IndexedTexture(int index, BitmapTexture texture) { this.index = index; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/LargeChestTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/LargeChestTexture.java index 6976840efd..36d87b85b4 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/LargeChestTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/LargeChestTexture.java @@ -18,38 +18,37 @@ import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; /** @author Jesper Öqvist */ public class LargeChestTexture extends TextureLoader { private final String file; - private final Texture left; - private final Texture topLeft; - private final Texture topRight; - private final Texture frontLeft; - private final Texture frontRight; - private final Texture bottomLeft; - private final Texture right; - private final Texture bottomRight; - private final Texture backLeft; - private final Texture backRight; + private final BitmapTexture left; + private final BitmapTexture topLeft; + private final BitmapTexture topRight; + private final BitmapTexture frontLeft; + private final BitmapTexture frontRight; + private final BitmapTexture bottomLeft; + private final BitmapTexture right; + private final BitmapTexture bottomRight; + private final BitmapTexture backLeft; + private final BitmapTexture backRight; public LargeChestTexture( String file, - Texture left, - Texture right, - Texture topLeft, - Texture topRight, - Texture frontLeft, - Texture frontRight, - Texture bottomLeft, - Texture bottomRight, - Texture backLeft, - Texture backRight) { + BitmapTexture left, + BitmapTexture right, + BitmapTexture topLeft, + BitmapTexture topRight, + BitmapTexture frontLeft, + BitmapTexture frontRight, + BitmapTexture bottomLeft, + BitmapTexture bottomRight, + BitmapTexture backLeft, + BitmapTexture backRight) { this.file = file; this.left = left; this.right = right; diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/LayeredTextureLoader.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/LayeredTextureLoader.java index ccaf350eaa..9b486e8945 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/LayeredTextureLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/LayeredTextureLoader.java @@ -19,13 +19,12 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.log.Log; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Loads two textures and overlays them on top of each other. @@ -35,9 +34,9 @@ public class LayeredTextureLoader extends TextureLoader { private final TextureLoader baseTexture; private final String textureName; - private final Texture texture; + private final BitmapTexture texture; - public LayeredTextureLoader(String file, Texture texture, + public LayeredTextureLoader(String file, BitmapTexture texture, TextureLoader baseTextureLoader) { this.textureName = file; this.texture = texture; diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingBackTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingBackTexture.java index 88ee0f36e0..c9e12949d6 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingBackTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingBackTexture.java @@ -20,11 +20,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Texture loader for the 1.14+ painting back texture. @@ -37,9 +37,9 @@ public class PaintingBackTexture extends TextureLoader { public final String file; - protected Texture texture; + protected BitmapTexture texture; - public PaintingBackTexture(String file, Texture texture) { + public PaintingBackTexture(String file, BitmapTexture texture) { this.file = file; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTexture.java index 84bc5bd9ec..f4d918531f 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTexture.java @@ -19,12 +19,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Non-animated texture loader for painting textures (which are not squares). @@ -32,9 +31,9 @@ public class PaintingTexture extends TextureLoader { public final String file; - protected Texture texture; + protected BitmapTexture texture; - public PaintingTexture(String file, Texture texture) { + public PaintingTexture(String file, BitmapTexture texture) { this.file = file; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTextureAdapter.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTextureAdapter.java index 5019e208e1..3a56f26275 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTextureAdapter.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/PaintingTextureAdapter.java @@ -20,10 +20,10 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * This texture loader is an adapter for the pre-1.14 painting textures. It splits the pre-1.14 @@ -74,7 +74,7 @@ protected boolean load(InputStream imageStream) throws IOException, TextureForma return false; } - private static class PaintingsAtlas extends Texture { + private static class PaintingsAtlas extends BitmapTexture { public BitmapImage getPainting(int px0, int px1, int py0, int py1) { BitmapImage painting = new BitmapImage(px1 - px0, py1 - py0); diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/RotatedTextureLoader.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/RotatedTextureLoader.java index 66cc750c16..84c6cc72a0 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/RotatedTextureLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/RotatedTextureLoader.java @@ -18,11 +18,10 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Loads a single texture and rotates it 90 degrees clockwise and @@ -32,9 +31,9 @@ */ public class RotatedTextureLoader extends TextureLoader { protected TextureLoader loader; - protected Texture texture; + protected BitmapTexture texture; - public RotatedTextureLoader(String file, Texture texture) { + public RotatedTextureLoader(String file, BitmapTexture texture) { this.texture = texture; loader = new SimpleTexture(file, texture); } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/SimpleTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/SimpleTexture.java index a5bea517ea..5641adfa09 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/SimpleTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/SimpleTexture.java @@ -18,12 +18,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; /** * Non-animated texture loader. @@ -33,9 +32,9 @@ public class SimpleTexture extends TextureLoader { public final String file; - protected Texture texture; + protected BitmapTexture texture; - public SimpleTexture(String file, Texture texture) { + public SimpleTexture(String file, BitmapTexture texture) { this.file = file; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/resources/texturepack/SplitLargeChestTexture.java b/chunky/src/java/se/llbit/chunky/resources/texturepack/SplitLargeChestTexture.java index d680715a4a..4e8201b788 100644 --- a/chunky/src/java/se/llbit/chunky/resources/texturepack/SplitLargeChestTexture.java +++ b/chunky/src/java/se/llbit/chunky/resources/texturepack/SplitLargeChestTexture.java @@ -18,12 +18,11 @@ import se.llbit.chunky.resources.BitmapImage; import se.llbit.chunky.resources.LayeredResourcePacks; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; import java.io.IOException; import java.io.InputStream; -import java.nio.file.Path; public class SplitLargeChestTexture extends TextureLoader { public enum Part { @@ -33,22 +32,22 @@ public enum Part { private final String file; private final Part part; - private final Texture left; - private final Texture top; - private final Texture right; - private final Texture bottom; - private final Texture front; - private final Texture back; + private final BitmapTexture left; + private final BitmapTexture top; + private final BitmapTexture right; + private final BitmapTexture bottom; + private final BitmapTexture front; + private final BitmapTexture back; public SplitLargeChestTexture( String file, Part part, - Texture top, - Texture bottom, - Texture left, - Texture right, - Texture front, - Texture back) { + BitmapTexture top, + BitmapTexture bottom, + BitmapTexture left, + BitmapTexture right, + BitmapTexture front, + BitmapTexture back) { this.file = file; this.part = part; this.top = top; diff --git a/chunky/src/java/se/llbit/chunky/ui/render/tabs/TexturesTab.java b/chunky/src/java/se/llbit/chunky/ui/render/tabs/TexturesTab.java index 5ed9bfb79e..8d2f0ea737 100644 --- a/chunky/src/java/se/llbit/chunky/ui/render/tabs/TexturesTab.java +++ b/chunky/src/java/se/llbit/chunky/ui/render/tabs/TexturesTab.java @@ -33,7 +33,7 @@ import se.llbit.chunky.renderer.RenderController; import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.renderer.scene.SceneManager; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.ui.IntegerAdjuster; import se.llbit.chunky.ui.controller.RenderControlsFxController; import se.llbit.chunky.ui.dialogs.ResourcePackChooser; @@ -88,7 +88,7 @@ public void initialize(URL location, ResourceBundle resources) { singleColorBtn.selectedProperty().addListener((observable, oldValue, newValue) -> { Scene scene = sceneManager.getScene(); PersistentSettings.setSingleColorTextures(newValue); - Texture.setUseAverageColor(newValue); + AbstractTexture.useAverageColor = newValue; scene.refresh(); scene.rebuildBvh(); }); diff --git a/chunky/src/java/se/llbit/chunky/world/Icon.java b/chunky/src/java/se/llbit/chunky/world/Icon.java index 968386aae6..c361649bd1 100644 --- a/chunky/src/java/se/llbit/chunky/world/Icon.java +++ b/chunky/src/java/se/llbit/chunky/world/Icon.java @@ -17,7 +17,7 @@ package se.llbit.chunky.world; import se.llbit.chunky.resources.BitmapImage; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.resources.ImageLoader; /** @@ -25,7 +25,7 @@ * * @author Jesper Öqvist */ -public class Icon extends Texture { +public class Icon extends BitmapTexture { public static final Icon bed = new Icon("bed"); public static final Icon cake = new Icon("cake"); public static final Icon fence = new Icon("fence"); @@ -71,10 +71,10 @@ public class Icon extends Texture { public static final Icon question = new Icon("question"); public static final Icon eye = new Icon("eye"); public static final Icon scale = new Icon("scale"); - public static final Texture grass = new Texture("grass-side-saturated"); - public static final Texture netherrack = new Texture("netherrack"); - public static final Texture endStone = new Texture("end-stone"); - public static final Texture failed = new Icon("failed"); + public static final BitmapTexture grass = new BitmapTexture("grass-side-saturated"); + public static final BitmapTexture netherrack = new BitmapTexture("netherrack"); + public static final BitmapTexture endStone = new BitmapTexture("end-stone"); + public static final BitmapTexture failed = new Icon("failed"); public static final Icon face = new Icon("face"); public static final Icon player = new Icon("player"); diff --git a/chunky/src/java/se/llbit/chunky/world/Material.java b/chunky/src/java/se/llbit/chunky/world/Material.java index 572af56774..086a67faee 100644 --- a/chunky/src/java/se/llbit/chunky/world/Material.java +++ b/chunky/src/java/se/llbit/chunky/world/Material.java @@ -16,7 +16,7 @@ */ package se.llbit.chunky.world; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.json.JsonObject; import se.llbit.json.JsonString; import se.llbit.json.JsonValue; @@ -83,13 +83,13 @@ public abstract class Material { /** * Base texture. */ - public final Texture texture; + public final AbstractTexture texture; public boolean refractive = false; public boolean waterlogged = false; - public Material(String name, Texture texture) { + public Material(String name, AbstractTexture texture) { this.name = name; this.texture = texture; } diff --git a/chunky/src/java/se/llbit/chunky/world/SkymapTexture.java b/chunky/src/java/se/llbit/chunky/world/SkymapTexture.java index 4b2500a901..5b4c663742 100644 --- a/chunky/src/java/se/llbit/chunky/world/SkymapTexture.java +++ b/chunky/src/java/se/llbit/chunky/world/SkymapTexture.java @@ -19,7 +19,7 @@ import org.apache.commons.math3.util.FastMath; import se.llbit.chunky.renderer.scene.Scene; import se.llbit.chunky.resources.BitmapImage; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.log.Log; import se.llbit.math.ColorUtil; import se.llbit.math.QuickMath; @@ -33,7 +33,7 @@ * * @author Jesper Öqvist (jesper@llbit.se) */ -public class SkymapTexture extends Texture { +public class SkymapTexture extends BitmapTexture { class TexturePreprocessor extends Thread { private final int x0; @@ -188,10 +188,6 @@ public void getColor(int x, int y, Vector4 c) { throw new UnsupportedOperationException(); } - @Override public void getAvgColorLinear(Vector4 c) { - throw new UnsupportedOperationException(); - } - @Override public int getWidth() { return super.getWidth(); } diff --git a/chunky/src/java/se/llbit/chunky/world/material/TextureMaterial.java b/chunky/src/java/se/llbit/chunky/world/material/TextureMaterial.java index 1356fbf886..bc4e90a950 100644 --- a/chunky/src/java/se/llbit/chunky/world/material/TextureMaterial.java +++ b/chunky/src/java/se/llbit/chunky/world/material/TextureMaterial.java @@ -16,12 +16,12 @@ */ package se.llbit.chunky.world.material; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; public class TextureMaterial extends Material { - public TextureMaterial(Texture texture) { + public TextureMaterial(AbstractTexture texture) { super("texture", texture); if (texture == null) { diff --git a/chunky/src/java/se/llbit/chunky/world/model/CubeModel.java b/chunky/src/java/se/llbit/chunky/world/model/CubeModel.java index af730a6ed9..a0625306ca 100644 --- a/chunky/src/java/se/llbit/chunky/world/model/CubeModel.java +++ b/chunky/src/java/se/llbit/chunky/world/model/CubeModel.java @@ -17,11 +17,8 @@ */ package se.llbit.chunky.world.model; -import se.llbit.chunky.resources.Texture; -import se.llbit.chunky.resources.TextureCache; -import se.llbit.chunky.resources.TexturePackLoader; -import se.llbit.chunky.resources.texturepack.SimpleTexture; -import se.llbit.chunky.resources.texturepack.TextureLoader; +import se.llbit.chunky.resources.texture.AbstractTexture; +import se.llbit.chunky.resources.texture.BitmapTexture; import se.llbit.log.Log; import se.llbit.math.Quad; import se.llbit.math.Ray; @@ -41,12 +38,12 @@ */ public class CubeModel { public Quad[] quads = new Quad[0]; - public Texture[] textures = new Texture[0]; + public AbstractTexture[] textures = new AbstractTexture[0]; public CubeModel() { } - public CubeModel(Collection cubes, double uvScale, Map textureMap) { + public CubeModel(Collection cubes, double uvScale, Map textureMap) { Collection theFaces = new ArrayList<>(); Collection theTextures = new ArrayList<>(); for (Cube cube : cubes) { @@ -135,13 +132,13 @@ public CubeModel(Collection cubes, double uvScale, Map te } } - textures = new Texture[theTextures.size()]; + textures = new AbstractTexture[theTextures.size()]; int index = 0; for (String texture : theTextures) { textures[index] = textureMap.get(texture); if (textures[index] == null) { Log.error("Missing texture in cube model."); - textures[index] = new Texture(); + textures[index] = new BitmapTexture(); } index += 1; } diff --git a/chunky/src/java/se/llbit/math/ColorUtil.java b/chunky/src/java/se/llbit/math/ColorUtil.java index 9d1d01ccd3..760da3298e 100644 --- a/chunky/src/java/se/llbit/math/ColorUtil.java +++ b/chunky/src/java/se/llbit/math/ColorUtil.java @@ -190,6 +190,16 @@ public static void getRGBAComponentsGammaCorrected(int argb, float[] components) components[2] = toLinearLut[(0xFF & argb)]; } + /** + * Get the RGBA color component gamma corrected from an ARGB int + */ + public static void getRGBAComponentsGammaCorrected(int argb, Vector4 components) { + components.w = (argb >>> 24) / 255.0f; + components.x = toLinearLut[(0xFF & (argb >> 16))]; + components.y = toLinearLut[(0xFF & (argb >> 8))]; + components.z = toLinearLut[(0xFF & argb)]; + } + /** * Wraps {@link ColorUtil#getRGBAComponentsGammaCorrected} creating a new float[4] */ @@ -391,6 +401,17 @@ public static void overlayColor(Vector4 target, Vector4 overlayColor) { target.w = alpha; } + /** + * Convert a linear RGBA color into a non-linear ARGB color + */ + public static int ArgbFromLinear(float[] linearColor) { + float r = ColorUtil.RGBComponentFromLinear(linearColor[0]); + float g = ColorUtil.RGBComponentFromLinear(linearColor[1]); + float b = ColorUtil.RGBComponentFromLinear(linearColor[2]); + float a = ColorUtil.RGBComponentFromLinear(linearColor[3]); + return ColorUtil.getArgb(r, g, b, a); + } + /** * Convert single color component from linear to non-linear (sRGB?) */ diff --git a/chunky/src/java/se/llbit/math/primitive/Box.java b/chunky/src/java/se/llbit/math/primitive/Box.java index 45bec12b62..46f41e48ce 100644 --- a/chunky/src/java/se/llbit/math/primitive/Box.java +++ b/chunky/src/java/se/llbit/math/primitive/Box.java @@ -18,7 +18,7 @@ import java.util.Collection; -import se.llbit.chunky.resources.Texture; +import se.llbit.chunky.resources.texture.AbstractTexture; import se.llbit.chunky.world.Material; import se.llbit.chunky.world.material.TextureMaterial; import se.llbit.math.AABB; @@ -85,7 +85,7 @@ public void transform(Transform t) { t.apply(c111); } - public void addFrontFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addFrontFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c000, c100, c010, new Vector2(uv.y, uv.z), new Vector2(uv.x, uv.z), @@ -95,7 +95,7 @@ public void addFrontFaces(Collection primitives, Texture texture, Vec new Vector2(uv.y, uv.w), material)); } - public void addBackFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addBackFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c101, c001, c111, new Vector2(uv.x, uv.z), new Vector2(uv.y, uv.z), @@ -105,7 +105,7 @@ public void addBackFaces(Collection primitives, Texture texture, Vect new Vector2(uv.x, uv.w), material)); } - public void addLeftFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addLeftFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c001, c000, c011, new Vector2(uv.y, uv.z), new Vector2(uv.x, uv.z), @@ -115,7 +115,7 @@ public void addLeftFaces(Collection primitives, Texture texture, Vect new Vector2(uv.y, uv.w), material)); } - public void addRightFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addRightFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c100, c101, c110, new Vector2(uv.y, uv.z), new Vector2(uv.x, uv.z), @@ -125,7 +125,7 @@ public void addRightFaces(Collection primitives, Texture texture, Vec new Vector2(uv.y, uv.w), material)); } - public void addTopFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addTopFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c011, c110, c111, new Vector2(uv.y, uv.w), new Vector2(uv.x, uv.z), @@ -135,7 +135,7 @@ public void addTopFaces(Collection primitives, Texture texture, Vecto new Vector2(uv.x, uv.z), material)); } - public void addBottomFaces(Collection primitives, Texture texture, Vector4 uv) { + public void addBottomFaces(Collection primitives, AbstractTexture texture, Vector4 uv) { Material material = new TextureMaterial(texture); primitives.add( new TexturedTriangle(c000, c001, c100, new Vector2(uv.x, uv.z), new Vector2(uv.x, uv.w), diff --git a/chunky/src/test/se/llbit/chunky/resources/AnimatedTextureTest.java b/chunky/src/test/se/llbit/chunky/resources/texture/AnimatedTextureTest.java similarity index 96% rename from chunky/src/test/se/llbit/chunky/resources/AnimatedTextureTest.java rename to chunky/src/test/se/llbit/chunky/resources/texture/AnimatedTextureTest.java index 21fc570525..3899508bfd 100644 --- a/chunky/src/test/se/llbit/chunky/resources/AnimatedTextureTest.java +++ b/chunky/src/test/se/llbit/chunky/resources/texture/AnimatedTextureTest.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with Chunky. If not, see . */ -package se.llbit.chunky.resources; +package se.llbit.chunky.resources.texture; import org.junit.jupiter.api.Test;