Skip to content

Commit

Permalink
fixed the bad rendering on CItems
Browse files Browse the repository at this point in the history
the fix was to change a 0 to a 1 lmao
  • Loading branch information
XTerPL committed Jan 4, 2024
1 parent fc403b1 commit 2b3aeea
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.github.techstreet.dfscript.DFScript;
import io.github.techstreet.dfscript.screen.script.ScriptListScreen;
import io.github.techstreet.dfscript.screen.script.TestScreen;
import io.github.techstreet.dfscript.util.render.BlendableTexturedButtonWidget;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.option.OptionsScreen;
Expand Down Expand Up @@ -37,8 +36,5 @@ protected void init(CallbackInfo callbackInfo) {
ScriptListScreen screen = new ScriptListScreen(DFScript.MC.player != null);
DFScript.MC.setScreen(screen);
}));
this.addDrawableChild(new BlendableTexturedButtonWidget(5, 30, 20, 20, identifier_test, identifier_test_highlight, (button) -> {
DFScript.MC.setScreen(new TestScreen());
}));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.Items;
import net.minecraft.text.Text;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -38,7 +39,7 @@ public void render(@NotNull DrawContext context, int mouseX, int mouseY, float t

// float scaleFactor = (float) mc.getWindow().getScaleFactor();
float scaleFactor = 2;
stack.scale(scaleFactor,scaleFactor,0);
stack.scale(scaleFactor,scaleFactor,1F);

stack.translate(-width/2f, -height/2f, 0);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float tickDelta)
MatrixStack stack = context.getMatrices();
stack.push();
stack.translate(x, y, 0);
stack.scale(0.5F,0.5F,1F);
context.drawItem(item, 0, 0);
RenderUtil.renderGuiItem(context, item);
if(countText != null)
{
stack.translate(4, 4, 0);
Expand Down

0 comments on commit 2b3aeea

Please sign in to comment.