Implemented Scripted Custom Items.

This commit is contained in:
Luis C.M committed 2022-05-11 01:10:31 -05:00
1 parent 5520fc5f2b
commit 26f5f86dca
34 files changed
+1476 -137

No files matched your search

@@ -5,10 +5,9 @@
package noppes.npcs.scripted.interfaces;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import noppes.npcs.scripted.ScriptItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.entity.ScriptPlayer;
public interface IContainer {
@@ -0,0 +1,25 @@
package noppes.npcs.scripted.interfaces;
public interface ICustomItem extends IItemStack {
String getTexture();
void setTexture(String var2);
void setMaxStackSize(int var1);
double getDurabilityValue();
void setDurabilityValue(float var1);
boolean getDurabilityShow();
void setDurabilityShow(boolean var1);
int getDurabilityColor();
void setDurabilityColor(int var1);
int getColor();
void setColor(int var1);
}
@@ -6,9 +6,8 @@
package noppes.npcs.scripted.interfaces;
import net.minecraft.entity.EntityCreature;
import noppes.npcs.constants.EnumNavType;
import noppes.npcs.scripted.ScriptFaction;
import noppes.npcs.scripted.ScriptItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.entity.ScriptLivingBase;
import noppes.npcs.scripted.entity.ScriptPlayer;
import noppes.npcs.scripted.roles.*;
@@ -196,7 +195,7 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @return The item held in the right hand
*/
public ScriptItemStack getRightItem();
public IItemStack getRightItem();
/**
* @param item Item to be held in the right hand
@@ -206,7 +205,7 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @return The item held in the left hand
*/
public ScriptItemStack getLefttItem();
public IItemStack getLefttItem();
/**
* @param item Item to be held in the left hand
@@ -216,7 +215,7 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
/**
* @return Returns the projectile the npc uses
*/
public ScriptItemStack getProjectileItem();
public IItemStack getProjectileItem();
/**
* @param item Item to be used as projectile
@@ -272,7 +271,7 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
* @param slot The armor slot to return. 0:head, 1:body, 2:legs, 3:boots
* @return Returns the worn armor in slot
*/
public ScriptItemStack getArmor(int slot);
public IItemStack getArmor(int slot);
/**
* @param slot The armor slot to set. 0:head, 1:body, 2:legs, 3:boots
@@ -285,7 +284,7 @@ public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
* @param slot The slot from the NPC's drop list to return (0-8)
* @return The item in the NPC's drop list slot
*/
public ScriptItemStack getLootItem(int slot);
public IItemStack getLootItem(int slot);
/**
*
@@ -7,7 +7,7 @@ package noppes.npcs.scripted.interfaces;
import net.minecraft.entity.Entity;
import noppes.npcs.scripted.entity.ScriptEntity;
import noppes.npcs.scripted.ScriptItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
public interface IEntity<T extends Entity> {
public double getYOffset();
@@ -2,7 +2,7 @@ package noppes.npcs.scripted.interfaces;
import net.minecraft.entity.EntityLivingBase;
import noppes.npcs.scripted.entity.ScriptEntity;
import noppes.npcs.scripted.ScriptItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.entity.ScriptLivingBase;
public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T> {
@@ -82,7 +82,7 @@ public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T
* @since 1.7.10c
* @return The item the entity is holding
*/
public ScriptItemStack getHeldItem();
public IItemStack getHeldItem();
/**
* Note not all Living Entities support this
@@ -96,7 +96,7 @@ public interface IEntityLivingBase<T extends EntityLivingBase> extends IEntity<T
* @param slot Slot of what armor piece to get, 0:boots, 1:pants, 2:body, 3:head
* @return The item in the given slot
*/
public ScriptItemStack getArmor(int slot);
public IItemStack getArmor(int slot);
/**
* Note not all Living Entities support this
@@ -1,7 +1,7 @@
package noppes.npcs.scripted.interfaces;
import net.minecraft.entity.player.EntityPlayerMP;
import noppes.npcs.scripted.ScriptItemStack;
import noppes.npcs.scripted.item.ScriptItemStack;
import noppes.npcs.scripted.ScriptPixelmonPlayerData;
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
@@ -90,7 +90,7 @@ public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T>
* @since 1.7.10d
* @return Returns a IItemStack array size 36
*/
public ScriptItemStack[] getInventory();
public IItemStack[] getInventory();
/**
* @param item The Item type to be removed
@@ -5,6 +5,7 @@ import net.minecraft.world.WorldServer;
import noppes.npcs.scripted.*;
import noppes.npcs.scripted.entity.ScriptEntity;
import noppes.npcs.scripted.entity.ScriptPlayer;
import noppes.npcs.scripted.item.ScriptItemStack;
public interface IWorld {
/**
@@ -166,7 +167,7 @@ public interface IWorld {
* @param size The number of items in the item
* @return Returns the item
*/
public ScriptItemStack createItem(String id, int damage, int size);
public IItemStack createItem(String id, int damage, int size);
/**
* @param directory The particle's texture directory. Use only forward slashes when writing a directory. Example: "customnpcs:textures/particle/tail.png"