mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 16:13:07 +00:00
LinkedItem Things
This commit is contained in:
1 parent
eb8b5387ea
commit
f51c636b79
6 files changed
+118
-6
No files matched your search
@@ -77,8 +77,10 @@ public class GuiNPCManageLinked extends GuiNPCInterface2 implements IScrollData,
|
||||
|
||||
this.addButton(new GuiNpcButton(3,guiLeft + 368, y += 22, 45, 20, "gui.edit"));
|
||||
this.addButton(new GuiNpcButton(4,guiLeft + 368, y += 22, 45, 20, "gui.copy"));
|
||||
this.addButton(new GuiNpcButton(5,guiLeft + 368, y += 22, 45, 20, "gui.build"));
|
||||
getButton(3).enabled = tab == 1;
|
||||
getButton(4).enabled = tab == 1;
|
||||
getButton(5).enabled = tab == 1;
|
||||
|
||||
if(scroll == null){
|
||||
scroll = new GuiCustomScroll(this,0,0);
|
||||
@@ -234,6 +236,12 @@ public class GuiNPCManageLinked extends GuiNPCInterface2 implements IScrollData,
|
||||
if(button.id == 3){
|
||||
setSubGui(new SubGuiLinkedItem(this, this.linkedItem));
|
||||
}
|
||||
if(button.id == 5){
|
||||
// Build Linked Item
|
||||
if(tab == 1)
|
||||
PacketClient.sendClient(new LinkedItemBuildPacket(this.linkedItem.getId()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,9 +325,6 @@ public class GuiNPCManageLinked extends GuiNPCInterface2 implements IScrollData,
|
||||
if(!((SubGuiEditText)subgui).cancelled){
|
||||
PacketClient.sendClient(new LinkedNPCAddPacket(((SubGuiEditText)subgui).text));
|
||||
}
|
||||
}
|
||||
else if (subgui instanceof SubGuiLinkedItem){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import noppes.npcs.api.item.IItemCustomizable;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.client.ClientCacheHandler;
|
||||
import noppes.npcs.client.renderer.ImageData;
|
||||
import noppes.npcs.items.ItemScripted;
|
||||
import noppes.npcs.items.ItemCustomizable;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
@@ -142,7 +142,7 @@ public class CustomItemRenderer implements IItemRenderer {
|
||||
GL11.glTranslatef(0.9375F, 0.0625F, 0.0F);
|
||||
GL11.glRotatef(-315.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
((ItemScripted) itemStack.getItem()).renderOffset(scriptCustomItem);
|
||||
((ItemCustomizable) itemStack.getItem()).renderOffset(scriptCustomItem);
|
||||
if(scriptCustomItem.isNormalItem()){
|
||||
GL11.glTranslatef(-0.05F, 0.3F, 0.3F);
|
||||
GL11.glRotatef(50, 1, 0, 0);
|
||||
|
||||
Reference in new issue
Block a user