Skip to content

Commit

Permalink
Mask and blooms fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DawnKiro committed Dec 13, 2024
1 parent c9b00bc commit 45d2c26
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 56 deletions.
9 changes: 7 additions & 2 deletions src/main/java/dev/jaegerwald/voidlings/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public class ModBlocks {
.nonOpaque()
.noCollision()
.pistonBehavior(PistonBehavior.DESTROY)
)
),
false
);

public static final Block ACID_ENCASED_MURIA = registerBlock("acid_encased_muria",
Expand All @@ -139,7 +140,11 @@ public class ModBlocks {
);

private static Block registerBlock(String name, Block block) {
registerBlockItem(name, block);
return registerBlock(name, block, true);
}

private static Block registerBlock(String name, Block block, boolean registerItem) {
if (registerItem) registerBlockItem(name, block);
return Registry.register(Registries.BLOCK, Identifier.of(Voidlings.MOD_ID, name), block);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jaegerwald.voidlings.mixin.client;
package dev.jaegerwald.voidlings.mixin;

import net.minecraft.client.MinecraftClient;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jaegerwald.voidlings.mixin.client;
package dev.jaegerwald.voidlings.mixin;

import com.llamalad7.mixinextras.sugar.Local;
import dev.jaegerwald.voidlings.rendering.DarkeningDimensionEffects;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package dev.jaegerwald.voidlings.mixin;

import dev.jaegerwald.voidlings.item.ModItems;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.LivingEntity;
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;

@Mixin(LivingEntityRenderer.class)
public class LivingEntityRendererMixin {
@Inject(method = "hasLabel(Lnet/minecraft/entity/LivingEntity;)Z", at = @At("HEAD"), cancellable = true)
private void ermActuallyItDoesntHaveLabel(LivingEntity livingEntity, CallbackInfoReturnable<Boolean> cir) {
if (livingEntity.getEquippedStack(EquipmentSlot.HEAD).isOf(ModItems.FENNEC_MASK)) cir.setReturnValue(false);
}
}

This file was deleted.

6 changes: 1 addition & 5 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
]
},
"mixins": [
"voidlings.mixins.json",
{
"config": "voidlings.client.mixins.json",
"environment": "client"
}
"voidlings.mixins.json"
],
"depends": {
"fabricloader": ">=${loader_version}",
Expand Down
12 changes: 0 additions & 12 deletions src/main/resources/voidlings.client.mixins.json

This file was deleted.

23 changes: 14 additions & 9 deletions src/main/resources/voidlings.mixins.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"required": true,
"package": "dev.jaegerwald.voidlings.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
"ExampleMixin"
],
"injectors": {
"defaultRequire": 1
}
"required": true,
"package": "dev.jaegerwald.voidlings.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
"ExampleMixin",
"ExampleClientMixin",
"LightmapTextureManagerMixin"
],
"injectors": {
"defaultRequire": 1
},
"client": [
"LivingEntityRendererMixin"
]
}

0 comments on commit 45d2c26

Please sign in to comment.