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,53 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
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.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Mixin(StructureBlockEntity.class)
|
||||
public abstract class StructureBlockEntity_limitsMixin
|
||||
{
|
||||
@ModifyConstant(
|
||||
method = "load",
|
||||
constant = @Constant(intValue = 48)
|
||||
)
|
||||
private int positiveLimit(int original) {
|
||||
return CarpetSettings.structureBlockLimit;
|
||||
}
|
||||
|
||||
@ModifyConstant(
|
||||
method = "load",
|
||||
constant = @Constant(intValue = -48)
|
||||
)
|
||||
private int negativeLimit(int original) {
|
||||
return -CarpetSettings.structureBlockLimit;
|
||||
}
|
||||
|
||||
@ModifyArg(
|
||||
method = "saveStructure(Z)Z",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate;fillFromWorld(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Vec3i;ZLnet/minecraft/world/level/block/Block;)V"
|
||||
),
|
||||
index = 4
|
||||
)
|
||||
private Block ignoredBlock(Block original) {
|
||||
return CarpetSettings.structureBlockIgnoredBlock;
|
||||
}
|
||||
/*
|
||||
@Environment(EnvType.CLIENT)
|
||||
@ModifyConstant(
|
||||
method = "getSquaredRenderDistance",
|
||||
constant = @Constant(doubleValue = 96d)
|
||||
)
|
||||
private double outlineRenderDistanceLimit(double original) {
|
||||
return CarpetSettings.structureBlockOutlineDistance;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
Reference in new issue
Block a user