Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9579a8d

Browse files
committedJun 18, 2024··
v2.0.1: Fix missing commands
1 parent c34846b commit 9579a8d

File tree

4 files changed

+11
-78
lines changed

4 files changed

+11
-78
lines changed
 

‎gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ minecraft_version=1.20
88
loader_version=0.15.6
99

1010
# Mod Properties
11-
mod_version=2.0
11+
mod_version=2.0.1
1212
maven_group=net.scenariopla
1313
mod_id=nbtexporter
1414
mod_name=NBT Exporter

‎src/main/java/net/scenariopla/nbtexporter/NBTExporter.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,27 @@
1010
import net.fabricmc.loader.api.FabricLoader;
1111

1212
import net.scenariopla.nbtexporter.command.ExportItemStackCommand;
13+
import net.scenariopla.nbtexporter.command.ExportItemStackGiveCommand;
1314
import net.scenariopla.nbtexporter.command.ExportItemStackNBTCommand;
15+
import net.scenariopla.nbtexporter.command.ExportStringifiedItemStackCommand;
16+
import net.scenariopla.nbtexporter.command.ExportStringifiedItemStackNBTCommand;
1417
import net.scenariopla.nbtexporter.command.ICommand;
1518
import net.scenariopla.nbtexporter.init.DirectoryInit;
1619

1720
public class NBTExporter implements ClientModInitializer {
1821
public class Reference {
1922
public static final String MOD_ID = "nbtexporter";
2023
public static final String NAME = "NBT Exporter";
21-
public static final String VERSION = "2.0";
24+
public static final String VERSION = "2.0.1";
2225

2326
public static final String MOD_DIRECTORY = MOD_ID;
2427

2528
public static final ICommand[] MOD_CLIENT_COMMANDS = {
29+
new ExportItemStackCommand(),
2630
new ExportItemStackNBTCommand(),
27-
new ExportItemStackCommand()
31+
new ExportStringifiedItemStackCommand(),
32+
new ExportStringifiedItemStackNBTCommand(),
33+
new ExportItemStackGiveCommand()
2834
};
2935

3036
public static final FabricLoader MINECRAFT = FabricLoader.getInstance();

‎src/main/java/net/scenariopla/nbtexporter/command/NBTExporterCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
1919
import net.minecraft.nbt.CompoundTag;
20+
import net.minecraft.nbt.NbtIo;
2021
import net.minecraft.network.chat.ClickEvent;
2122
import net.minecraft.network.chat.Component;
2223
import net.minecraft.world.entity.player.Player;
2324
import net.minecraft.world.item.ItemStack;
2425

2526
import net.scenariopla.nbtexporter.NBTExporter;
2627
import net.scenariopla.nbtexporter.NBTExporter.Reference;
27-
import net.scenariopla.nbtexporter.util.NBTFileWriter;
2828
import static net.scenariopla.nbtexporter.command.NBTExporterCommandExceptions.ExceptionCollection;
2929
import static net.scenariopla.nbtexporter.command.NBTExporterCommandExceptions.exception;
3030

@@ -134,7 +134,7 @@ protected static File writeToFile(File file,
134134
ByteArrayOutputStream byteArrayOutputStream = null;
135135
try {
136136
byteArrayOutputStream = new ByteArrayOutputStream();
137-
NBTFileWriter.writeCompoundGZIP(tag, byteArrayOutputStream);
137+
NbtIo.writeCompressed(tag, byteArrayOutputStream);
138138
return writeToFile(file, byteArrayOutputStream.toByteArray());
139139
} catch (IOException e) {
140140
e.printStackTrace();

‎src/main/java/net/scenariopla/nbtexporter/util/NBTFileWriter.java

-73
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.