Last few changes for the moment
This commit is contained in:
parent
c629741dab
commit
c45d94e586
4 changed files with 16 additions and 2 deletions
|
@ -36,6 +36,7 @@ import net.minecraft.server.commands.GiveCommand;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.world.entity.item.ItemEntity;
|
import net.minecraft.world.entity.item.ItemEntity;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.level.GameType;
|
import net.minecraft.world.level.GameType;
|
||||||
|
@ -101,6 +102,7 @@ public class OTEMod
|
||||||
public OTEMod()
|
public OTEMod()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
OTEMod.OTEPrefix = ChatColor.doColors("!dark_gray![!dark_green!!bold!Thresholds!reset!!dark_gray!]!reset!");
|
OTEMod.OTEPrefix = ChatColor.doColors("!dark_gray![!dark_green!!bold!Thresholds!reset!!dark_gray!]!reset!");
|
||||||
OTEMod.ONLY_PLAYER = ChatColor.doColors("!dark_red!Only a player can execute this command");
|
OTEMod.ONLY_PLAYER = ChatColor.doColors("!dark_red!Only a player can execute this command");
|
||||||
|
|
||||||
|
@ -108,6 +110,7 @@ public class OTEMod
|
||||||
// Register the setup method for modloading
|
// Register the setup method for modloading
|
||||||
bus.addListener(this::setup);
|
bus.addListener(this::setup);
|
||||||
|
|
||||||
|
ModDyes.InitColors();
|
||||||
|
|
||||||
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, OTEServerConfig.SPEC, "otemod-rss-server.toml");
|
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, OTEServerConfig.SPEC, "otemod-rss-server.toml");
|
||||||
|
|
||||||
|
@ -150,6 +153,12 @@ public class OTEMod
|
||||||
{
|
{
|
||||||
ModMessages.register();
|
ModMessages.register();
|
||||||
|
|
||||||
|
System.out.println("-----------------------------------------------");
|
||||||
|
for (DyeColor color : DyeColor.values()) {
|
||||||
|
System.out.println(color.toString() + " " + color.getId());
|
||||||
|
}
|
||||||
|
System.out.println("-----------------------------------------------");
|
||||||
|
|
||||||
event.enqueueWork(()->{
|
event.enqueueWork(()->{
|
||||||
ModDyes.UpdateBlockEntities();
|
ModDyes.UpdateBlockEntities();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
package dev.zontreck.otemod.implementation;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.blocks.ModBlocks;
|
import dev.zontreck.otemod.blocks.ModBlocks;
|
||||||
import net.minecraft.world.item.DyeColor;
|
import net.minecraft.world.item.DyeColor;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
@ -16,8 +17,12 @@ public class ModDyes
|
||||||
|
|
||||||
public static DyeColor DARK_RED;
|
public static DyeColor DARK_RED;
|
||||||
|
|
||||||
static {
|
public static void InitColors() {
|
||||||
DARK_RED = DyeColor.byName("dark_red", DyeColor.WHITE);
|
DARK_RED = DyeColor.byName("dark_red", DyeColor.WHITE);
|
||||||
|
if(DARK_RED == DyeColor.WHITE) DARK_RED = DyeColor.byName("DARK_RED", DyeColor.BLACK);
|
||||||
|
if(DARK_RED == DyeColor.BLACK) {
|
||||||
|
OTEMod.LOGGER.error("Dye colors cannot be obtained properly: " + DARK_RED + " - " + DyeColor.byName("dark_red", DyeColor.WHITE));
|
||||||
|
}
|
||||||
DYES.add(DARK_RED);
|
DYES.add(DARK_RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public abstract class DyeColorMixin {
|
||||||
@Final
|
@Final
|
||||||
@Mutable
|
@Mutable
|
||||||
public static DyeColor[] $VALUES;
|
public static DyeColor[] $VALUES;
|
||||||
private static final DyeColor DARK_RED = addVariant("DARK_RED", "dark_red", 128000001, MapColor.COLOR_RED, 128000001, 128000001);
|
private static final DyeColor DARK_RED = addVariant("DARK_RED", "dark_red", 128000001, MapColor.COLOR_BLACK, 128000001, 128000001);
|
||||||
|
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Reference in a new issue