mirror of
https://github.com/wisplite/crystalline-sky.git
synced 2026-10-30 05:22:18 -05:00
fix fabric
This commit is contained in:
+2
-1
@@ -16,10 +16,11 @@ import java.util.Map;
|
||||
|
||||
@Mixin(BlockModel.Deserializer.class)
|
||||
public class BlockModelDeserializerMixin {
|
||||
@SuppressWarnings("LocalMayUseName")
|
||||
@WrapOperation(method = "getTextureMap", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/block/model/BlockModel$Deserializer;parseTextureLocationOrReference(Lnet/minecraft/resources/ResourceLocation;Ljava/lang/String;)Lcom/mojang/datafixers/util/Either;"))
|
||||
private Either<Material, String> modifyAtlas(ResourceLocation location, String name,
|
||||
Operation<Either<Material, String>> original, JsonObject json,
|
||||
@Local(name = "entry") Map.Entry<String, JsonElement> entry) {
|
||||
@Local Map.Entry<String, JsonElement> entry) {
|
||||
if (!entry.getKey().equals("particle") && json.has("crystalline_sky:atlas")) {
|
||||
location = ResourceLocation.parse(json.get("crystalline_sky:atlas").getAsString());
|
||||
}
|
||||
|
||||
+3
-2
@@ -13,10 +13,11 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
|
||||
@Mixin(ModelBlockRenderer.class)
|
||||
public class ModelBlockRendererMixin {
|
||||
// lucky us: fabric calls it bakedQuad, neoforge bakedquad
|
||||
// lucky us: fabric calls it bakedQuad, neoforge bakedquad. But naming doesn't work in prod fabric anyway :(
|
||||
@SuppressWarnings("LocalMayUseName")
|
||||
@WrapOperation(method = "renderModelFaceFlat", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/BlockAndTintGetter;getShade(Lnet/minecraft/core/Direction;Z)F"))
|
||||
private float fullBrightSkybox(BlockAndTintGetter instance, Direction direction, boolean shade,
|
||||
Operation<Float> original, @Local(name = {"bakedQuad", "bakedquad"}) BakedQuad bakedQuad) {
|
||||
Operation<Float> original, @Local/*(name = {"bakedQuad", "bakedquad"})*/ BakedQuad bakedQuad) {
|
||||
if (bakedQuad.getSprite().atlasLocation().equals(CrystallineAtlases.SKYBOXES.texture))
|
||||
return 1.0f;
|
||||
return original.call(instance, direction, shade);
|
||||
|
||||
+1
@@ -30,6 +30,7 @@ public class CrystallineSkyClientImpl implements ClientModInitializer {
|
||||
CrystallineBlocks.SKY.onRegistered(makeSky);
|
||||
CrystallineBlocks.WEEPING_SKY.onRegistered(makeSky);
|
||||
CrystallineBlocks.SKYBOX_TEST.onRegistered(makeSkybox);
|
||||
CrystallineBlocks.SKYBOX_SUNNY_DAY.onRegistered(makeSkybox);
|
||||
|
||||
ClientTickEvents.END_CLIENT_TICK.register(CrystallineSkyClient::onEndTick);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user