restored structureBlockOutlineDistance

This commit is contained in:
gnembon committed 2021-02-17 23:36:11 -04:00
1 parent d2077c2fad
commit d537faae98
3 files changed
+23 -1

No files matched your search

+1 -1
View File
@@ -859,5 +859,5 @@ public class CarpetSettings
strict = false,
validate = Validator.NONNEGATIVE_NUMBER.class
)
public static double structureBlockOutlineDistance = 96d;
public static int structureBlockOutlineDistance = 96;
}
@@ -0,0 +1,21 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.block.entity.StructureBlockBlockEntity;
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
import net.minecraft.client.render.block.entity.StructureBlockBlockEntityRenderer;
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(StructureBlockBlockEntityRenderer.class)
public abstract class StructureBlockBlockEntityRenderer_mixin implements BlockEntityRenderer<StructureBlockBlockEntity>
{
@Inject(method = "method_33893", at = @At("HEAD"), cancellable = true)
void newLimit(CallbackInfoReturnable<Integer> cir)
{
if (CarpetSettings.structureBlockOutlineDistance != 96)
cir.setReturnValue(CarpetSettings.structureBlockOutlineDistance);
}
}
+1
View File
@@ -206,6 +206,7 @@
"InGameHudMixin",
"PlayerListHudMixin",
"PistonBlockEntityRenderer_movableTEMixin",
"StructureBlockBlockEntityRenderer_mixin",
"ClientPlayerEntity_clientCommandMixin",
"WorldRenderer_fogOffMixin",
"WorldRenderer_creativeNoClipMixin",