values are now called settings

This commit is contained in:
FlorianMichael 2023-02-26 22:40:18 +01:00
parent 25c30ed9d7
commit 79395d748b
5 changed files with 5 additions and 28 deletions

View File

@ -33,9 +33,9 @@ ViaFabricPlus uses Gradle, to make sure that it is installed properly you can ch
4. Open the folder as a Gradle project in your preferred IDE.
5. Run the mod.
## Values
Values are optional settings that can turn fixes on and off, originally they were used for debugging<br>
![](/image/values.png)
## Settings
Settings are optional settings that can turn fixes on and off, originally they were used for debugging<br>
![](/image/settings.png)
## Addons
To make a ViaFabricPlus addon you just have to implement the ViaFabricPlusAddon interface in your main class:
@ -108,7 +108,7 @@ To create a setting group, you can simply use the SettingGroup class:
public class ExampleSettingGroup extends SettingGroup {
public final static ExampleSettingGroup INSTANCE = new ExampleSettingGroup();
public final BooleanSetting testValue = new BooleanSetting("Test", false);
public final BooleanSetting test = new BooleanSetting("Test", false);
public ExampleSettingGroup() {
super("Example");

View File

Before

Width:  |  Height:  |  Size: 401 KiB

After

Width:  |  Height:  |  Size: 401 KiB

View File

@ -23,7 +23,7 @@ public abstract class MixinOptionsScreen {
@Inject(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/widget/GridWidget$Adder;add(Lnet/minecraft/client/gui/widget/ClickableWidget;)Lnet/minecraft/client/gui/widget/ClickableWidget;", ordinal = 10, shift = At.Shift.AFTER), locals = LocalCapture.CAPTURE_FAILHARD)
public void addValuesButton(CallbackInfo ci, GridWidget gridWidget, GridWidget.Adder adder) {
adder.add(this.createButton(Text.literal("ViaFabricPlus").styled(style -> style.withColor(Formatting.GOLD)).append(" ").append("values"), () -> {
adder.add(this.createButton(Text.literal("ViaFabricPlus").styled(style -> style.withColor(Formatting.GOLD)).append(" ").append(" Settings..."), () -> {
ValuesScreen.INSTANCE.prevScreen = (OptionsScreen) (Object) this;
return ValuesScreen.INSTANCE;
}));

View File

@ -1,22 +0,0 @@
package de.florianmichael.viafabricplus.injection.mixin.fixes;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.predicate.entity.EntityPredicates;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(EntityPredicates.class)
public class MixinEntityPredicates {
@SuppressWarnings("target")
@Redirect(method = "method_5915(Lnet/minecraft/entity/Entity;Lnet/minecraft/scoreboard/AbstractTeam;Lnet/minecraft/scoreboard/AbstractTeam$CollisionRule;Lnet/minecraft/entity/Entity;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isMainPlayer()Z"))
private static boolean makeMainPlayerUnpushable(PlayerEntity player) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_8)) {
return false;
}
return player.isMainPlayer();
}
}

View File

@ -14,7 +14,6 @@
"fixes.MixinCamera",
"fixes.MixinClientPlayerInteractionManager",
"fixes.MixinClientPlayNetworkHandler",
"fixes.MixinEntityPredicates",
"fixes.MixinMinecraftClient",
"fixes.MixinPendingUpdateManager",
"fixes.MixinPlayerEntityRenderer",