Went down huge rabbit hole to attempt adding scripted events for players. Chock full of errors, trying to backport classes from the 1.12 version.

This commit is contained in:
luisc committed 2021-09-30 00:56:49 -05:00
1 parent 71e13a177f
commit 5a1c4757cf
72 files changed
+4014 -20

No files matched your search

@@ -1,16 +1,20 @@
package noppes.npcs.items;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import noppes.npcs.CustomItems;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import noppes.npcs.CustomNpcs;
import noppes.npcs.constants.EnumGuiType;
public class ItemNpcScripter extends Item{
public ItemNpcScripter(){
maxStackSize = 1;
setCreativeTab(CustomItems.tab);
@@ -25,7 +29,15 @@ public class ItemNpcScripter extends Item{
public boolean requiresMultipleRenderPasses(){
return true;
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){
if(!par2World.isRemote)
return par1ItemStack;
CustomNpcs.proxy.openGui(0, 0, 0, EnumGuiType.ScriptEvent, par3EntityPlayer);
return par1ItemStack;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister){