Skip to content

Commit

Permalink
partially fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Oct 3, 2024
1 parent f7cc59c commit 92764ea
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static <T extends GuiData> void open(int windowId, @NotNull UIFactory<T>
WidgetTree.collectSyncValues(syncManager, panel);
ModularScreen screen = factory.createScreen(guiData, panel);
screen.getContext().setJeiSettings(jeiSettings);
GuiScreenWrapper guiScreenWrapper = new GuiScreenWrapper(new ModularContainer(player, syncManager, panel.getName()), screen);
GuiContainerWrapper guiScreenWrapper = new GuiContainerWrapper(new ModularContainer(player, syncManager, panel.getName()), screen);
guiScreenWrapper.inventorySlots.windowId = windowId;
HoloUI.builder()
// .screenScale(0.25f)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.cleanroommc.modularui.holoui;

import com.cleanroommc.modularui.screen.GuiScreenWrapper;
import com.cleanroommc.modularui.screen.ModularContainer;
import com.cleanroommc.modularui.screen.ModularPanel;
import com.cleanroommc.modularui.screen.ModularScreen;
import com.cleanroommc.modularui.screen.*;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/cleanroommc/modularui/holoui/Plane3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import com.cleanroommc.modularui.utils.GuiUtils;

import com.cleanroommc.modularui.utils.Matrix4f;

import com.cleanroommc.modularui.utils.Vector3f;

import net.minecraft.client.renderer.GlStateManager;

import net.minecraft.util.math.Vec3d;
import org.jetbrains.annotations.ApiStatus;
import org.lwjgl.util.vector.Matrix4f;
import org.lwjgl.util.vector.Vector3f;

/**
* Highly experimental
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.cleanroommc.modularui.holoui;

import com.cleanroommc.modularui.ModularUI;
import com.cleanroommc.modularui.screen.GuiContainerWrapper;
import com.cleanroommc.modularui.utils.Animator;

Expand Down Expand Up @@ -57,8 +56,8 @@ public void doRender(@NotNull HoloScreenEntity entity, double x, double y, doubl
plane3D.transform();
}
var mouse = calculateMousePos(player.getPositionVector().add(0, player.getEyeHeight(), 0), entity, player.getLookVec());
screenWrapper.drawScreen(mouse.getX(), mouse.getY(), partialTicks);
// screen.drawScreen(mouse.getX(), mouse.getY(), partialTicks);
// screenWrapper.drawScreen(mouse.getX(), mouse.getY(), partialTicks);
screen.drawScreen(mouse.getX(), mouse.getY(), partialTicks);
screen.onFrameUpdate();

UUID id = player.getUniqueID();
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/com/cleanroommc/modularui/widgets/ItemSlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ private void drawSlot(Slot slotIn) {
}

float z = 100f;
// todo fix
((GuiAccessor) guiScreen).setZLevel(z);
float zStart = ((GuiAccessor) guiScreen).getZLevel();
((GuiAccessor) guiScreen).setZLevel(zStart + z);
renderItem.zLevel += z;

if (!flag1) {
Expand All @@ -235,7 +235,7 @@ private void drawSlot(Slot slotIn) {
// render the item itself
// renderItem.renderItemAndEffectIntoGUI(guiScreen.mc.player, itemstack, 1, 1);
// guiScreen.getItemRenderer().renderItemAndEffectIntoGUI(guiScreen.mc.player, itemstack, 1, 1);
guiScreen.drawItem(itemstack, 1, 1);
renderItem.renderItemIntoGUI(itemstack, 1, 1);
if (amount < 0) {
amount = itemstack.getCount();
}
Expand Down Expand Up @@ -276,8 +276,7 @@ private void drawSlot(Slot slotIn) {
}
}

// todo fix
((GuiAccessor) guiScreen).setZLevel(0f);
((GuiAccessor) guiScreen).setZLevel(zStart);
renderItem.zLevel -= z;
}

Expand Down

0 comments on commit 92764ea

Please sign in to comment.