From c7d3877129611b23162081385fea258b653bbbd3 Mon Sep 17 00:00:00 2001 From: yueh Date: Thu, 6 Aug 2020 20:07:40 +0200 Subject: [PATCH 01/10] Use the declared power drain for p2p tunnels (#4567) --- src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java | 5 +++++ src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java | 3 ++- src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java | 9 +++++---- src/main/java/appeng/parts/p2p/LightP2PTunnelPart.java | 8 ++++---- src/main/java/appeng/parts/p2p/MEP2PTunnelPart.java | 5 +++++ src/main/java/appeng/parts/p2p/P2PTunnelPart.java | 5 +++++ .../java/appeng/parts/p2p/RedstoneP2PTunnelPart.java | 9 +++++---- 7 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java index aedf5b8b3..a94579d25 100644 --- a/src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/FEP2PTunnelPart.java @@ -45,6 +45,11 @@ public class FEP2PTunnelPart extends P2PTunnelPart { super(is); } + @Override + protected float getPowerDrainPerTick() { + return 2.0f; + } + @PartModels public static List getModels() { return MODELS.getModels(); diff --git a/src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java index ff530ac21..33a31f57c 100644 --- a/src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/FluidP2PTunnelPart.java @@ -54,7 +54,8 @@ public class FluidP2PTunnelPart extends P2PTunnelPart { return MODELS.getModels(); } - public float getPowerDrainPerTick() { + @Override + protected float getPowerDrainPerTick() { return 2.0f; } diff --git a/src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java index c4454ac31..2c10edf7d 100644 --- a/src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/ItemP2PTunnelPart.java @@ -68,6 +68,11 @@ public class ItemP2PTunnelPart extends P2PTunnelPart implemen super(is); } + @Override + protected float getPowerDrainPerTick() { + return POWER_DRAIN; + } + @Override public void onNeighborChanged(IBlockReader w, BlockPos pos, BlockPos neighbor) { this.cachedInv = null; @@ -235,10 +240,6 @@ public class ItemP2PTunnelPart extends P2PTunnelPart implemen return this.getDestination().getSlotLimit(slot); } - public float getPowerDrainPerTick() { - return POWER_DRAIN; - } - @Override public IPartModel getStaticModels() { return MODELS.getModel(this.isPowered(), this.isActive()); diff --git a/src/main/java/appeng/parts/p2p/LightP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/LightP2PTunnelPart.java index da0ec7d5b..7b4134aaf 100644 --- a/src/main/java/appeng/parts/p2p/LightP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/LightP2PTunnelPart.java @@ -56,6 +56,10 @@ public class LightP2PTunnelPart extends P2PTunnelPart implem super(is); } + protected float getPowerDrainPerTick() { + return 0.5f; + } + @Override public void chanRender(final MENetworkChannelsChanged c) { this.onTunnelNetworkChange(); @@ -186,10 +190,6 @@ public class LightP2PTunnelPart extends P2PTunnelPart implem return this.doWork() ? TickRateModulation.URGENT : TickRateModulation.SLOWER; } - public float getPowerDrainPerTick() { - return 0.5f; - } - @Override public IPartModel getStaticModels() { return MODELS.getModel(this.isPowered(), this.isActive()); diff --git a/src/main/java/appeng/parts/p2p/MEP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/MEP2PTunnelPart.java index c6fe6e5fb..9edb3e01a 100644 --- a/src/main/java/appeng/parts/p2p/MEP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/MEP2PTunnelPart.java @@ -67,6 +67,11 @@ public class MEP2PTunnelPart extends P2PTunnelPart implements I this.outerProxy.setFlags(GridFlags.DENSE_CAPACITY, GridFlags.CANNOT_CARRY_COMPRESSED); } + @Override + protected float getPowerDrainPerTick() { + return 2.0f; + } + @Override public void readFromNBT(final CompoundNBT extra) { super.readFromNBT(extra); diff --git a/src/main/java/appeng/parts/p2p/P2PTunnelPart.java b/src/main/java/appeng/parts/p2p/P2PTunnelPart.java index a3e20416c..2a5b81166 100644 --- a/src/main/java/appeng/parts/p2p/P2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/P2PTunnelPart.java @@ -61,6 +61,11 @@ public abstract class P2PTunnelPart extends BasicStateP public P2PTunnelPart(final ItemStack is) { super(is); + this.getProxy().setIdlePowerUsage(this.getPowerDrainPerTick()); + } + + protected float getPowerDrainPerTick() { + return 1.0f; } public TunnelCollection getCollection(final Collection collection, diff --git a/src/main/java/appeng/parts/p2p/RedstoneP2PTunnelPart.java b/src/main/java/appeng/parts/p2p/RedstoneP2PTunnelPart.java index 28ab67696..b5734e922 100644 --- a/src/main/java/appeng/parts/p2p/RedstoneP2PTunnelPart.java +++ b/src/main/java/appeng/parts/p2p/RedstoneP2PTunnelPart.java @@ -55,6 +55,11 @@ public class RedstoneP2PTunnelPart extends P2PTunnelPart super(is); } + @Override + protected float getPowerDrainPerTick() { + return 0.5f; + } + @MENetworkEventSubscribe public void changeStateA(final MENetworkBootingStatusChange bs) { this.setNetworkReady(); @@ -123,10 +128,6 @@ public class RedstoneP2PTunnelPart extends P2PTunnelPart this.setNetworkReady(); } - public float getPowerDrainPerTick() { - return 0.5f; - } - @Override public void onNeighborChanged(IBlockReader w, BlockPos pos, BlockPos neighbor) { if (!this.isOutput()) { From 6f39bd8fe8608708e4dc15ce76e5e4d98905d8d0 Mon Sep 17 00:00:00 2001 From: shartte Date: Fri, 7 Aug 2020 23:13:02 +0200 Subject: [PATCH 02/10] Move the nether quartz dust tag to the forge namespace and use it instead of AE's internal one. (#4568) --- .../data/appliedenergistics2/recipes/misc/seeds_nether.json | 2 +- .../data/appliedenergistics2/recipes/smelting/silicon.json | 2 +- .../data/appliedenergistics2/tags/items/dusts/quartz.json | 5 +---- .../tags/items/dusts/quartz.json} | 0 4 files changed, 3 insertions(+), 6 deletions(-) rename src/main/resources/data/{appliedenergistics2/tags/items/dusts/nether_quartz.json => forge/tags/items/dusts/quartz.json} (100%) diff --git a/src/main/resources/data/appliedenergistics2/recipes/misc/seeds_nether.json b/src/main/resources/data/appliedenergistics2/recipes/misc/seeds_nether.json index 537fad5f4..e364aab18 100644 --- a/src/main/resources/data/appliedenergistics2/recipes/misc/seeds_nether.json +++ b/src/main/resources/data/appliedenergistics2/recipes/misc/seeds_nether.json @@ -9,7 +9,7 @@ "tag": "forge:sand" }, { - "tag": "appliedenergistics2:dusts/nether_quartz" + "tag": "forge:dusts/quartz" } ] } diff --git a/src/main/resources/data/appliedenergistics2/recipes/smelting/silicon.json b/src/main/resources/data/appliedenergistics2/recipes/smelting/silicon.json index 4c9f6e3be..4397319d1 100644 --- a/src/main/resources/data/appliedenergistics2/recipes/smelting/silicon.json +++ b/src/main/resources/data/appliedenergistics2/recipes/smelting/silicon.json @@ -5,7 +5,7 @@ }, "ingredient": [ { - "tag": "appliedenergistics2:dusts/nether_quartz" + "tag": "forge:dusts/quartz" }, { "tag": "appliedenergistics2:dusts/certus_quartz" diff --git a/src/main/resources/data/appliedenergistics2/tags/items/dusts/quartz.json b/src/main/resources/data/appliedenergistics2/tags/items/dusts/quartz.json index 1bace7a98..786903bce 100644 --- a/src/main/resources/data/appliedenergistics2/tags/items/dusts/quartz.json +++ b/src/main/resources/data/appliedenergistics2/tags/items/dusts/quartz.json @@ -1,6 +1,3 @@ { - "values": [ - "#appliedenergistics2:dusts/certus_quartz", - "#appliedenergistics2:dusts/nether_quartz" - ] + "values": ["#appliedenergistics2:dusts/certus_quartz", "#forge:dusts/quartz"] } diff --git a/src/main/resources/data/appliedenergistics2/tags/items/dusts/nether_quartz.json b/src/main/resources/data/forge/tags/items/dusts/quartz.json similarity index 100% rename from src/main/resources/data/appliedenergistics2/tags/items/dusts/nether_quartz.json rename to src/main/resources/data/forge/tags/items/dusts/quartz.json From 2fabab3a6a8d889a216559e770419e328037c4d6 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Sat, 8 Aug 2020 02:20:31 +0200 Subject: [PATCH 03/10] Fix AO lighting for faces not fully snapped to block edges. --- .../render/model/AutoRotatingBakedModel.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java b/src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java index f60d638c9..a2005da4a 100644 --- a/src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java +++ b/src/main/java/appeng/client/render/model/AutoRotatingBakedModel.java @@ -34,8 +34,6 @@ import com.google.common.collect.ImmutableList; import net.minecraft.block.BlockState; import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.client.renderer.model.ItemCameraTransforms; -import net.minecraft.client.renderer.model.ItemOverrideList; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormatElement; @@ -193,7 +191,7 @@ public class AutoRotatingBakedModel extends DelegateBakedModel { vec.setX(vec.getX() + 0.5f); vec.setY(vec.getY() + 0.5f); vec.setZ(vec.getZ() + 0.5f); - return new float[] { vec.getX(), vec.getY(), vec.getZ() }; + return new float[] { snap(vec.getX()), snap(vec.getY()), snap(vec.getZ()) }; case 4: Vector4f vecc = new Vector4f(fs[0], fs[1], fs[2], fs[3]); vecc.setX(vecc.getX() - 0.5f); @@ -203,13 +201,32 @@ public class AutoRotatingBakedModel extends DelegateBakedModel { vecc.setX(vecc.getX() + 0.5f); vecc.setY(vecc.getY() + 0.5f); vecc.setZ(vecc.getZ() + 0.5f); - return new float[] { vecc.getX(), vecc.getY(), vecc.getZ(), vecc.getW() }; + return new float[] { snap(vecc.getX()), snap(vecc.getY()), snap(vecc.getZ()), snap(vecc.getW()) }; default: return fs; } } + /** + * This is the same value used by Vanilla's AO lighter. + */ + private static final float EPS = 0.0001f; + + /** + * This tries to snap the coordinate to the edges of the block frame, because + * Vanilla uses direct equals comparisons to 0 and 1 for checking if a face + * extends fully towards the edge. This is used primarily for AO calculations. + */ + private static float snap(float x) { + if (Math.abs(x) <= EPS) { + return 0f; + } else if (Math.abs(x - 1) <= EPS) { + return 1f; + } + return x; + } + private float[] transformNormal(float[] fs) { if (this.face == null) { switch (fs.length) { @@ -220,7 +237,7 @@ public class AutoRotatingBakedModel extends DelegateBakedModel { case 4: Vector4f vec4 = new Vector4f(fs[0], fs[1], fs[2], fs[3]); vec4.transform(this.f2r.getMat()); - return new float[] { vec4.getX(), vec4.getY(), vec4.getZ(), 0 }; + return new float[] { snap(vec4.getX()), snap(vec4.getY()), snap(vec4.getZ()), 0 }; default: return fs; From fe753c540b6c7242d5ef72653cadfe9e9684f7e9 Mon Sep 17 00:00:00 2001 From: shartte Date: Sat, 8 Aug 2020 14:56:51 +0200 Subject: [PATCH 04/10] Fixes #4571: When not used for displaying localized text, specify Locale.ROOT for toLowerCase/toUpperCase to avoid issues with locale-specific non-ASCII lowercase conversions for ASCII uppercase characters (i.e. turkish lowercase i for uppercase I). (#4573) --- src/api/java/appeng/api/config/SecurityPermissions.java | 4 +++- src/main/java/appeng/block/networking/WirelessBlock.java | 4 +++- src/main/java/appeng/client/ActionKey.java | 4 +++- src/main/java/appeng/client/render/FacingToRotation.java | 4 +++- .../java/appeng/client/render/cablebus/CableBuilder.java | 3 ++- .../java/appeng/client/render/cablebus/CableCoreType.java | 3 ++- .../client/render/crafting/CraftingCubeModelLoader.java | 4 +++- .../appeng/client/render/effects/EnergyParticleData.java | 5 +++-- .../java/appeng/client/render/spatial/SpatialPylonModel.java | 3 ++- .../integration/modules/theoneprobe/TheOneProbeText.java | 2 +- src/main/java/appeng/server/AECommand.java | 4 +++- 11 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/api/java/appeng/api/config/SecurityPermissions.java b/src/api/java/appeng/api/config/SecurityPermissions.java index 4e595f1ad..0082ff30e 100644 --- a/src/api/java/appeng/api/config/SecurityPermissions.java +++ b/src/api/java/appeng/api/config/SecurityPermissions.java @@ -23,6 +23,8 @@ package appeng.api.config; +import java.util.Locale; + /** * Represent the security systems basic permissions, these are not for * anti-griefing, they are part of the mod as a gameplay feature. @@ -58,7 +60,7 @@ public enum SecurityPermissions { */ SECURITY; - private final String translationKey = "gui.appliedenergistics2.security." + this.name().toLowerCase(); + private final String translationKey = "gui.appliedenergistics2.security." + this.name().toLowerCase(Locale.ROOT); public String getTranslatedName() { return this.translationKey + ".name"; diff --git a/src/main/java/appeng/block/networking/WirelessBlock.java b/src/main/java/appeng/block/networking/WirelessBlock.java index f66b84161..79d0dc0de 100644 --- a/src/main/java/appeng/block/networking/WirelessBlock.java +++ b/src/main/java/appeng/block/networking/WirelessBlock.java @@ -18,6 +18,8 @@ package appeng.block.networking; +import java.util.Locale; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -51,7 +53,7 @@ public class WirelessBlock extends AEBaseTileBlock { @Override public String getString() { - return this.name().toLowerCase(); + return this.name().toLowerCase(Locale.ROOT); } } diff --git a/src/main/java/appeng/client/ActionKey.java b/src/main/java/appeng/client/ActionKey.java index fab4b96a6..49d43288c 100644 --- a/src/main/java/appeng/client/ActionKey.java +++ b/src/main/java/appeng/client/ActionKey.java @@ -1,6 +1,8 @@ package appeng.client; +import java.util.Locale; + import org.lwjgl.glfw.GLFW; public enum ActionKey { @@ -13,7 +15,7 @@ public enum ActionKey { } public String getTranslationKey() { - return "key." + this.name().toLowerCase() + ".desc"; + return "key." + this.name().toLowerCase(Locale.ROOT) + ".desc"; } public int getDefaultKey() { diff --git a/src/main/java/appeng/client/render/FacingToRotation.java b/src/main/java/appeng/client/render/FacingToRotation.java index a295ee9ba..d0dbce443 100644 --- a/src/main/java/appeng/client/render/FacingToRotation.java +++ b/src/main/java/appeng/client/render/FacingToRotation.java @@ -18,6 +18,8 @@ package appeng.client.render; +import java.util.Locale; + import com.mojang.blaze3d.matrix.MatrixStack; import net.minecraft.util.Direction; @@ -111,6 +113,6 @@ public enum FacingToRotation implements IStringSerializable { @Override public String getString() { - return name().toLowerCase(); + return name().toLowerCase(Locale.ROOT); } } diff --git a/src/main/java/appeng/client/render/cablebus/CableBuilder.java b/src/main/java/appeng/client/render/cablebus/CableBuilder.java index a6188723b..bc00ef972 100644 --- a/src/main/java/appeng/client/render/cablebus/CableBuilder.java +++ b/src/main/java/appeng/client/render/cablebus/CableBuilder.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; import java.util.List; +import java.util.Locale; import java.util.function.Function; import net.minecraft.client.renderer.model.BakedQuad; @@ -100,7 +101,7 @@ class CableBuilder { } return new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, - new ResourceLocation(AppEng.MOD_ID, textureFolder + color.name().toLowerCase())); + new ResourceLocation(AppEng.MOD_ID, textureFolder + color.name().toLowerCase(Locale.ROOT))); } /** diff --git a/src/main/java/appeng/client/render/cablebus/CableCoreType.java b/src/main/java/appeng/client/render/cablebus/CableCoreType.java index f1c7e3975..c260bad6e 100644 --- a/src/main/java/appeng/client/render/cablebus/CableCoreType.java +++ b/src/main/java/appeng/client/render/cablebus/CableCoreType.java @@ -19,6 +19,7 @@ package appeng.client.render.cablebus; import java.util.EnumMap; +import java.util.Locale; import java.util.Map; import com.google.common.collect.ImmutableMap; @@ -74,7 +75,7 @@ public enum CableCoreType { public RenderMaterial getTexture(AEColor color) { return new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, - new ResourceLocation(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase())); + new ResourceLocation(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase(Locale.ROOT))); } } diff --git a/src/main/java/appeng/client/render/crafting/CraftingCubeModelLoader.java b/src/main/java/appeng/client/render/crafting/CraftingCubeModelLoader.java index 52b430134..b92bf8cfd 100644 --- a/src/main/java/appeng/client/render/crafting/CraftingCubeModelLoader.java +++ b/src/main/java/appeng/client/render/crafting/CraftingCubeModelLoader.java @@ -18,6 +18,8 @@ package appeng.client.render.crafting; +import java.util.Locale; + import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -48,7 +50,7 @@ public class CraftingCubeModelLoader implements IModelLoader if (typeEl != null) { String typeName = deserializationContext.deserialize(typeEl, String.class); if (typeName != null) { - unitType = AbstractCraftingUnitBlock.CraftingUnitType.valueOf(typeName.toUpperCase()); + unitType = AbstractCraftingUnitBlock.CraftingUnitType.valueOf(typeName.toUpperCase(Locale.ROOT)); } } if (unitType == null) { diff --git a/src/main/java/appeng/client/render/effects/EnergyParticleData.java b/src/main/java/appeng/client/render/effects/EnergyParticleData.java index 313a880fd..cb15d6459 100644 --- a/src/main/java/appeng/client/render/effects/EnergyParticleData.java +++ b/src/main/java/appeng/client/render/effects/EnergyParticleData.java @@ -49,7 +49,7 @@ public class EnergyParticleData implements IParticleData { reader.expect(' '); boolean forItem = reader.readBoolean(); reader.expect(' '); - AEPartLocation direction = AEPartLocation.valueOf(reader.readString().toUpperCase()); + AEPartLocation direction = AEPartLocation.valueOf(reader.readString().toUpperCase(Locale.ROOT)); return new EnergyParticleData(forItem, direction); } @@ -74,7 +74,8 @@ public class EnergyParticleData implements IParticleData { @Override public String getParameters() { - return String.format(Locale.ROOT, "%s %s", forItem ? "true" : "false", direction.name().toLowerCase()); + return String.format(Locale.ROOT, "%s %s", forItem ? "true" : "false", + direction.name().toLowerCase(Locale.ROOT)); } } diff --git a/src/main/java/appeng/client/render/spatial/SpatialPylonModel.java b/src/main/java/appeng/client/render/spatial/SpatialPylonModel.java index f999f6ebd..d94a94295 100644 --- a/src/main/java/appeng/client/render/spatial/SpatialPylonModel.java +++ b/src/main/java/appeng/client/render/spatial/SpatialPylonModel.java @@ -20,6 +20,7 @@ package appeng.client.render.spatial; import java.util.Arrays; import java.util.EnumMap; +import java.util.Locale; import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; @@ -59,7 +60,7 @@ public class SpatialPylonModel implements BasicUnbakedModel { private static RenderMaterial getTexturePath(SpatialPylonTextureType type) { return new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, - new ResourceLocation(AppEng.MOD_ID, "block/spatial_pylon/" + type.name().toLowerCase())); + new ResourceLocation(AppEng.MOD_ID, "block/spatial_pylon/" + type.name().toLowerCase(Locale.ROOT))); } } diff --git a/src/main/java/appeng/integration/modules/theoneprobe/TheOneProbeText.java b/src/main/java/appeng/integration/modules/theoneprobe/TheOneProbeText.java index b2179736e..55f037a00 100644 --- a/src/main/java/appeng/integration/modules/theoneprobe/TheOneProbeText.java +++ b/src/main/java/appeng/integration/modules/theoneprobe/TheOneProbeText.java @@ -37,7 +37,7 @@ public enum TheOneProbeText { } public String getUnlocalized() { - return this.root + '.' + this.name().toLowerCase(Locale.ENGLISH); + return this.root + '.' + this.name().toLowerCase(Locale.ROOT); } } diff --git a/src/main/java/appeng/server/AECommand.java b/src/main/java/appeng/server/AECommand.java index cb0033909..d0f7eb909 100644 --- a/src/main/java/appeng/server/AECommand.java +++ b/src/main/java/appeng/server/AECommand.java @@ -20,6 +20,8 @@ package appeng.server; import static net.minecraft.command.Commands.literal; +import java.util.Locale; + import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; @@ -46,7 +48,7 @@ public final class AECommand { private void add(LiteralArgumentBuilder builder, Commands subCommand) { - LiteralArgumentBuilder subCommandBuilder = literal(subCommand.name().toLowerCase()) + LiteralArgumentBuilder subCommandBuilder = literal(subCommand.name().toLowerCase(Locale.ROOT)) .requires(src -> src.hasPermissionLevel(subCommand.level)); subCommand.command.addArguments(subCommandBuilder); subCommandBuilder.executes(ctx -> { From 9456f639d48e1d91cdff85a84ccd630f8ae45806 Mon Sep 17 00:00:00 2001 From: shartte Date: Sun, 9 Aug 2020 01:27:19 +0200 Subject: [PATCH 05/10] Simplify "unlit" quad loading and move to Mixins (#4569) * Simplified the UV loader concept: We only need it to make quads "unlit" which means that the lighting system is not applied to them. They always render at their full brightness. * More documentation and slight cleanups. --- .../client/render/model/UVLModelLoader.java | 210 ------------------ src/main/java/appeng/core/AppEng.java | 2 - .../java/appeng/hooks/UnlitQuadHooks.java | 127 +++++++++++ .../mixins/unlitquad/BakedQuadAccessor.java | 15 ++ .../mixins/unlitquad/BlockModelMixin.java | 37 +++ .../BlockPartFaceDeserializerMixin.java | 35 +++ .../mixins/unlitquad/ModelBakeryMixin.java | 34 +++ .../resources/appliedenergistics2.mixins.json | 9 +- .../models/block/charged_quartz_ore.json | 31 +-- .../models/block/chest/lights_on.json | 16 +- .../controller_block_conflicted.json | 31 +-- .../controller/controller_block_online.json | 31 +-- .../controller_column_conflicted.json | 31 +-- .../controller/controller_column_online.json | 31 +-- .../block/molecular_assembler_lights.json | 31 +-- .../models/block/security_station_on.json | 16 +- .../block/wireless_access_point_on.json | 26 +-- ...eless_access_point_status_has_channel.json | 20 +- .../wireless_access_point_status_on.json | 20 +- .../part/conversion_monitor_locked_on.json | 16 +- .../models/part/conversion_monitor_on.json | 16 +- .../models/part/crafting_terminal_on.json | 16 +- .../part/display_status_has_channel.json | 21 +- .../models/part/display_status_on.json | 21 +- .../models/part/export_bus_has_channel.json | 21 +- .../models/part/export_bus_on.json | 21 +- .../part/fluid_export_bus_has_channel.json | 21 +- .../models/part/fluid_export_bus_on.json | 21 +- .../part/fluid_import_bus_has_channel.json | 21 +- .../models/part/fluid_import_bus_on.json | 21 +- .../part/fluid_interface_has_channel.json | 21 +- .../models/part/fluid_interface_on.json | 21 +- .../part/fluid_storage_bus_has_channel.json | 21 +- .../models/part/fluid_storage_bus_on.json | 21 +- .../models/part/fluid_terminal_on.json | 16 +- .../models/part/import_bus_has_channel.json | 21 +- .../models/part/import_bus_on.json | 21 +- .../models/part/interface_has_channel.json | 21 +- .../models/part/interface_on.json | 21 +- .../models/part/interface_terminal_on.json | 16 +- .../models/part/level_emitter_base_on.json | 26 +-- .../level_emitter_status_has_channel.json | 21 +- .../models/part/level_emitter_status_on.json | 21 +- .../models/part/monitor_base.json | 1 - .../models/part/monitor_bright_on.json | 6 +- .../models/part/monitor_dark_on.json | 6 +- .../models/part/monitor_medium_on.json | 6 +- .../p2p/p2p_tunnel_status_has_channel.json | 21 +- .../models/part/p2p/p2p_tunnel_status_on.json | 21 +- .../models/part/pattern_terminal_on.json | 16 +- .../models/part/storage_bus_has_channel.json | 21 +- .../models/part/storage_bus_on.json | 21 +- .../part/storage_monitor_locked_on.json | 16 +- .../models/part/storage_monitor_on.json | 16 +- .../models/part/terminal_on.json | 16 +- .../part/toggle_bus_status_has_channel.json | 21 +- .../models/part/toggle_bus_status_on.json | 21 +- .../part/transition_plane_has_channel.json | 21 +- .../models/part/transition_plane_on.json | 21 +- .../blockstates/uvlblock.json | 5 - .../models/block/uvlblock.json | 159 ------------- .../models/block/uvlblock.model | Bin 2453 -> 0 bytes .../models/block/uvlblock_vanilla.json | 6 - .../models/item/uvlblock.json | 3 - .../textures/blocks/BlockControllerLights.png | Bin 1410 -> 0 bytes .../blocks/BlockControllerLights.png.mcmeta | 19 -- 66 files changed, 450 insertions(+), 1230 deletions(-) delete mode 100644 src/main/java/appeng/client/render/model/UVLModelLoader.java create mode 100644 src/main/java/appeng/hooks/UnlitQuadHooks.java create mode 100644 src/main/java/appeng/mixins/unlitquad/BakedQuadAccessor.java create mode 100644 src/main/java/appeng/mixins/unlitquad/BlockModelMixin.java create mode 100644 src/main/java/appeng/mixins/unlitquad/BlockPartFaceDeserializerMixin.java create mode 100644 src/main/java/appeng/mixins/unlitquad/ModelBakeryMixin.java delete mode 100644 src/test/resources/assets/uvlightmapjsontest/blockstates/uvlblock.json delete mode 100644 src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.json delete mode 100644 src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.model delete mode 100644 src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock_vanilla.json delete mode 100644 src/test/resources/assets/uvlightmapjsontest/models/item/uvlblock.json delete mode 100644 src/test/resources/assets/uvlightmapjsontest/textures/blocks/BlockControllerLights.png delete mode 100644 src/test/resources/assets/uvlightmapjsontest/textures/blocks/BlockControllerLights.png.mcmeta diff --git a/src/main/java/appeng/client/render/model/UVLModelLoader.java b/src/main/java/appeng/client/render/model/UVLModelLoader.java deleted file mode 100644 index 3defd9253..000000000 --- a/src/main/java/appeng/client/render/model/UVLModelLoader.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * This file is part of Applied Energistics 2. - * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. - * - * Applied Energistics 2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Applied Energistics 2 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Applied Energistics 2. If not, see . - */ - -package appeng.client.render.model; - -import java.lang.reflect.Type; -import java.util.Collection; -import java.util.Set; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.mojang.blaze3d.matrix.MatrixStack; - -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.model.BakedQuad; -import net.minecraft.client.renderer.model.BlockFaceUV; -import net.minecraft.client.renderer.model.BlockModel; -import net.minecraft.client.renderer.model.BlockPart; -import net.minecraft.client.renderer.model.BlockPartFace; -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.client.renderer.model.IModelTransform; -import net.minecraft.client.renderer.model.IUnbakedModel; -import net.minecraft.client.renderer.model.ItemCameraTransforms; -import net.minecraft.client.renderer.model.ItemOverride; -import net.minecraft.client.renderer.model.ItemOverrideList; -import net.minecraft.client.renderer.model.ItemTransformVec3f; -import net.minecraft.client.renderer.model.ModelBakery; -import net.minecraft.client.renderer.model.RenderMaterial; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.resources.IResourceManager; -import net.minecraft.util.Direction; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.vector.TransformationMatrix; -import net.minecraftforge.client.model.IModelBuilder; -import net.minecraftforge.client.model.IModelConfiguration; -import net.minecraftforge.client.model.IModelLoader; -import net.minecraftforge.client.model.ModelLoaderRegistry; -import net.minecraftforge.client.model.geometry.IModelGeometry; -import net.minecraftforge.client.model.pipeline.BakedQuadBuilder; -import net.minecraftforge.client.model.pipeline.VertexLighterFlat; -import net.minecraftforge.common.model.TransformationHelper; - -public class UVLModelLoader implements IModelLoader { - - public static final UVLModelLoader INSTANCE = new UVLModelLoader(); - - @Override - public void onResourceManagerReload(IResourceManager resourceManager) { - } - - @Override - public UVLModelWrapper read(JsonDeserializationContext deserializationContext, JsonObject modelContents) { - modelContents.remove("loader"); - BlockModel blockModel = UVLSERIALIZER.fromJson(modelContents, BlockModel.class); - return new UVLModelWrapper(blockModel); - } - - final Gson UVLSERIALIZER = (new GsonBuilder()) - .registerTypeAdapter(BlockModel.class, new ModelLoaderRegistry.ExpandedBlockModelDeserializer()) - .registerTypeAdapter(BlockPart.class, new BlockPart.Deserializer()) - .registerTypeAdapter(BlockPartFace.class, new BlockPartFaceOverrideSerializer()) - .registerTypeAdapter(BlockFaceUV.class, new BlockFaceUV.Deserializer()) - .registerTypeAdapter(ItemTransformVec3f.class, new ItemTransformVec3f.Deserializer()) - .registerTypeAdapter(ItemCameraTransforms.class, new ItemCameraTransforms.Deserializer()) - .registerTypeAdapter(ItemOverride.class, new ItemOverride.Deserializer()) - .registerTypeAdapter(TransformationMatrix.class, new TransformationHelper.Deserializer()).create(); - - private static class BlockPartFaceOverrideSerializer extends BlockPartFace.Deserializer { - @Override - public BlockPartFace deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, - JsonDeserializationContext p_deserialize_3_) throws JsonParseException { - BlockPartFace blockFace = super.deserialize(p_deserialize_1_, p_deserialize_2_, p_deserialize_3_); - Pair uvl = this.parseUVL(p_deserialize_1_.getAsJsonObject()); - if (uvl != null) { - return new BlockPartFaceWithUVL(blockFace.cullFace, blockFace.tintIndex, blockFace.texture, - blockFace.blockFaceUV, uvl.getLeft(), uvl.getRight()); - } - return blockFace; - } - - protected Pair parseUVL(JsonObject object) { - if (!object.has("uvlightmap")) { - return null; - } - object = object.get("uvlightmap").getAsJsonObject(); - return new ImmutablePair<>(JSONUtils.getFloat(object, "sky", 0), JSONUtils.getFloat(object, "block", 0)); - } - } - - private static class BlockPartFaceWithUVL extends BlockPartFace { - - private final float sky; - private final float block; - - public BlockPartFaceWithUVL(@Nullable Direction cullFaceIn, int tintIndexIn, String textureIn, - BlockFaceUV blockFaceUVIn, float sky, float block) { - super(cullFaceIn, tintIndexIn, textureIn, blockFaceUVIn); - this.sky = sky; - this.block = block; - } - - public float getSky() { - return sky; - } - - public float getBlock() { - return block; - } - } - - public static class UVLModelWrapper implements IModelGeometry { - private final BlockModel parent; - - public UVLModelWrapper(BlockModel parent) { - this.parent = parent; - } - - @Override - public IBakedModel bake(IModelConfiguration owner, ModelBakery bakery, - Function spriteGetter, IModelTransform modelTransform, - ItemOverrideList overrides, ResourceLocation modelLocation) { - TextureAtlasSprite particle = spriteGetter.apply(owner.resolveTexture("particle")); - - IModelBuilder builder = IModelBuilder.of(owner, overrides, particle); - for (BlockPart blockpart : parent.getElements()) { - for (Direction direction : blockpart.mapFaces.keySet()) { - BlockPartFace blockpartface = blockpart.mapFaces.get(direction); - TextureAtlasSprite textureatlassprite1 = spriteGetter - .apply(owner.resolveTexture(blockpartface.texture)); - BakedQuad quad = BlockModel.makeBakedQuad(blockpart, blockpartface, textureatlassprite1, direction, - modelTransform, modelLocation); - - if (blockpartface instanceof BlockPartFaceWithUVL) { - BlockPartFaceWithUVL uvlFace = (BlockPartFaceWithUVL) blockpartface; - quad = applyPreBakedLighting(quad, textureatlassprite1, uvlFace.sky, uvlFace.block); - } - - if (blockpartface.cullFace == null) { - builder.addGeneralQuad(quad); - } else { - builder.addFaceQuad(modelTransform.getRotation().rotateTransform(blockpartface.cullFace), quad); - } - } - } - return builder.build(); - } - - private BakedQuad applyPreBakedLighting(BakedQuad quad, TextureAtlasSprite sprite, float sky, float block) { - // FIXME: just piping through the quads and manipulating uv index 2 directly - // seems way easier than this - BakedQuadBuilder builder = new BakedQuadBuilder(sprite); - VertexLighterFlat trans = new VertexLighterFlat(Minecraft.getInstance().getBlockColors()) { - - @Override - protected void updateLightmap(float[] normal, float[] lightmap, float x, float y, float z) { - lightmap[0] = block; - lightmap[1] = sky; - } - - @Override - public void setQuadTint(int tint) { - // Tint requires a block state which we don't have at this point - } - }; - MatrixStack identity = new MatrixStack(); - trans.setTransform(identity.getLast()); - trans.setParent(builder); - quad.pipe(trans); - builder.setQuadTint(quad.getTintIndex()); - builder.setQuadOrientation(quad.getFace()); - builder.setApplyDiffuseLighting(false); - return builder.build(); - } - - @Override - public Collection getTextures(IModelConfiguration owner, - Function modelGetter, - Set> missingTextureErrors) { - return parent.getTextures(modelGetter, missingTextureErrors); - } - - } - -} diff --git a/src/main/java/appeng/core/AppEng.java b/src/main/java/appeng/core/AppEng.java index 661d19d63..40ec3d89e 100644 --- a/src/main/java/appeng/core/AppEng.java +++ b/src/main/java/appeng/core/AppEng.java @@ -76,7 +76,6 @@ import appeng.client.render.model.DriveModel; import appeng.client.render.model.GlassModel; import appeng.client.render.model.MemoryCardModel; import appeng.client.render.model.SkyCompassModel; -import appeng.client.render.model.UVLModelLoader; import appeng.client.render.spatial.SpatialPylonModel; import appeng.core.features.registries.PartModels; import appeng.core.stats.AdvancementTriggers; @@ -204,7 +203,6 @@ public final class AppEng { PlaneModelLoader.INSTANCE); ModelLoaderRegistry.registerLoader(new ResourceLocation(AppEng.MOD_ID, "crafting_cube"), CraftingCubeModelLoader.INSTANCE); - ModelLoaderRegistry.registerLoader(new ResourceLocation(AppEng.MOD_ID, "uvlightmap"), UVLModelLoader.INSTANCE); ModelLoaderRegistry.registerLoader(new ResourceLocation(AppEng.MOD_ID, "cable_bus"), new CableBusModelLoader((PartModels) Api.INSTANCE.registries().partModels())); diff --git a/src/main/java/appeng/hooks/UnlitQuadHooks.java b/src/main/java/appeng/hooks/UnlitQuadHooks.java new file mode 100644 index 000000000..8eab673e4 --- /dev/null +++ b/src/main/java/appeng/hooks/UnlitQuadHooks.java @@ -0,0 +1,127 @@ +package appeng.hooks; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.renderer.model.BakedQuad; +import net.minecraft.client.renderer.model.BlockFaceUV; +import net.minecraft.client.renderer.model.BlockPartFace; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.client.renderer.vertex.VertexFormat; +import net.minecraft.client.renderer.vertex.VertexFormatElement; +import net.minecraft.util.Direction; +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; + +import appeng.core.AppEng; +import appeng.mixins.unlitquad.BakedQuadAccessor; + +/** + * Implementation details of allowing quads to be defined as "unlit" in JSON + * models by specifying an "unlit" boolean property on the face. + */ +public class UnlitQuadHooks { + + /** + * Offset into the vertex data (which is represented as integers). + */ + private static final int LIGHT_OFFSET = getLightOffset(); + + // Lightmap texture coordinate with full intensity light leading to no drop in + // brightness + private static final int UNLIT_LIGHT_UV = LightTexture.packLight(15, 15); + + /** + * Thread-Local flag to indicate that an enhanced Applied Energistics model is + * currently being deserialized. + */ + private static final ThreadLocal ENABLE_UNLIT_EXTENSIONS = new ThreadLocal<>(); + + /** + * Notify the unlit model system that a specific model is about to be + * deserialized by {@link net.minecraft.client.renderer.model.ModelBakery}. + */ + public static void beginDeserializingModel(ResourceLocation location) { + String namespace = location.getNamespace(); + if (namespace.equals(AppEng.MOD_ID)) { + ENABLE_UNLIT_EXTENSIONS.set(true); + } + } + + /** + * Notify the unlit model system that deserialization of a model has ended. + */ + public static void endDeserializingModel() { + ENABLE_UNLIT_EXTENSIONS.set(false); + } + + public static boolean isUnlitExtensionEnabled() { + Boolean b = ENABLE_UNLIT_EXTENSIONS.get(); + return b != null && b; + } + + public static BlockPartFace enhanceModelElementFace(BlockPartFace modelElement, JsonElement jsonElement) { + JsonObject jsonObject = jsonElement.getAsJsonObject(); + if (JSONUtils.getBoolean(jsonObject, "unlit", false)) { + return new UnlitBlockPartFace(modelElement.cullFace, modelElement.tintIndex, modelElement.texture, + modelElement.blockFaceUV); + } + return modelElement; + } + + /** + * Creates a new quad from the given quad and pre-bakes it to not be affected by + * lighting (neither diffuse lighting nor the prebaked lightmap). This works on + * the assumption that Vanilla will not modify a quad's lightmap data if it's + * not zero. + */ + public static BakedQuad makeUnlit(BakedQuad quad) { + int[] vertexData = quad.getVertexData().clone(); + int stride = DefaultVertexFormats.BLOCK.getIntegerSize(); + // Set the pre-baked texture coords for the lightmap. + // Vanilla will not overwrite them if they are non-zero + for (int i = 0; i < 4; i++) { + vertexData[stride * i + LIGHT_OFFSET] = UNLIT_LIGHT_UV; + } + TextureAtlasSprite sprite = ((BakedQuadAccessor) quad).getSprite(); + // Copy the quad to disable diffuse lighting + return new BakedQuad(vertexData, quad.getTintIndex(), quad.getFace(), sprite, false /* diffuse lighting */); + } + + /** + * This subclass is used as a marker to indicate this face deserialized from + * JSON is supposed to be unlit, which translates to processing by + * {@link #makeUnlit(BakedQuad)}. + */ + public static class UnlitBlockPartFace extends BlockPartFace { + public UnlitBlockPartFace(Direction cullFaceIn, int tintIndexIn, String textureIn, BlockFaceUV blockFaceUVIn) { + super(cullFaceIn, tintIndexIn, textureIn, blockFaceUVIn); + } + } + + /** + * Find the index in the BakedQuad vertex data (for vertex 0) where the lightmap + * coordinates are. Assumes the BLOCK vertex format. + */ + private static int getLightOffset() { + VertexFormat format = DefaultVertexFormats.BLOCK; + int offset = 0; + for (VertexFormatElement element : format.getElements()) { + // TEX_2SB is the lightmap vertex element + if (element == DefaultVertexFormats.TEX_2SB) { + if (element.getType() != VertexFormatElement.Type.SHORT) { + throw new UnsupportedOperationException("Expected light map format to be of type SHORT"); + } + if (offset % 4 != 0) { + throw new UnsupportedOperationException("Expected light map offset to be 4-byte aligned"); + } + return offset / 4; + } + offset += element.getSize(); + } + throw new UnsupportedOperationException("Failed to find the lightmap index in the block vertex format"); + } + +} diff --git a/src/main/java/appeng/mixins/unlitquad/BakedQuadAccessor.java b/src/main/java/appeng/mixins/unlitquad/BakedQuadAccessor.java new file mode 100644 index 000000000..a3bdbb219 --- /dev/null +++ b/src/main/java/appeng/mixins/unlitquad/BakedQuadAccessor.java @@ -0,0 +1,15 @@ +package appeng.mixins.unlitquad; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +import net.minecraft.client.renderer.model.BakedQuad; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; + +@Mixin(BakedQuad.class) +public interface BakedQuadAccessor { + + @Accessor + TextureAtlasSprite getSprite(); + +} diff --git a/src/main/java/appeng/mixins/unlitquad/BlockModelMixin.java b/src/main/java/appeng/mixins/unlitquad/BlockModelMixin.java new file mode 100644 index 000000000..111829ad9 --- /dev/null +++ b/src/main/java/appeng/mixins/unlitquad/BlockModelMixin.java @@ -0,0 +1,37 @@ +package appeng.mixins.unlitquad; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import net.minecraft.client.renderer.model.BakedQuad; +import net.minecraft.client.renderer.model.BlockModel; +import net.minecraft.client.renderer.model.BlockPart; +import net.minecraft.client.renderer.model.BlockPartFace; +import net.minecraft.client.renderer.model.IModelTransform; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; + +import appeng.hooks.UnlitQuadHooks; + +/** + * This mixin hooks into conversion from {@link BlockPartFace} to + * {@link BakedQuad} to apply our unlit extensions if the block part face is an + * instance of our marker class + * {@link appeng.hooks.UnlitQuadHooks.UnlitBlockPartFace}. + */ +@Mixin(BlockModel.class) +public class BlockModelMixin { + + @Inject(method = "bakeFace", at = @At("RETURN"), cancellable = true, require = 1, allow = 1) + private static void onBakeFace(BlockPart partIn, BlockPartFace partFaceIn, TextureAtlasSprite spriteIn, + Direction directionIn, IModelTransform transformIn, ResourceLocation locationIn, + CallbackInfoReturnable cri) { + if (partFaceIn instanceof UnlitQuadHooks.UnlitBlockPartFace) { + cri.setReturnValue(UnlitQuadHooks.makeUnlit(cri.getReturnValue())); + } + } + +} diff --git a/src/main/java/appeng/mixins/unlitquad/BlockPartFaceDeserializerMixin.java b/src/main/java/appeng/mixins/unlitquad/BlockPartFaceDeserializerMixin.java new file mode 100644 index 000000000..1ff2638ab --- /dev/null +++ b/src/main/java/appeng/mixins/unlitquad/BlockPartFaceDeserializerMixin.java @@ -0,0 +1,35 @@ +package appeng.mixins.unlitquad; + +import java.lang.reflect.Type; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonElement; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import net.minecraft.client.renderer.model.BlockPartFace; + +import appeng.hooks.UnlitQuadHooks; + +/** + * This mixin will call the hook to deserialize the unlit property, but only if + * we are currently deserializing an AE2 model. + */ +@Mixin(BlockPartFace.Deserializer.class) +public class BlockPartFaceDeserializerMixin { + + @Inject(method = "deserialize", at = @At("RETURN"), cancellable = true, allow = 1, remap = false) + public void onDeserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext, + CallbackInfoReturnable cri) { + if (!UnlitQuadHooks.isUnlitExtensionEnabled()) { + return; // Not in a model that activated the deserializer + } + + BlockPartFace modelElement = cri.getReturnValue(); + cri.setReturnValue(UnlitQuadHooks.enhanceModelElementFace(modelElement, jsonElement)); + } + +} diff --git a/src/main/java/appeng/mixins/unlitquad/ModelBakeryMixin.java b/src/main/java/appeng/mixins/unlitquad/ModelBakeryMixin.java new file mode 100644 index 000000000..c4cab24ba --- /dev/null +++ b/src/main/java/appeng/mixins/unlitquad/ModelBakeryMixin.java @@ -0,0 +1,34 @@ +package appeng.mixins.unlitquad; + +import java.io.IOException; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import net.minecraft.client.renderer.model.BlockModel; +import net.minecraft.client.renderer.model.ModelBakery; +import net.minecraft.util.ResourceLocation; + +import appeng.hooks.UnlitQuadHooks; + +/** + * The only job of this mixin is to only enable the unlit extensions if the + * model is whitelisted for it, which is decided in {@link UnlitQuadHooks}. + */ +@Mixin(ModelBakery.class) +public class ModelBakeryMixin { + + @Inject(method = "loadModel", at = @At("HEAD"), allow = 1) + protected void onBeginLoadModel(ResourceLocation location, CallbackInfoReturnable cri) + throws IOException { + UnlitQuadHooks.beginDeserializingModel(location); + } + + @Inject(method = "loadModel", at = @At("RETURN")) + protected void onEndLoadModel(ResourceLocation location, CallbackInfoReturnable cri) { + UnlitQuadHooks.endDeserializingModel(); + } + +} diff --git a/src/main/resources/appliedenergistics2.mixins.json b/src/main/resources/appliedenergistics2.mixins.json index c156dcc24..715b1206d 100644 --- a/src/main/resources/appliedenergistics2.mixins.json +++ b/src/main/resources/appliedenergistics2.mixins.json @@ -11,7 +11,14 @@ "DimensionStructuresSettingsMixin", "StructureAccessor" ], - "client": ["SkyRenderMixin", "SkyPropertiesMixin"], + "client": [ + "SkyRenderMixin", + "SkyPropertiesMixin", + "unlitquad.ModelBakeryMixin", + "unlitquad.BlockModelMixin", + "unlitquad.BlockPartFaceDeserializerMixin", + "unlitquad.BakedQuadAccessor" + ], "server": [], "injectors": { "defaultRequire": 1 diff --git a/src/main/resources/assets/appliedenergistics2/models/block/charged_quartz_ore.json b/src/main/resources/assets/appliedenergistics2/models/block/charged_quartz_ore.json index 6d593a952..984630029 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/charged_quartz_ore.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/charged_quartz_ore.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "block": "block/stone", @@ -42,50 +41,32 @@ "down": { "texture": "#quartz", "cullface": "down", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "east": { "texture": "#quartz", "cullface": "east", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "north": { "texture": "#quartz", "cullface": "north", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "south": { "texture": "#quartz", "cullface": "south", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "up": { "texture": "#quartz", "cullface": "up", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "west": { "texture": "#quartz", "cullface": "west", - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } }, "from": [0, 0, 0], diff --git a/src/main/resources/assets/appliedenergistics2/models/block/chest/lights_on.json b/src/main/resources/assets/appliedenergistics2/models/block/chest/lights_on.json index 121d8258e..66d754592 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/chest/lights_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/chest/lights_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lights_bright": "appliedenergistics2:block/chest/lights_on_bright", "lights_medium": "appliedenergistics2:block/chest/lights_on_medium", @@ -13,10 +12,7 @@ "up": { "texture": "#lights_bright", "tintindex": 3, - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "up": { "texture": "#lights_medium", "tintindex": 2, - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "up": { "texture": "#lights_dark", "tintindex": 1, - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_conflicted.json b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_conflicted.json index 0038cf7a1..f917657ed 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_conflicted.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_conflicted.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "block": "appliedenergistics2:block/controller_powered", @@ -12,50 +11,32 @@ "down": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "east": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "north": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "south": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "up": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "west": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } }, "from": [0, 0, 0], diff --git a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_online.json b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_online.json index 0ed472fd0..655b3d4b0 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_online.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_block_online.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "block": "appliedenergistics2:block/controller_powered", @@ -12,50 +11,32 @@ "down": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "east": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "north": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "south": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "up": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "west": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } }, "from": [0, 0, 0], diff --git a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_conflicted.json b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_conflicted.json index 50e506dfd..779ffc3b4 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_conflicted.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_conflicted.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "block": "appliedenergistics2:block/controller_column_powered", @@ -12,50 +11,32 @@ "down": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "east": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "north": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "south": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "up": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "west": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } }, "from": [0, 0, 0], diff --git a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_online.json b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_online.json index 9b7c7527f..caa9e3c36 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_online.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/controller/controller_column_online.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "block": "appliedenergistics2:block/controller_column_powered", @@ -12,50 +11,32 @@ "down": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "east": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "north": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "south": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "up": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true }, "west": { "texture": "#lights", "uv": [0, 0, 16, 16], - "uvlightmap": { - "block": 0.007, - "sky": 0.007 - } + "unlit": true } }, "from": [0, 0, 0], diff --git a/src/main/resources/assets/appliedenergistics2/models/block/molecular_assembler_lights.json b/src/main/resources/assets/appliedenergistics2/models/block/molecular_assembler_lights.json index 14d4e092f..06f2d9fc3 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/molecular_assembler_lights.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/molecular_assembler_lights.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "all": "appliedenergistics2:block/molecular_assembler_lights" @@ -13,55 +12,37 @@ "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "down", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "up", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "north": { "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "north", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "south": { "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "south", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "west", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#all", "uv": [2.6, 2.6, 13.4, 13.4], "cullface": "east", - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/block/security_station_on.json b/src/main/resources/assets/appliedenergistics2/models/block/security_station_on.json index b654e4592..c25b3b786 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/security_station_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/security_station_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "parent": "block/block", "textures": { "particle": "appliedenergistics2:block/security_station_side", @@ -42,10 +41,7 @@ "up": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -56,10 +52,7 @@ "up": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -70,10 +63,7 @@ "up": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_on.json b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_on.json index 60be1d40c..c177c621d 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "ambientocclusion": false, "textures": { "torch": "appliedenergistics2:block/wireless_access_point_on" @@ -39,10 +38,7 @@ "texture": "#torch", "uv": [7, 7, 9, 9], "rotation": 270, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -55,19 +51,13 @@ "texture": "#torch", "uv": [6, 6, 10, 10], "rotation": 90, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "down": { "texture": "#torch", "uv": [6, 6, 10, 10], "rotation": 270, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -79,19 +69,13 @@ "west": { "texture": "#torch", "uv": [6, 6, 10, 10], - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#torch", "uv": [6, 6, 10, 10], "rotation": 180, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_has_channel.json index 22a9db566..dbc069977 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_has_channel.json @@ -10,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_on.json b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_on.json index 784ba620c..e3be67738 100644 --- a/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/block/wireless_access_point_status_on.json @@ -10,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_locked_on.json b/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_locked_on.json index dc374107a..9ded490b6 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_locked_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_locked_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/conversion_monitor_bright", "lightsMedium": "appliedenergistics2:part/conversion_monitor_medium_locked", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_on.json b/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_on.json index d606f38cf..8f8d8db46 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/conversion_monitor_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/conversion_monitor_bright", "lightsMedium": "appliedenergistics2:part/conversion_monitor_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/crafting_terminal_on.json b/src/main/resources/assets/appliedenergistics2/models/part/crafting_terminal_on.json index b3b37bf99..a6bff04dd 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/crafting_terminal_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/crafting_terminal_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/crafting_terminal_bright", "lightsMedium": "appliedenergistics2:part/crafting_terminal_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/display_status_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/display_status_has_channel.json index a3c08b8e5..2332c0c1f 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/display_status_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/display_status_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/display_status_on.json b/src/main/resources/assets/appliedenergistics2/models/part/display_status_on.json index 5ea6cdd15..ff9a34fd1 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/display_status_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/display_status_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/export_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/export_bus_has_channel.json index 0f6fe350a..3da73d935 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/export_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/export_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/export_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/export_bus_on.json index 9444d89aa..a20d4889b 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/export_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/export_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_has_channel.json index 0f6fe350a..3da73d935 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_on.json index 9444d89aa..a20d4889b 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_export_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_has_channel.json index 0f6fe350a..3da73d935 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_on.json index 9444d89aa..a20d4889b 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_import_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_has_channel.json index b87024a70..3f5b0904c 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_on.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_on.json index 88c28f857..bbe1ed528 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_interface_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_has_channel.json index b87024a70..3f5b0904c 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_on.json index 88c28f857..bbe1ed528 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_storage_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/fluid_terminal_on.json b/src/main/resources/assets/appliedenergistics2/models/part/fluid_terminal_on.json index 39624a853..f570ba3ae 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/fluid_terminal_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/fluid_terminal_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/fluid_terminal_bright", "lightsMedium": "appliedenergistics2:part/fluid_terminal_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/import_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/import_bus_has_channel.json index 0f6fe350a..3da73d935 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/import_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/import_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/import_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/import_bus_on.json index 9444d89aa..a20d4889b 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/import_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/import_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/interface_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/interface_has_channel.json index b87024a70..3f5b0904c 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/interface_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/interface_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/interface_on.json b/src/main/resources/assets/appliedenergistics2/models/part/interface_on.json index 88c28f857..bbe1ed528 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/interface_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/interface_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/interface_terminal_on.json b/src/main/resources/assets/appliedenergistics2/models/part/interface_terminal_on.json index f88c8cec0..95b3b485c 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/interface_terminal_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/interface_terminal_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/interface_terminal_bright", "lightsMedium": "appliedenergistics2:part/interface_terminal_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_base_on.json b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_base_on.json index 3a8418500..cac0bbcf2 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_base_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_base_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "ambientocclusion": false, "textures": { "emitter": "appliedenergistics2:part/level_emitter_on", @@ -40,10 +39,7 @@ "texture": "#emitter", "uv": [6, 7, 8, 9], "rotation": 270, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -56,19 +52,13 @@ "texture": "#emitter", "uv": [5, 6, 9, 10], "rotation": 90, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "down": { "texture": "#emitter", "uv": [5, 6, 9, 10], "rotation": 270, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -80,19 +70,13 @@ "west": { "texture": "#emitter", "uv": [5, 6, 9, 10], - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#emitter", "uv": [5, 6, 9, 10], "rotation": 180, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_has_channel.json index 459e7a6d8..ace6ff599 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_on.json b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_on.json index edfc24671..3469d5d19 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/level_emitter_status_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/monitor_base.json b/src/main/resources/assets/appliedenergistics2/models/part/monitor_base.json index 36412650d..0408175a1 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/monitor_base.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/monitor_base.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "sides": "appliedenergistics2:part/monitor_sides", "back": "appliedenergistics2:part/monitor_back", diff --git a/src/main/resources/assets/appliedenergistics2/models/part/monitor_bright_on.json b/src/main/resources/assets/appliedenergistics2/models/part/monitor_bright_on.json index 6686c7dc7..5d79e20b0 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/monitor_bright_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/monitor_bright_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "ambientocclusion": false, "textures": { "lights": "appliedenergistics2:part/monitor_light" @@ -13,10 +12,7 @@ "north": { "texture": "#lights", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/monitor_dark_on.json b/src/main/resources/assets/appliedenergistics2/models/part/monitor_dark_on.json index 361b7cd80..749be0e5f 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/monitor_dark_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/monitor_dark_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lights": "appliedenergistics2:part/monitor_light" }, @@ -11,10 +10,7 @@ "north": { "texture": "#lights", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/monitor_medium_on.json b/src/main/resources/assets/appliedenergistics2/models/part/monitor_medium_on.json index f4477877a..6dd1ca6ba 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/monitor_medium_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/monitor_medium_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lights": "appliedenergistics2:part/monitor_light" }, @@ -11,10 +10,7 @@ "north": { "texture": "#lights", "tintindex": 4, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_has_channel.json index 32f2e7f9d..12ca1ea90 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_on.json b/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_on.json index 745408f15..3b9fda716 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/p2p/p2p_tunnel_status_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/pattern_terminal_on.json b/src/main/resources/assets/appliedenergistics2/models/part/pattern_terminal_on.json index 773395bfe..e792d4ca8 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/pattern_terminal_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/pattern_terminal_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/pattern_terminal_bright", "lightsMedium": "appliedenergistics2:part/pattern_terminal_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_has_channel.json index b87024a70..3f5b0904c 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_has_channel" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_on.json b/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_on.json index 88c28f857..bbe1ed528 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/storage_bus_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_locked_on.json b/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_locked_on.json index 2512544c5..de562aa44 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_locked_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_locked_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/storage_monitor_bright", "lightsMedium": "appliedenergistics2:part/storage_monitor_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_on.json b/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_on.json index 994f39b27..86325bf35 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/storage_monitor_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/storage_monitor_bright", "lightsMedium": "appliedenergistics2:part/storage_monitor_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/terminal_on.json b/src/main/resources/assets/appliedenergistics2/models/part/terminal_on.json index 61f131c5b..d9585f270 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/terminal_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/terminal_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "lightsBright": "appliedenergistics2:part/terminal_bright", "lightsMedium": "appliedenergistics2:part/terminal_medium", @@ -13,10 +12,7 @@ "north": { "texture": "#lightsBright", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -27,10 +23,7 @@ "north": { "texture": "#lightsMedium", "tintindex": 2, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } }, @@ -41,10 +34,7 @@ "north": { "texture": "#lightsDark", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_has_channel.json index 9f2640024..9c8a2c25f 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_on.json b/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_on.json index 444e5f7fe..2c017321f 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/toggle_bus_status_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "indicator": "appliedenergistics2:part/monitor_sides_status_on" }, @@ -11,34 +10,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_has_channel.json b/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_has_channel.json index 412232729..2a0068f07 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_has_channel.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_has_channel.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "sides": "appliedenergistics2:part/monitor_sides_status", "back": "appliedenergistics2:part/transition_plane_back", @@ -34,34 +33,22 @@ "down": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 1, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_on.json b/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_on.json index 22d22c288..447de5476 100644 --- a/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_on.json +++ b/src/main/resources/assets/appliedenergistics2/models/part/transition_plane_on.json @@ -1,5 +1,4 @@ { - "loader": "appliedenergistics2:uvlightmap", "textures": { "sides": "appliedenergistics2:part/monitor_sides_status", "back": "appliedenergistics2:part/transition_plane_back", @@ -35,34 +34,22 @@ "down": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "up": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "east": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true }, "west": { "texture": "#indicator", "tintindex": 3, - "uvlightmap": { - "sky": 0.007, - "block": 0.007 - } + "unlit": true } } } diff --git a/src/test/resources/assets/uvlightmapjsontest/blockstates/uvlblock.json b/src/test/resources/assets/uvlightmapjsontest/blockstates/uvlblock.json deleted file mode 100644 index c3ea0bc0c..000000000 --- a/src/test/resources/assets/uvlightmapjsontest/blockstates/uvlblock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "normal": { "model": "uvlightmapjsontest:uvlblock_vanilla" } - } -} diff --git a/src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.json b/src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.json deleted file mode 100644 index 8ae4133ed..000000000 --- a/src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "loader": "appliedenergistics2:uvlightmap", - "textures": { - "0": "block/obsidian", - "1": "uvlightmapjsontest:blocks/BlockControllerLights" - }, - "elements": [ - { - "name": "LL", - "from": [4.0, 0.0, 7.0], - "to": [6.0, 16.0, 9.0], - "faces": { - "north": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "east": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "south": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "west": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "up": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] }, - "down": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] } - } - }, - { - "name": "RL", - "from": [10.0, 0.0, 7.0], - "to": [12.0, 16.0, 9.0], - "faces": { - "north": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "east": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "south": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "west": { "texture": "#0", "uv": [1.0, 0.0, 15.0, 16.0] }, - "up": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] }, - "down": { "texture": "#0", "uv": [0.0, 0.0, 2.0, 2.0] } - } - }, - { - "name": "B", - "from": [6.0, 7.0, 7.0], - "to": [10.0, 9.0, 9.0], - "faces": { - "north": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] }, - "east": { "texture": "#0", "uv": [1.0, 1.0, 3.0, 3.0] }, - "south": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] }, - "west": { "texture": "#0", "uv": [1.0, 1.0, 3.0, 3.0] }, - "up": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] }, - "down": { "texture": "#0", "uv": [0.0, 1.0, 16.0, 3.0] } - } - }, - { - "name": "LLO", - "from": [4.0, 0.0, 7.0], - "to": [6.0, 16.0, 9.0], - "faces": { - "north": { - "texture": "#1", - "uv": [2.0, 0.0, 4.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "east": { - "texture": "#1", - "uv": [5.0, 0.0, 7.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "south": { - "texture": "#1", - "uv": [8.0, 0.0, 10.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "west": { - "texture": "#1", - "uv": [11.0, 0.0, 13.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "up": { - "texture": "#1", - "uv": [6.0, 6.0, 8.0, 8.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "down": { - "texture": "#1", - "uv": [8.0, 8.0, 10.0, 10.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - } - } - }, - { - "name": "RLO", - "from": [10.0, 0.0, 7.0], - "to": [12.0, 16.0, 9.0], - "faces": { - "north": { - "texture": "#1", - "uv": [3.0, 0.0, 5.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "east": { - "texture": "#1", - "uv": [5.0, 0.0, 7.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "south": { - "texture": "#1", - "uv": [7.0, 0.0, 9.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "west": { - "texture": "#1", - "uv": [10.0, 0.0, 12.0, 16.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "up": { - "texture": "#1", - "uv": [6.0, 6.0, 8.0, 8.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "down": { - "texture": "#1", - "uv": [7.0, 8.0, 9.0, 10.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - } - } - }, - { - "name": "BO", - "from": [6.0, 7.0, 7.0], - "to": [10.0, 9.0, 9.0], - "faces": { - "north": { - "texture": "#1", - "uv": [5.0, 6.0, 9.0, 8.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "east": { - "texture": "#1", - "uv": [0.0, 0.0, 2.0, 2.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "south": { - "texture": "#1", - "uv": [5.0, 7.0, 9.0, 9.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "west": { - "texture": "#1", - "uv": [5.0, 3.0, 7.0, 5.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "up": { - "texture": "#1", - "uv": [4.0, 10.0, 8.0, 12.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - }, - "down": { - "texture": "#1", - "uv": [8.0, 8.0, 12.0, 10.0], - "uvlightmap": { "sky": 0.007, "block": 0.007 } - } - } - } - ] -} diff --git a/src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.model b/src/test/resources/assets/uvlightmapjsontest/models/block/uvlblock.model deleted file mode 100644 index 97a98f0a421303684b08c7e49ab2c7e77e5706dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2453 zcmWIWW@Zs#;Nak3aLT*m!GHv~7#J9G^HWlD^s$vj6xJsM3<2i=zVUwzkgTBtTx(ieqx)`w4L&U{*$b~UHrtfH@)9+$I( z;7a}_g0l`WoJnNa==?xLWuyGrgB<)DKU;rJes9UPGNogovjCgEoMQLBMJ+e(dPPak z5ek|(J8Md~=e=V}AKFzUj?E5O{Y7l|+DjMaGZyVnI(l4V)`r(_bk#1hoNSoarlBOk z%6Md({dW(YrH@L*xY#C$xjNTAkx|qNcJ<@Xyt(aY#+!>gizn>k>6xa*JXJ5vn>AVT z4JT*PCcV&%oVR~h&$fJ5_q0-uL%84Wakb0lsvuQKkCWz)SKIK~cC#GYb5B;PBq>N* z$IY{MrEX&HO4aTljlUL|UDEYdhHV7zGmg5*DkY;X1=W7vgfVKtYuGkl!-p>H27wFBPn-!(J^a{%R;9@ zvR_uPUfZ2{TG%`PvyIjFG`q={t4u5O?-#5My1aYZcb~qOSJU<$EPP!0^Sb7@*nRKA z=WRLGxiPTng4hPHvp0h~r^;<+UGsVQo0V%$`9w}Eoq3Mk#D`Gr}#Y}%$Cn{Y>k zLu2NvV6Ut9$~SWJZ!#?}Uy}7ad5sx+*{bcf%JV0LUGvD6-1Vz+uKr#bbLrRi0p9E! z*|Nn;{xC8yT;OM5z@28q85kH!QY%VIi&BgAGmG-`;*)anle6^-^3oZ788`jw4DfU3 z<&pv=EnZI#mmmfP1_2P}U}IolkpKKYk%56x#M8wwq~g}vDV|*|4g#)w|L3wC-5Fz{ zW7D9)_hMN<;WviBKN>+>cD-p@7iXg+Jn6xIiJ)C~^Ok6Etz6}`EOXN9T~8|Ie(pOT z*sy!u>lBG&eD}NqMFKCI_*^eF;bHE5d_wTf`|sW|#}zqe)>nTqY+RNZGEMbq<-g`t ztNfN^dU;L?kU8F?bK0Nvv(4r=nX@b&^=*FO#rW#`R93%+tbJbRH@#U~!9i-J|d_8dm8Yo$wbZ%fQ!t-U|LA~fN)nP;NJzne{| zk^bE8+g7a0cDv#Dly$>~az-wNaGvuQn_iro$`rROe^-O#qz(H{u=K6&y4q?h!u8gP zC8CybUjzI3$_XE@R*3us7++V2?-CrektH&y2RvA)6mSTQuJ-3{DdSOzM}G^ zh;qMYsuK=RdiUb>i31xp&j0PNq&?w$dTDSXMMSN`KY1F;mVgfhf9s#*{oUm?6rB^ z2hpDguRYuT!eMd1pNGdvx%q1JZxr;r{FiuaUDqs;XS-P$kENeIuT>jgmswd~|Gz%` z-LC!h@AvbW{`>gl`96!_+;GNae5)gs-piP}x~TuS_wxLkM`k;5@$e?gx0u$O z<}GzQR*0t>EcGv)wmNgyKJQOvtJRvP_~eOQzLR>${%*~5+xedp+?%w&w_WAqf4WRV zSHtI%o`tI6d#B0&e!h+m_q-NTKU4nR(gR8XS&J%{TY5NqCw}Amd0Od_+*}qy%F-} z$hS#Z{qWU?A1Ai32lM2LZMyb3O@5Po&AhUCJO2H&HCUnb=KtG;sR6P7|42!MR6lvX zp5Okp>WxDiR`{>oYSnOhs;TRb>Q8IjebT-8m!D0HO!#>u@K?(%GqK&>bB#9hx!BD; zVE6yvwLQtHeKEW_?>47f>eRp7q+jsK+q;x|Z%4OJ{uZXP4f;<{%qVuw=nI_vYZ`m} z{IGXtld9+6|8G@NEYO{Fxa;UVhja^8qkA@=%8zZ5!tE<7Z@-9N zbY)$bK-$kI3#yLZx+$HkZlG&XQ8@EftIz7rpW#8P&J}(uY|l-+ah8>fUrqCCuFmOd zxuRELe|mq^f4ujretzcj{^vLA@7DjXPTwDQWTNxKP&a`9Gle4u*IcNZx$Iu6#OFE5 z^LRGTdAiNynM$R-z`W`t#piPZ_MPINQ@H+e(UIu}DIz(MCnJqczwg}g@=WDX-~QPy zrTlA>nXERiei*U*o#WXjT|Mf`TU?K+pTBRZhxLTnS(ih{>;q9_n)4dbu?>w_g}6g zGo7Tpg1Z(p-1q*_bkr@hJ4Eh(PxJi!_t@NaoZb6t#@EdmnWrDGT5VJGzWQ}fB%_VFpm4Y zLlY~$%&kdO=GMzi&P^>zT>b26P(Xm!nbT){bxxi+AG|4O#j~f6LIS+Bz0UaRo;>5r z+9mP2K}6GmwYyR2q5vZ+E3>S`X@PS_O`Cfj>Ihq$7CC3sy!p&S9d3)$LWxF`RNDl? zbUIc&eafT+c5<O(H$Kotx^ zj|mgb>IU5q*8o|0J?9FfecyctjR6FmMZjFyp1Wb$=Kb7^F&EBT9nv(@M${i&7Z^5;OBk z^!!{y6v~YCO!W*6-9I~-Gcd4x^mK6y$#7me%W$2HI}dBA`TC6)d_{h+wfQYN&?ppt zxN+Tr1K$fa9AmnFn6ay(CWZNKL4fgD^Rr6dmtR`m-{1e=mAmfm-}|pajek7-xi8LC z+f{(6!)lhuJ4a0s(FwkH`ZK$@O|J9KE);5bHi11?VfGE7A1>-e8BFO@o#kqpuJ4k( z&8o>DC6k-QGJX`VYS0UxhYBu3X{AGPD#wW(4>F<`qx#GHPv6{ zhj%Hk2$Y&=-f0ff&{CMaL;kXec*Z(uv&Sk7XBGKxIhbu!{m|+6O~8l2YHsvb^UZr*6gHi2oPwt^fC#cK&#t{n!2XzjyZQMI1R4US$OBU|$*# z;$T*2zf4o_LX3INF;9kB&T?BCbCSFt2+uvSkaJEbU*!kRxYubp;!7AZ3bw4|EScr^ zMA~%byyB+EO`^I7)-knK2Xr+Y>(o7{nOxz-y^k;Z(DR4Srz&wUy2$!+eP1Bb#dSjM z-Eotntg~LXoweX}C_d3_Ho-TCvu2U7rAg!FQ;Pg{2ea??yloO;;O#RrZS=d`S+iK} zazraq#ok+h12n+T5#;SwD-Gwmh!7$|Lu_x88`C tRvvl&OWkJQ_y2K$w8-N<{r>+MCm%0mUD{H(l7WGN!PC{xWt~$(699D4R)GKj diff --git a/src/test/resources/assets/uvlightmapjsontest/textures/blocks/BlockControllerLights.png.mcmeta b/src/test/resources/assets/uvlightmapjsontest/textures/blocks/BlockControllerLights.png.mcmeta deleted file mode 100644 index 3a077b37e..000000000 --- a/src/test/resources/assets/uvlightmapjsontest/textures/blocks/BlockControllerLights.png.mcmeta +++ /dev/null @@ -1,19 +0,0 @@ -{ - "animation": { - "frametime": 3, - "frames": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ] - } -} From 484af8baf33654c941218123140ec0cb2a9cbb79 Mon Sep 17 00:00:00 2001 From: shartte Date: Sun, 9 Aug 2020 12:24:42 +0200 Subject: [PATCH 06/10] Fixes #4574 by referencing only non-pure fluix crystals in the fluix dust grinder recipe. (#4578) --- .../data/appliedenergistics2/recipes/grinder/fluix_dust.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/appliedenergistics2/recipes/grinder/fluix_dust.json b/src/main/resources/data/appliedenergistics2/recipes/grinder/fluix_dust.json index ff6e3f270..79418aa3a 100644 --- a/src/main/resources/data/appliedenergistics2/recipes/grinder/fluix_dust.json +++ b/src/main/resources/data/appliedenergistics2/recipes/grinder/fluix_dust.json @@ -1,7 +1,7 @@ { "type": "appliedenergistics2:grinder", "input": { - "tag": "appliedenergistics2:crystals/fluix" + "item": "appliedenergistics2:fluix_crystal" }, "result": { "primary": { From 4230fc732512386da7ceae76b0903fa5da20cd07 Mon Sep 17 00:00:00 2001 From: yueh Date: Sun, 9 Aug 2020 13:23:24 +0200 Subject: [PATCH 07/10] Fixes #4576: Append the amount to each button (#4580) --- .../implementations/NumberEntryWidget.java | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java b/src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java index e04603275..4fb644f6d 100644 --- a/src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java +++ b/src/main/java/appeng/client/gui/implementations/NumberEntryWidget.java @@ -1,5 +1,7 @@ package appeng.client.gui.implementations; +import java.util.ArrayList; +import java.util.List; import java.util.function.Consumer; import java.util.function.LongConsumer; @@ -33,14 +35,7 @@ public class NumberEntryWidget implements ITickingWidget { private final NumberBox level; private final NumberEntryType type; - private Button plus1; - private Button plus10; - private Button plus100; - private Button plus1000; - private Button minus1; - private Button minus10; - private Button minus100; - private Button minus1000; + private List