More Core Class Conversion

This commit is contained in:
Kam committed 2026-03-13 16:22:48 -04:00
1 parent 43a52ad407
commit 89f81f96bc
51 files changed
+744 -189

No files matched your search

@@ -24,6 +24,7 @@ import noppes.npcs.controllers.AuctionController;
import noppes.npcs.controllers.data.AuctionClaim;
import noppes.npcs.controllers.data.AuctionFilter;
import noppes.npcs.controllers.data.AuctionListing;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
import java.util.List;
@@ -127,7 +128,7 @@ public class AuctionActionPacket extends AbstractPacket {
public static void requestListings(AuctionFilter filter, int page) {
AuctionActionPacket packet = new AuctionActionPacket(Action.RequestListings);
packet.amount = page;
packet.data = filter.writeToNBT(new NBTTagCompound());
packet.data = ((MC1710NBTCompound) filter.writeToNBT(new MC1710NBTCompound(new NBTTagCompound()))).getMCTag();
PacketClient.sendClient(packet);
}
@@ -412,7 +413,7 @@ public class AuctionActionPacket extends AbstractPacket {
AuctionFilter filter = new AuctionFilter();
if (filterNBT != null) {
filter.readFromNBT(filterNBT);
filter.readFromNBT(new MC1710NBTCompound(filterNBT));
}
// Get listings for this page
@@ -24,6 +24,7 @@ import noppes.npcs.controllers.AuctionController;
import noppes.npcs.controllers.data.AuctionClaim;
import noppes.npcs.controllers.data.AuctionFilter;
import noppes.npcs.controllers.data.AuctionListing;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
import java.util.ArrayList;
@@ -79,7 +80,7 @@ public class ManageAuctionPacket extends AbstractPacket {
public static void requestListings(AuctionFilter filter, int page) {
ManageAuctionPacket packet = new ManageAuctionPacket(Action.REQUEST_LISTINGS);
packet.page = page;
packet.data = filter != null ? filter.writeToNBT(new NBTTagCompound()) : new NBTTagCompound();
packet.data = filter != null ? ((MC1710NBTCompound) filter.writeToNBT(new MC1710NBTCompound(new NBTTagCompound()))).getMCTag() : new NBTTagCompound();
PacketClient.sendClient(packet);
}
@@ -229,7 +230,7 @@ public class ManageAuctionPacket extends AbstractPacket {
AuctionFilter filter = new AuctionFilter();
if (filterNbt != null) {
filter.readFromNBT(filterNbt);
filter.readFromNBT(new MC1710NBTCompound(filterNbt));
}
int totalListings = controller.getTotalActiveListings(filter);
@@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.controllers.TagController;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
import java.util.HashSet;
@@ -53,7 +54,7 @@ public final class CloneAllTagsPacket extends AbstractPacket {
NBTTagList validTagList = new NBTTagList();
for (Tag tag : validTags) {
NBTTagCompound tagCompound = new NBTTagCompound();
tag.writeNBT(tagCompound);
tag.writeNBT(new MC1710NBTCompound(tagCompound));
validTagList.appendTag(tagCompound);
}
compound.setTag("AllTags", validTagList);
@@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.controllers.TagController;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
import java.util.HashSet;
@@ -53,7 +54,7 @@ public final class CloneAllTagsShortPacket extends AbstractPacket {
NBTTagList validTagList = new NBTTagList();
for (Tag tag : validTags) {
NBTTagCompound tagCompound = new NBTTagCompound();
tag.writeShortNBT(tagCompound);
tag.writeShortNBT(new MC1710NBTCompound(tagCompound));
validTagList.appendTag(tagCompound);
}
compound.setTag("ShortTags", validTagList);
@@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.controllers.TagController;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
@@ -53,7 +54,7 @@ public final class TagGetPacket extends AbstractPacket {
NBTTagCompound compound = new NBTTagCompound();
Tag tag = TagController.getInstance().get(in.readInt());
tag.writeNBT(compound);
tag.writeNBT(new MC1710NBTCompound(compound));
GuiDataPacket.sendGuiData((EntityPlayerMP) player, compound);
}
@@ -17,6 +17,7 @@ import noppes.npcs.CustomNpcsPermissions;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.controllers.TagController;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
@@ -65,7 +66,7 @@ public final class TagRemovePacket extends AbstractPacket {
TagController.getInstance().delete(id);
NoppesUtilServer.sendTagDataAll((EntityPlayerMP) player);
NBTTagCompound comp = new NBTTagCompound();
(new Tag()).writeNBT(comp);
(new Tag()).writeNBT(new MC1710NBTCompound(comp));
GuiDataPacket.sendGuiData((EntityPlayerMP) player, comp);
}
}
@@ -18,6 +18,7 @@ import noppes.npcs.CustomNpcsPermissions;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.controllers.TagController;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
@@ -63,11 +64,11 @@ public final class TagSavePacket extends AbstractPacket {
return;
Tag tag = new Tag();
tag.readNBT(ByteBufUtils.readNBT(in));
tag.readNBT(new MC1710NBTCompound(ByteBufUtils.readNBT(in)));
TagController.getInstance().saveTag(tag);
NoppesUtilServer.sendTagDataAll((EntityPlayerMP) player);
NBTTagCompound comp = new NBTTagCompound();
tag.writeNBT(comp);
tag.writeNBT(new MC1710NBTCompound(comp));
GuiDataPacket.sendGuiData((EntityPlayerMP) player, comp);
}
}
@@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import noppes.npcs.constants.EnumRoleType;
import noppes.npcs.roles.RoleTransporter;
import noppes.npcs.wrapper.nbt.MC1710NBTCompound;
import java.io.IOException;
@@ -57,7 +58,7 @@ public final class TransportGetLocationPacket extends AbstractPacket {
RoleTransporter role = (RoleTransporter) npc.roleInterface;
if (role.hasTransport()) {
GuiDataPacket.sendGuiData((EntityPlayerMP) player, role.getLocation().writeNBT());
GuiDataPacket.sendGuiData((EntityPlayerMP) player, ((MC1710NBTCompound) role.getLocation().writeNBT()).getMCTag());
ScrollSelectedPacket.setSelectedList((EntityPlayerMP) player, role.getLocation().category.title);
}
}