mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 00:17:27 +00:00
Merge branch 'dev' of https://github.com/KAMKEEL/CustomNPC-Plus into dev
This commit is contained in:
commit
2b494400c9
2 files changed
+1
-26
No files matched your search
@@ -511,14 +511,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose
|
||||
if (dialog.alignment == 1) {
|
||||
int i = totalRows - lineBlocks.get(lineBlocks.size() - 1).lines.size() - 1;
|
||||
height = count - totalRows + lineOffset - i + 1;
|
||||
screenPos = ClientProxy.Font.height() * (totalRows - lineOffset);// dialog.textHeight + ClientProxy.Font.height() + (totalRows - lineOffset);
|
||||
|
||||
int scrollToOffset = 0;
|
||||
if (totalRows * ClientProxy.Font.height() > dialog.textHeight) {
|
||||
scrollToOffset = totalRows - lineBlocks.get(lineBlocks.size() - 1).lines.size() + (int) Math.floor(lineBlocks.size() / 2f);
|
||||
}
|
||||
y = ((count - scrollToOffset) * ClientProxy.Font.height()) + screenPos + scrollY + height;
|
||||
|
||||
screenPos = ClientProxy.Font.height() * (totalRows - lineOffset);
|
||||
y = (height * ClientProxy.Font.height()) + screenPos + scrollY;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,22 +43,4 @@ public class ScriptGuiItemSlot extends ScriptGuiComponent implements IItemSlot {
|
||||
public int getType() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
public NBTTagCompound toNBT(NBTTagCompound nbt) {
|
||||
super.toNBT(nbt);
|
||||
if (this.hasStack()) {
|
||||
nbt.setTag("stack", this.stack.getItemNbt().getMCNBT());
|
||||
}
|
||||
|
||||
return nbt;
|
||||
}
|
||||
|
||||
public ScriptGuiComponent fromNBT(NBTTagCompound nbt) {
|
||||
super.fromNBT(nbt);
|
||||
if (nbt.hasKey("stack")) {
|
||||
this.setStack(NpcAPI.Instance().getIItemStack(ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("stack"))));
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user