I want to change the Nether Bricks (Blocks and Item) to a different Texture if you toggle it inside of the Client Side Configuration.
But for some reason it doesn't change.
I change the Texture with the WorldEvent.Load Event with this peace of code and before I check if the Configuration Variable is true:
if (AWTDTweaksConfiguration.BLACK_NETHER_BRICKS.get()) {
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().bindForSetup(new ResourceLocation("another_world_to_discover:textures/blocks/nether_bricks.png"));
Minecraft.getInstance().getTextureManager().register(new ResourceLocation("minecraft:textures/block/nether_bricks.png"),
Minecraft.getInstance().getTextureManager().getTexture(new ResourceLocation("another_world_to_discover:textures/blocks/nether_bricks.png")));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().bindForSetup(new ResourceLocation("another_world_to_discover:textures/blocks/cracked_nether_bricks.png"));
Minecraft.getInstance().getTextureManager().register(new ResourceLocation("minecraft:textures/block/cracked_nether_bricks.png"),
Minecraft.getInstance().getTextureManager().getTexture(new ResourceLocation("another_world_to_discover:textures/blocks/cracked_nether_bricks.png")));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().bindForSetup(new ResourceLocation("another_world_to_discover:textures/blocks/chiseled_nether_bricks.png"));
Minecraft.getInstance().getTextureManager().register(new ResourceLocation("minecraft:textures/block/chiseled_nether_bricks.png"),
Minecraft.getInstance().getTextureManager().getTexture(new ResourceLocation("another_world_to_discover:textures/blocks/chiseled_nether_bricks.png")));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().bindForSetup(new ResourceLocation("another_world_to_discover:textures/items/nether_bricks.png"));
Minecraft.getInstance().getTextureManager().register(new ResourceLocation("minecraft:textures/item/nether_brick.png"),
Minecraft.getInstance().getTextureManager().getTexture(new ResourceLocation("another_world_to_discover:textures/items/nether_bricks.png")));
}
} else {
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().release(new ResourceLocation("minecraft:textures/block/nether_bricks.png"));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().release(new ResourceLocation("minecraft:textures/block/cracked_nether_bricks.png"));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().release(new ResourceLocation("minecraft:textures/block/chiseled_nether_bricks.png"));
}
if (world.isClientSide()) {
Minecraft.getInstance().getTextureManager().release(new ResourceLocation("minecraft:textures/item/nether_brick.png"));
}
}
}