From 245dbce8a2f55568dd112844f6c8714f0a981649 Mon Sep 17 00:00:00 2001 From: npc-strider Date: Mon, 14 Dec 2020 12:37:35 +0800 Subject: [PATCH] fixed build with @Overwrite --- .../io/github/npc_strider/oldbeacon/mixin/BeaconMixin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/npc_strider/oldbeacon/mixin/BeaconMixin.java b/src/main/java/io/github/npc_strider/oldbeacon/mixin/BeaconMixin.java index c3b8844..8c84e06 100644 --- a/src/main/java/io/github/npc_strider/oldbeacon/mixin/BeaconMixin.java +++ b/src/main/java/io/github/npc_strider/oldbeacon/mixin/BeaconMixin.java @@ -4,6 +4,7 @@ import java.util.LinkedList; import java.util.List; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; import io.github.npc_strider.oldbeacon.OldBeacon; @@ -38,11 +39,12 @@ public class BeaconMixin { // Code prevented clean compile, and it seems like we didn't need it anyway? (I'm a java noob) It still functions correctly ingame. Going to just define these constants now ^^^ rather than in this function. //Why am I not using injects ? - // I'm using overrides for the render for several reasons + // I'm using overwrite for the render for several reasons // 1. Not many mods will modify the vanilla beacon renderer - if they did then it's probably because they want to change its graphics. // If they are changing its graphics, then why bother using this mod? The graphics would conflict if the mixins worked together. // 2. This modification seems so complex that using injection isn't worth it anymore. // I was considering using it but once I started making changes to the beacon beam renderer pretty much everything within render is changed, so might as well override it. + @Overwrite public void render(BeaconBlockEntity beaconBlockEntity, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) { //Code here is for the nether star VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(NETHER_STAR);