allowed plopping of all sorts of structures regardless of required conditions
This commit is contained in:
1 parent
c0b79df6f6
commit
a990be607f
2 files changed
+24
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.structure.StructureGeneratorFactory;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
@Mixin(StructureGeneratorFactory.class)
|
||||
public interface StructureGeneratorFactory_plopMixin
|
||||
{
|
||||
@SuppressWarnings("UnresolvedMixinReference")
|
||||
@Redirect(method = "method_39845(Ljava/util/function/Predicate;Ljava/util/Optional;Lnet/minecraft/structure/StructureGeneratorFactory$Context;)Ljava/util/Optional;", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "java/util/function/Predicate.test(Ljava/lang/Object;)Z"
|
||||
))
|
||||
private static boolean checkMate(Predicate<Object> predicate, Object o)
|
||||
{
|
||||
return CarpetSettings.skipGenerationChecks.get() || predicate.test(o);
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,7 @@
|
||||
"ChunkRegion_scarpetPlopMixin",
|
||||
"StructurePiece_scarpetPlopMixin",
|
||||
"PlacedFeature_scarpetMixin",
|
||||
"StructureGeneratorFactory_plopMixin",
|
||||
|
||||
"ServerPlayNetworkHandler_scarpetEventsMixin",
|
||||
"ServerPlayerInteractionManager_scarpetEventsMixin",
|
||||
|
||||
Reference in new issue
Block a user