Skip to content

Commit

Permalink
🚑 临时修复 #153(不是一个好的处理方案,会强制同步开启矿车实验性功能)
Browse files Browse the repository at this point in the history
  • Loading branch information
1024-byteeeee committed Jan 24, 2025
1 parent 23c15c4 commit 7befe1d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/amscarpet.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"rule.amsUpdateSuppressionCrashFix.MinecraftServerMixin",
"rule.amsUpdateSuppressionCrashFix.NeighborUpdaterMixin",
"rule.amsUpdateSuppressionCrashFix.WorldMixin",
"rule.commandCustomAntiFireItems_itemAntiExplosion.ItemEntityInvoker",
"rule.commandCustomAntiFireItems_itemAntiExplosion.ItemEntityMixin",
"rule.bambooCollisionBoxDisabled.BambooBlockMixin",
"rule.bambooModelNoOffset.AbstractBlockStateInvoker",
"rule.bambooModelNoOffset.BambooBlockMixin",
Expand All @@ -27,6 +25,8 @@
"rule.cakeBlockDropOnBreak.BlockMixin",
"rule.carpetAlwaysSetDefault.Carpet_SettingsManagerMixin",
"rule.commandAnvilInteractionDisabled.AnvilBlockMixin",
"rule.commandCustomAntiFireItems_itemAntiExplosion.ItemEntityInvoker",
"rule.commandCustomAntiFireItems_itemAntiExplosion.ItemEntityMixin",
"rule.commandCustomBlockBlastResistance.BlockMixin",
"rule.commandCustomBlockBlastResistance.FluidStateInvoker",
"rule.commandCustomBlockBlastResistance.FluidStateMixin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,16 @@ public abstract class FeatureSetMixin {
private boolean contains(boolean original) {
return AmsServerSettings.experimentalContentCheckDisabled ? true : original;
}

@ModifyReturnValue(
method = {
"of(Lnet/minecraft/resource/featuretoggle/FeatureUniverse;Ljava/util/Collection;)Lnet/minecraft/resource/featuretoggle/FeatureSet;",
"of(Lnet/minecraft/resource/featuretoggle/FeatureFlag;)Lnet/minecraft/resource/featuretoggle/FeatureSet;",
"of(Lnet/minecraft/resource/featuretoggle/FeatureFlag;[Lnet/minecraft/resource/featuretoggle/FeatureFlag;)Lnet/minecraft/resource/featuretoggle/FeatureSet;"
},
at = @At("RETURN")
)
private static FeatureSet of(FeatureSet original) {
return FeatureSet.empty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@Mixin(ToggleableFeature.class)
public interface ToggleableFeatureMixin {
@ModifyReturnValue(method = "isEnabled", at = @At("RETURN"))
private boolean getRequiredFeatures(boolean original) {
private boolean isEnabled(boolean original) {
return AmsServerSettings.experimentalContentCheckDisabled ? true : original;
}
}

0 comments on commit 7befe1d

Please sign in to comment.