Migrate Carpet Mixin names to mojang mappings
This commit is contained in:
1 parent
2c3871b90e
commit
a547677597
154 files changed
+422
-501
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||
import net.minecraft.client.renderer.blockentity.StructureBlockRenderer;
|
||||
import net.minecraft.world.level.block.entity.StructureBlockEntity;
|
||||
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(StructureBlockRenderer.class)
|
||||
public abstract class StructureBlockRenderer_mixin implements BlockEntityRenderer<StructureBlockEntity>
|
||||
{
|
||||
@Inject(method = "getViewDistance", at = @At("HEAD"), cancellable = true)
|
||||
void newLimit(CallbackInfoReturnable<Integer> cir)
|
||||
{
|
||||
if (CarpetSettings.structureBlockOutlineDistance != 96)
|
||||
cir.setReturnValue(CarpetSettings.structureBlockOutlineDistance);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user