Skip to content

Commit

Permalink
use bone as item
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Mar 1, 2024
1 parent 7ff78f3 commit 3a0f27c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/main/java/de/pilz/customnpcsadvanced/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class CommonProxy implements IGuiHandler {
public void preInit(FMLPreInitializationEvent event) {
Config.init();
CustomNpcPlusExtras.LOG.info("I am Custom NPC+ Extras at version " + Tags.VERSION);
ItemRegistry.register();
}

// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/de/pilz/customnpcsadvanced/ItemRegistry.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
Expand All @@ -11,7 +12,6 @@

import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import de.pilz.customnpcsadvanced.ItemRegistry;
import de.pilz.customnpcsadvanced.api.ITileEntityNpcManager;
import de.pilz.customnpcsadvanced.api.TileEntityNpc;
import de.pilz.customnpcsadvanced.api.data.TileEntityNpcData;
Expand Down Expand Up @@ -47,7 +47,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
ItemStack heldItem = player.getHeldItem();

if (tile != null) {
if (heldItem != null && heldItem.getItem() == ItemRegistry.itemWandAdv
if (heldItem != null && heldItem.getItem() == Items.bone
&& (!ConfigMain.OpsOnly || NoppesUtilServer.isOp(player))) {
TileEntityNpcData npcData = TileEntityNpcManager.Instance.getNpcData(tile, true);
TileEntityNpc npc = new TileEntityNpc(event.world, npcData);
Expand Down

0 comments on commit 3a0f27c

Please sign in to comment.