fix username logger player list scrolling and remove unnecessary method
@@ -4,7 +4,6 @@ import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
-import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.matrix.MatrixStack;
@@ -88,7 +87,7 @@ public class UsernameLoggerScreen extends ContainerScreen<GenericTEContainer>{
@Override
public boolean mouseScrolled(double mouseX, double mouseY, double scroll)
{
- if(playerList != null)
+ if(playerList != null && playerList.isMouseOver(mouseX, mouseY))
playerList.mouseScrolled(mouseX, mouseY, scroll);
return super.mouseScrolled(mouseX, mouseY, scroll);
@@ -142,24 +141,6 @@ public class UsernameLoggerScreen extends ContainerScreen<GenericTEContainer>{
return height;
}
- @Override
- public boolean mouseClicked(double mouseX, double mouseY, int button)
- {
- if(tileEntity.getOwner().isOwner(minecraft.player))
- {
- int mouseListY = (int)(mouseY - top + scrollDistance - border);
- int slotIndex = mouseListY / slotHeight;
-
- if(mouseX >= left && mouseX <= right - 6 && slotIndex >= 0 && mouseListY >= 0 && slotIndex < listLength && mouseY >= top && mouseY <= bottom)
- {
- if(tileEntity.players[slotIndex] != null && !tileEntity.players[slotIndex].isEmpty())
- GLFW.glfwSetClipboardString(minecraft.getMainWindow().getHandle(), tileEntity.uuids[slotIndex]);
- }
- }
-
- return super.mouseClicked(mouseX, mouseY, button);
- }
-
@Override
public void render(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
{
