mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 07:35:11 +00:00
Implemented Scripted Custom Items.
This commit is contained in:
1 parent
5520fc5f2b
commit
26f5f86dca
34 files changed
+1476
-137
No files matched your search
@@ -100,6 +100,7 @@ import noppes.npcs.client.gui.roles.GuiNpcItemGiver;
|
||||
import noppes.npcs.client.gui.roles.GuiNpcTraderSetup;
|
||||
import noppes.npcs.client.gui.roles.GuiNpcTransporter;
|
||||
import noppes.npcs.client.gui.script.GuiScriptGlobal;
|
||||
import noppes.npcs.client.gui.script.GuiScriptItem;
|
||||
import noppes.npcs.client.model.*;
|
||||
import noppes.npcs.client.renderer.*;
|
||||
import noppes.npcs.client.renderer.blocks.BlockBannerRenderer;
|
||||
@@ -133,6 +134,7 @@ import noppes.npcs.containers.*;
|
||||
import noppes.npcs.controllers.PlayerData;
|
||||
import noppes.npcs.entity.*;
|
||||
|
||||
import noppes.npcs.items.ItemScripted;
|
||||
import noppes.npcs.scripted.interfaces.IWorld;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -358,6 +360,9 @@ public class ClientProxy extends CommonProxy {
|
||||
else if(gui == EnumGuiType.Script && CustomNpcs.ScriptingEnabled)
|
||||
return new GuiScript(npc);
|
||||
|
||||
else if (gui == EnumGuiType.ScriptItem)
|
||||
return new GuiScriptItem(Minecraft.getMinecraft().thePlayer);
|
||||
|
||||
else if(gui == EnumGuiType.PlayerAnvil)
|
||||
return new GuiNpcCarpentryBench((ContainerCarpentryBench) container);
|
||||
|
||||
@@ -536,7 +541,11 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerItem(Item item) {
|
||||
MinecraftForgeClient.registerItemRenderer(item, new NpcItemRenderer());
|
||||
if (item instanceof ItemScripted) {
|
||||
MinecraftForgeClient.registerItemRenderer(item, new CustomItemRenderer());
|
||||
} else {
|
||||
MinecraftForgeClient.registerItemRenderer(item, new NpcItemRenderer());
|
||||
}
|
||||
}
|
||||
|
||||
public static void bindTexture(ResourceLocation location) {
|
||||
|
||||
Reference in new issue
Block a user