Large Cleanup to Code Imports and Formatting

This commit is contained in:
Kam committed 2026-01-22 23:07:38 -05:00
1 parent 31aac0d6b3
commit a9b602713c
155 files changed
+4089 -2194

No files matched your search

@@ -9,48 +9,53 @@ import noppes.npcs.constants.ScriptContext;
* Manages a single script container for recipe hooks (pre, post).
*/
public class RecipeScript extends SingleScriptHandler implements IScriptHandlerPacket {
/** The recipe ID for packet communication. -1 if not bound. */
/**
* The recipe ID for packet communication. -1 if not bound.
*/
private int recipeId = -1;
/** Whether this is an anvil recipe (vs carpentry). */
/**
* Whether this is an anvil recipe (vs carpentry).
*/
private boolean anvil = false;
/**
* Create an unbound RecipeScript (for server-side use).
*/
public RecipeScript() {
}
/**
* Create a RecipeScript bound to a specific recipe (for GUI use).
*
* @param recipeId The ID of the recipe
* @param anvil true for anvil recipe, false for carpentry recipe
* @param anvil true for anvil recipe, false for carpentry recipe
*/
public RecipeScript(int recipeId, boolean anvil) {
this.recipeId = recipeId;
this.anvil = anvil;
}
@Override
public ScriptContext getContext() {
return ScriptContext.RECIPE;
}
@Override
public String noticeString() {
return "RecipeScript";
}
@Override
public void requestData() {
if (recipeId >= 0)
if (recipeId >= 0)
RecipeScriptPacket.Get(anvil, recipeId);
}
@Override
public void sendSavePacket(int index, int totalCount, NBTTagCompound nbt) {
if (recipeId >= 0)
if (recipeId >= 0)
RecipeScriptPacket.Save(anvil, recipeId, index, totalCount, nbt);
}
@@ -63,4 +68,4 @@ public class RecipeScript extends SingleScriptHandler implements IScriptHandlerP
this.function = functionName;
}
}
}
}