Disabled the id tags in F3 mode and config option for this
parent
166c43d9c4
commit
26d3b8207d
|
@ -17,9 +17,10 @@ public class ModConfig {
|
|||
public static final Option<Boolean> SUGAR_CANE_ON_SAND = make("Sugar Cane on sand", true, "Allows sugar canes to be placed on sand");
|
||||
public static final Option<Boolean> ADD_MORE_SOUNDS = make("Add more sounds", true,
|
||||
"Links a few more sounds from your local 'resources' folder with the game, namely for item breaking, minecarts and chests");
|
||||
public static final Option<Boolean> ENABLE_CLOUDS = make("Enable Clouds", true,
|
||||
"Enables the rendering of clouds");
|
||||
|
||||
public static final Option<Boolean> ENABLE_CLOUDS = make("Enable Clouds", true, "Enables the rendering of clouds");
|
||||
public static final Option<Boolean> DISABLE_ID_TAGS = make("Disable ID Tags", true,
|
||||
"Disables id tags showing above entities in F3 mode");
|
||||
|
||||
public static final Option<Boolean> FIX_BOW_MODEL = make("Fix bow model", true,
|
||||
"Makes the box model held by players and skeletons bigger and facing forward");
|
||||
public static final Option<Boolean> FIX_MINECART_FLICKERING = make("Fix minecart flickering", true,
|
||||
|
@ -38,7 +39,7 @@ public class ModConfig {
|
|||
"Fixes saddles not dropping when killing saddled pigs");
|
||||
public static final Option<Boolean> FIX_FURNACE_LAVA_BUCKET = make("Fix furnace lava bucket", true,
|
||||
"Fixes furnaces consuming the bucket when using lava buckets as fuel");
|
||||
|
||||
|
||||
private static ModConfig instance = new ModConfig();
|
||||
public static final ModConfig instance() {
|
||||
return instance;
|
||||
|
@ -77,7 +78,7 @@ public class ModConfig {
|
|||
public <T> T get(Option<T> o) {
|
||||
return this.fileConfig.getOrElse(o.name, o.defaultValue);
|
||||
}
|
||||
|
||||
|
||||
public <T> T set(Option<T> o, T value) {
|
||||
return this.fileConfig.set(o.name, value);
|
||||
}
|
||||
|
@ -101,7 +102,7 @@ public class ModConfig {
|
|||
public T get() {
|
||||
return ModConfig.instance().get(this);
|
||||
}
|
||||
|
||||
|
||||
public void set(T value) {
|
||||
ModConfig.instance().set(this, value);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,14 @@ package xyz.pixelatedw.finalbeta.mixin;
|
|||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.render.entity.LivingEntityRenderer;
|
||||
import net.minecraft.client.render.entity.model.EntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import xyz.pixelatedw.finalbeta.ModConfig;
|
||||
|
||||
@Mixin(LivingEntityRenderer.class)
|
||||
public class LivingEntityRendererMixin {
|
||||
|
@ -13,4 +18,11 @@ public class LivingEntityRendererMixin {
|
|||
|
||||
@Shadow
|
||||
protected EntityModel model;
|
||||
|
||||
@Inject(method = "method_821", at = @At("HEAD"), cancellable = true)
|
||||
public void method_821(LivingEntity entity, double d, double d1, double d2, CallbackInfo ci) {
|
||||
if (ModConfig.DISABLE_ID_TAGS.get()) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue