|
|
|
@ -35,6 +35,7 @@ import net.minecraft.resource.Resource;
|
|
|
|
|
import net.minecraft.resource.ResourceManager;
|
|
|
|
|
import net.minecraft.resource.ResourceType;
|
|
|
|
|
import net.minecraft.server.world.ServerWorld;
|
|
|
|
|
import net.minecraft.text.Style;
|
|
|
|
|
import net.minecraft.text.Text;
|
|
|
|
|
import net.minecraft.util.Identifier;
|
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
@ -46,6 +47,9 @@ import java.io.InputStream;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import static net.minecraft.item.ItemStack.DISPLAY_KEY;
|
|
|
|
|
import static net.minecraft.item.ItemStack.NAME_KEY;
|
|
|
|
|
|
|
|
|
|
public class RedControl implements ModInitializer {
|
|
|
|
|
// This logger is used to write text to the console and the log file.
|
|
|
|
|
// It is considered best practice to use your mod id as the logger's name.
|
|
|
|
@ -70,9 +74,12 @@ public class RedControl implements ModInitializer {
|
|
|
|
|
//Item Stacks
|
|
|
|
|
public static final ItemStack BASIC_DISK = new ItemStack(FLOPPY_ITEM);
|
|
|
|
|
public static final NbtCompound BASIC_NBT = new NbtCompound();
|
|
|
|
|
public static final NbtCompound BASIC_SUB_NBT = new NbtCompound();
|
|
|
|
|
|
|
|
|
|
public static final ItemStack SLIDESHOW_DISK = new ItemStack(FLOPPY_ITEM);
|
|
|
|
|
public static final NbtCompound SLIDESHOW_NBT = new NbtCompound();
|
|
|
|
|
public static final NbtCompound SLIDESHOW_SUB_NBT = new NbtCompound();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Item group
|
|
|
|
|
public static final ItemGroup ITEM_GROUP = FabricItemGroup.builder()
|
|
|
|
@ -95,7 +102,8 @@ public class RedControl implements ModInitializer {
|
|
|
|
|
BASIC_NBT.putString("serial", "BASIC");
|
|
|
|
|
BASIC_NBT.putInt("CustomModelData", 1);
|
|
|
|
|
BASIC_DISK.setNbt(BASIC_NBT);
|
|
|
|
|
BASIC_DISK.setCustomName(Text.literal("Basic boot disk"));
|
|
|
|
|
BASIC_SUB_NBT.putString(NAME_KEY, Text.Serialization.toJsonString(Text.literal("Basic Disk").setStyle(Style.EMPTY.withItalic(false))));
|
|
|
|
|
BASIC_DISK.setSubNbt(DISPLAY_KEY, BASIC_SUB_NBT);
|
|
|
|
|
entries.add(BASIC_DISK);
|
|
|
|
|
|
|
|
|
|
//Slideshow
|
|
|
|
@ -103,7 +111,8 @@ public class RedControl implements ModInitializer {
|
|
|
|
|
SLIDESHOW_NBT.putString("serial", "SLIDESHOW");
|
|
|
|
|
SLIDESHOW_NBT.putInt("CustomModelData", 2);
|
|
|
|
|
SLIDESHOW_DISK.setNbt(SLIDESHOW_NBT);
|
|
|
|
|
SLIDESHOW_DISK.setCustomName(Text.literal("Slideshow disk"));
|
|
|
|
|
SLIDESHOW_SUB_NBT.putString(NAME_KEY, Text.Serialization.toJsonString(Text.literal("Slideshow Disk").setStyle(Style.EMPTY.withItalic(false))));
|
|
|
|
|
SLIDESHOW_DISK.setSubNbt(DISPLAY_KEY, SLIDESHOW_SUB_NBT);
|
|
|
|
|
entries.add(SLIDESHOW_DISK);
|
|
|
|
|
}))
|
|
|
|
|
.build();
|
|
|
|
|