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,44 +9,47 @@ import noppes.npcs.constants.ScriptContext;
* Manages a single script container for linked item hooks.
*/
public class LinkedItemScript extends SingleScriptHandler implements IScriptHandlerPacket {
/** The linked item ID for packet communication. -1 if not bound. */
/**
* The linked item ID for packet communication. -1 if not bound.
*/
private int linkedItemId = -1;
/**
* Create an unbound LinkedItemScript (for server-side use).
*/
public LinkedItemScript() {
}
/**
* Create a LinkedItemScript bound to a specific linked item (for GUI use).
*
* @param linkedItemId The ID of the LinkedItem
*/
public LinkedItemScript(int linkedItemId) {
this.linkedItemId = linkedItemId;
}
@Override
public ScriptContext getContext() {
return ScriptContext.LINKED_ITEM;
}
@Override
public String noticeString() {
return "LinkedItem";
}
@Override
public void requestData() {
if (linkedItemId >= 0)
if (linkedItemId >= 0)
LinkedItemScriptPacket.Get(linkedItemId);
}
@Override
public void sendSavePacket(int index, int totalCount, NBTTagCompound nbt) {
if (linkedItemId >= 0)
if (linkedItemId >= 0)
LinkedItemScriptPacket.Save(linkedItemId, index, totalCount, nbt);
}
}