Disabled the id tags in F3 mode and config option for this
parent
166c43d9c4
commit
26d3b8207d
|
@ -17,8 +17,9 @@ 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> 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,
|
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");
|
"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,
|
public static final Option<Boolean> ENABLE_CLOUDS = make("Enable Clouds", true, "Enables the rendering of clouds");
|
||||||
"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,
|
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");
|
"Makes the box model held by players and skeletons bigger and facing forward");
|
||||||
|
|
|
@ -2,9 +2,14 @@ package xyz.pixelatedw.finalbeta.mixin;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
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.LivingEntityRenderer;
|
||||||
import net.minecraft.client.render.entity.model.EntityModel;
|
import net.minecraft.client.render.entity.model.EntityModel;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import xyz.pixelatedw.finalbeta.ModConfig;
|
||||||
|
|
||||||
@Mixin(LivingEntityRenderer.class)
|
@Mixin(LivingEntityRenderer.class)
|
||||||
public class LivingEntityRendererMixin {
|
public class LivingEntityRendererMixin {
|
||||||
|
@ -13,4 +18,11 @@ public class LivingEntityRendererMixin {
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
protected EntityModel model;
|
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