mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 21:59:05 +00:00
Added handler support to NPC API.
This commit is contained in:
1 parent
69f96519dc
commit
d50f51e208
40 files changed
+1471
-56
No files matched your search
@@ -1,20 +1,24 @@
|
||||
package noppes.npcs.controllers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.scripted.handler.data.IRecipe;
|
||||
|
||||
public class RecipeCarpentry extends ShapedRecipes{
|
||||
public class RecipeCarpentry extends ShapedRecipes implements IRecipe {
|
||||
public int id = -1;
|
||||
public String name = "";
|
||||
public Availability availability = new Availability();
|
||||
@@ -222,4 +226,64 @@ public class RecipeCarpentry extends ShapedRecipes{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public ItemStack getResult() {
|
||||
return this.getRecipeOutput();
|
||||
}
|
||||
|
||||
public boolean isGlobal() {
|
||||
return this.isGlobal;
|
||||
}
|
||||
|
||||
public void setIsGlobal(boolean bo) {
|
||||
this.isGlobal = bo;
|
||||
}
|
||||
|
||||
public boolean getIgnoreNBT() {
|
||||
return this.ignoreNBT;
|
||||
}
|
||||
|
||||
public void setIgnoreNBT(boolean bo) {
|
||||
this.ignoreNBT = bo;
|
||||
}
|
||||
|
||||
public boolean getIgnoreDamage() {
|
||||
return this.ignoreDamage;
|
||||
}
|
||||
|
||||
public void setIgnoreDamage(boolean bo) {
|
||||
this.ignoreDamage = bo;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return this.recipeWidth;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return this.recipeHeight;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
try {
|
||||
RecipeController.instance.saveRecipe(this.writeNBT());
|
||||
} catch (IOException var2) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
RecipeController.instance.delete(this.id);
|
||||
}
|
||||
|
||||
public ItemStack[] getRecipe() {
|
||||
return this.recipeItems;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user