Merge branch 'master' into 1.16
# Conflicts: # src/main/resources/carpet.mixins.json
This commit is contained in:
commit
a4ac4cb01b
4 files changed
+44
No files matched your search
@@ -11,6 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
@Mixin(Chunk.class)
|
||||
public abstract class ChunkMixin
|
||||
{
|
||||
// failed to mixin into interface. need to mixin in two places that uses it
|
||||
@Inject(method = "markBlockForPostProcessing(Lnet/minecraft/util/math/BlockPos;)V",
|
||||
at =@At("HEAD"), cancellable = true)
|
||||
private void squashWarnings(BlockPos blockPos_1, CallbackInfo ci)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ChunkRegion;
|
||||
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.CallbackInfo;
|
||||
|
||||
@Mixin(ChunkRegion.class)
|
||||
public class ChunkRegion_scarpetPlopMixin
|
||||
{
|
||||
@Inject(method = "markBlockForPostProcessing", at = @At("HEAD"))
|
||||
private void markOrNot(BlockPos blockPos, CallbackInfo ci)
|
||||
{
|
||||
if (CarpetSettings.skipGenerationChecks) ci.cancel();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.structure.StructurePiece;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(StructurePiece.class)
|
||||
public class StructurePiece_scarpetPlopMixin
|
||||
{
|
||||
@Redirect(method = "addBlock", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/chunk/Chunk;markBlockForPostProcessing(Lnet/minecraft/util/math/BlockPos;)V"
|
||||
))
|
||||
private void markOrNot(Chunk chunk, BlockPos pos)
|
||||
{
|
||||
if (!CarpetSettings.skipGenerationChecks) chunk.markBlockForPostProcessing(pos);
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,8 @@
|
||||
"StructureFeatureMixin",
|
||||
"World_scarpetPlopMixin",
|
||||
"Biome_scarpetMixin",
|
||||
"ChunkRegion_scarpetPlopMixin",
|
||||
"StructurePiece_scarpetPlopMixin",
|
||||
|
||||
"ServerPlayNetworkHandler_scarpetEventsMixin",
|
||||
"ServerPlayerInteractionManager_scarpetEventsMixin",
|
||||
|
||||
Reference in new issue
Block a user