mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 21:35:10 +00:00
New Anvil Recipe System
This commit is contained in:
1 parent
9cda5503ed
commit
48dd7bedea
15 files changed
+592
-221
No files matched your search
@@ -592,11 +592,15 @@ public class NoppesUtilServer {
|
||||
for(RecipeCarpentry recipe : RecipeController.Instance.globalRecipes.values()){
|
||||
map.put(recipe.name, recipe.id);
|
||||
}
|
||||
}
|
||||
} else if (size == 4){
|
||||
for(RecipeCarpentry recipe : RecipeController.Instance.carpentryRecipes.values()){
|
||||
map.put(recipe.name, recipe.id);
|
||||
}
|
||||
}
|
||||
else{
|
||||
for(RecipeCarpentry recipe : RecipeController.Instance.carpentryRecipes.values()){
|
||||
map.put(recipe.name, recipe.id);
|
||||
}
|
||||
for(RecipeAnvil recipe : RecipeController.Instance.anvilRecipes.values()){
|
||||
map.put(recipe.name, recipe.id);
|
||||
}
|
||||
}
|
||||
sendScrollData(player, map);
|
||||
}
|
||||
@@ -730,6 +734,17 @@ public class NoppesUtilServer {
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP)player, recipe.writeNBT());
|
||||
}
|
||||
|
||||
public static void setRecipeAnvilGui(EntityPlayerMP player, RecipeAnvil recipe){
|
||||
if(recipe == null)
|
||||
return;
|
||||
if(!(player.openContainer instanceof ContainerManageRecipes))
|
||||
return;
|
||||
|
||||
ContainerManageRecipes container = (ContainerManageRecipes) player.openContainer;
|
||||
container.setRecipe(recipe);
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP)player, recipe.writeNBT());
|
||||
}
|
||||
|
||||
public static void sendBank(EntityPlayerMP player,Bank bank) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
bank.writeEntityToNBT(compound);
|
||||
|
||||
Reference in new issue
Block a user