Skip to content

Commit 633a840

Browse files
cleanup comments
1 parent 34e541a commit 633a840

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

src/main/java/me/juancarloscp52/bedrockify/common/block/entity/WaterCauldronBlockEntity.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,6 @@ protected void writeData(WriteView view) {
155155

156156
super.writeData(view);
157157
}
158-
// @Override
159-
// protected void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) {
160-
// super.readNbt(nbt, registryLookup);
161-
//
162-
// this.tintColor = nbt.getInt(KEY_FLUID_TINT).get();
163-
// this.fluidId = Identifier.tryParse(nbt.getString(KEY_FLUID_ITEM).get());
164-
// this.potionTypeId = Identifier.tryParse(nbt.getString(KEY_POTION_TYPE).get());
165-
// this.checkExactIds();
166-
// this.updateListeners();
167-
// }
168-
//
169-
// @Override
170-
// protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) {
171-
// nbt.putInt(KEY_FLUID_TINT, this.tintColor);
172-
// nbt.putString(KEY_FLUID_ITEM, (this.fluidId == null) ? "<NULL>" : this.fluidId.toString());
173-
// nbt.putString(KEY_POTION_TYPE, (this.potionTypeId == null) ? "<NULL>" : this.potionTypeId.toString());
174-
//
175-
// super.writeNbt(nbt, registryLookup);
176-
// }
177158

178159
@Nullable
179160
@Override

src/main/java/me/juancarloscp52/bedrockify/mixin/client/features/loadingScreens/LevelLoadingScreenMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected LevelLoadingScreenMixin(Text title) {
3232
public void render(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo info) {
3333
if(!BedrockifyClient.getInstance().settings.isLoadingScreenEnabled())
3434
return;
35-
// this.renderBackground(context, mouseX, mouseY, delta);
35+
3636
int xPosition = this.width / 2;
3737
int yPosition = this.height / 2;
3838
LoadingScreenWidget.getInstance().render(context, xPosition, yPosition, Text.translatable("narrator.loading", Text.translatable("loading.progress", this.progressProvider.getProgressPercentage()).getString()), null, this.progressProvider.getProgressPercentage());

src/main/java/me/juancarloscp52/bedrockify/mixin/client/features/screenSafeArea/BarMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.spongepowered.asm.mixin.Mixin;
1212
import org.spongepowered.asm.mixin.injection.At;
1313

14-
@Mixin(Bar.class)
14+
@Mixin(value = Bar.class, priority = 500)
1515
public interface BarMixin {
1616
@WrapOperation(method = "drawExperienceLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawText(Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;IIIZ)V"))
1717
private static void drawExperienceBar(DrawContext drawContext, TextRenderer textRenderer, Text text, int x, int y, int color, boolean shadow, Operation<Void> original) {

src/main/java/me/juancarloscp52/bedrockify/mixin/client/features/screenSafeArea/InGameHudMixin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
2222

2323
@Environment(EnvType.CLIENT)
24-
@Mixin(InGameHud.class)
24+
@Mixin(value = InGameHud.class, priority = 500)
2525
public abstract class InGameHudMixin {
2626
@Unique
2727
private int screenBorder;
@@ -51,11 +51,9 @@ private void drawTextureHotbar(DrawContext drawContext, RenderPipeline pipeline,
5151
private void drawTextureHotbar(DrawContext drawContext, RenderPipeline pipeline, Identifier texture, int i, int j, int k, int l, int x, int y, int width, int height, Operation<Void> original) {
5252
if((width ==29 && height == 24) || width == 182){
5353
drawContext.drawGuiTexture(pipeline, texture, i, j, k, l, x, y - screenBorder, width, height, ColorHelper.withAlpha(BedrockifyClient.getInstance().hudOpacity.getHudOpacity(true), -1));
54-
// original.call(drawContext, pipeline, texture, i, j, k, l, x, y - screenBorder, width, height);
5554
}else{
5655
boolean raisedEnabled = FabricLoader.getInstance().isModLoaded("raised");
5756
drawContext.drawGuiTexture(pipeline, texture, i, j, k, l, x, y - screenBorder, width, (width == 24 && !raisedEnabled) ? height+2 : height, ColorHelper.withAlpha(BedrockifyClient.getInstance().hudOpacity.getHudOpacity(true), -1));
58-
// original.call(drawContext, pipeline, texture, i, j, k, l, x, y - screenBorder, width, (width == 24 && !raisedEnabled) ? height+2 : height);
5957
}
6058
}
6159

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package me.juancarloscp52.bedrockify.mixin.client.features.screenSafeArea;
2+
3+
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
4+
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
5+
import me.juancarloscp52.bedrockify.client.BedrockifyClient;
6+
import net.minecraft.client.gui.hud.bar.LocatorBar;
7+
import net.minecraft.client.util.Window;
8+
import org.spongepowered.asm.mixin.Mixin;
9+
import org.spongepowered.asm.mixin.injection.At;
10+
import org.spongepowered.asm.mixin.injection.ModifyArg;
11+
12+
@Mixin(LocatorBar.class)
13+
public class LocatorBarMixin {
14+
15+
@ModifyArg(method = "renderBar", at = @At(value = "INVOKE",target = "Lnet/minecraft/client/gui/DrawContext;drawGuiTexture(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/util/Identifier;IIII)V"),index = 3)
16+
public int modifyTextureLocatorBar(int y){
17+
return y - BedrockifyClient.getInstance().settings.getScreenSafeArea();
18+
}
19+
20+
@WrapOperation(method = "renderAddons", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/bar/LocatorBar;getCenterY(Lnet/minecraft/client/util/Window;)I"))
21+
private int modfiyLocator(LocatorBar instance, Window window, Operation<Integer> original){
22+
return original.call(instance, window) - BedrockifyClient.getInstance().settings.getScreenSafeArea();
23+
}
24+
}

src/main/resources/bedrockify.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"client.features.screenSafeArea.ExperienceBarMixin",
4949
"client.features.screenSafeArea.InGameHudMixin",
5050
"client.features.screenSafeArea.JumpBarMixin",
51+
"client.features.screenSafeArea.LocatorBarMixin",
5152
"client.features.screenSafeArea.SubtitlesHudMixin",
5253
"client.features.screenSafeArea.detailArmorBar.ArmorBarRendererMixin",
5354
"client.features.slotHighlight.HandledScreenMixin",

0 commit comments

Comments
 (0)