Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Jun 24, 2024
1 parent c9b9ea7 commit 15ed18f
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 83 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.15.11

# Mod Properties
mod_version = 10.0.0
mod_version = 11.0.0
maven_group = io.github.cottonmc
archives_base_name = LibGui

# Dependencies
fabric_version=0.97.8+1.20.6
jankson_version=7.0.0+j1.2.3
modmenu_version=10.0.0-beta.1
fabric_version=0.100.3+1.21
jankson_version=8.0.0+j1.2.3
modmenu_version=11.0.1
libninepatch_version=1.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public interface BackgroundPainter {
* @since 1.5.0
*/
public static BackgroundPainter VANILLA = createLightDarkVariants(
createGuiSprite(new Identifier(LibGuiCommon.MOD_ID, "widget/panel_light")),
createGuiSprite(new Identifier(LibGuiCommon.MOD_ID, "widget/panel_dark"))
createGuiSprite(LibGuiCommon.id("widget/panel_light")),
createGuiSprite(LibGuiCommon.id("widget/panel_dark"))
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,16 @@ public static void texturedRect(DrawContext context, int x, int y, int width, in
float g = (color >> 8 & 255) / 255.0F;
float b = (color & 255) / 255.0F;
float a = (color >> 24 & 255) / 255.0F;
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
Matrix4f model = context.getMatrices().peek().getPositionMatrix();
RenderSystem.enableBlend();
RenderSystem.setShaderTexture(0, texture);
RenderSystem.setShaderColor(r, g, b, opacity * a);
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE);
buffer.vertex(model, x, y + height, 0).texture(u1, v2).next();
buffer.vertex(model, x + width, y + height, 0).texture(u2, v2).next();
buffer.vertex(model, x + width, y, 0).texture(u2, v1).next();
buffer.vertex(model, x, y, 0).texture(u1, v1).next();
BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE);
buffer.vertex(model, x, y + height, 0).texture(u1, v2);
buffer.vertex(model, x + width, y + height, 0).texture(u2, v2);
buffer.vertex(model, x + width, y, 0).texture(u2, v1);
buffer.vertex(model, x, y, 0).texture(u1, v1);
BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.disableBlend();
RenderSystem.setShaderColor(1, 1, 1, 1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package io.github.cottonmc.cotton.gui.impl;

import net.fabricmc.api.ModInitializer;
import net.minecraft.util.Identifier;

public final class LibGuiCommon implements ModInitializer {
public static final String MOD_ID = "libgui";

public static Identifier id(String path) {
return Identifier.of(MOD_ID, path);
}

@Override
public void onInitialize() {
ScreenNetworkingImpl.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ScreenNetworkingImpl implements ScreenNetworking {
private static final long MAX_NBT_SIZE = 0x200000L;

public record ScreenMessage(int syncId, Identifier message, NbtElement nbt) implements CustomPayload {
public static final Id<ScreenMessage> ID = new Id<>(new Identifier(LibGuiCommon.MOD_ID, "screen_message"));
public static final Id<ScreenMessage> ID = new Id<>(LibGuiCommon.id("screen_message"));
public static final PacketCodec<RegistryByteBuf, ScreenMessage> CODEC = PacketCodec.tuple(
PacketCodecs.INTEGER, ScreenMessage::syncId,
Identifier.PACKET_CODEC, ScreenMessage::message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.fabricmc.fabric.api.client.rendering.v1.CoreShaderRegistrationCallback;
import net.minecraft.client.gl.ShaderProgram;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.util.Identifier;

import io.github.cottonmc.cotton.gui.impl.LibGuiCommon;
import org.jetbrains.annotations.Nullable;
Expand All @@ -15,7 +14,7 @@ static void register() {
CoreShaderRegistrationCallback.EVENT.register(context -> {
// Register our core shaders.
// The tiled rectangle shader is used for performant tiled texture rendering.
context.register(new Identifier(LibGuiCommon.MOD_ID, "tiled_rectangle"), VertexFormats.POSITION, program -> tiledRectangle = program);
context.register(LibGuiCommon.id("tiled_rectangle"), VertexFormats.POSITION, program -> tiledRectangle = program);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ public void drawTiled(Identifier texture, DrawContext context, int x, int y, int
}
});

Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
RenderSystem.enableBlend();
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
buffer.vertex(positionMatrix, x, y, 0).next();
buffer.vertex(positionMatrix, x, y + regionHeight, 0).next();
buffer.vertex(positionMatrix, x + regionWidth, y + regionHeight, 0).next();
buffer.vertex(positionMatrix, x + regionWidth, y, 0).next();
BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
buffer.vertex(positionMatrix, x, y, 0);
buffer.vertex(positionMatrix, x, y + regionHeight, 0);
buffer.vertex(positionMatrix, x + regionWidth, y + regionHeight, 0);
buffer.vertex(positionMatrix, x + regionWidth, y, 0);
BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.disableBlend();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import net.minecraft.client.gui.screen.ButtonTextures;
import net.minecraft.util.Identifier;

import io.github.cottonmc.cotton.gui.impl.LibGuiCommon;
import io.github.cottonmc.cotton.gui.impl.mixin.client.PressableWidgetAccessor;
import io.github.cottonmc.cotton.gui.impl.mixin.client.SliderWidgetAccessor;

import static io.github.cottonmc.cotton.gui.impl.LibGuiCommon.id;

public final class WidgetTextures {
private static final ButtonTextures LIGHT_LABELED_SLIDER_HANDLE = new ButtonTextures(
SliderWidgetAccessor.libgui$getHandleTexture(),
Expand Down Expand Up @@ -46,10 +47,6 @@ public static ScrollBarTextures getScrollBarTextures(boolean dark) {
return dark ? DARK_SCROLL_BAR : LIGHT_SCROLL_BAR;
}

private static Identifier id(String path) {
return new Identifier(LibGuiCommon.MOD_ID, path);
}

public record ScrollBarTextures(Identifier background, Identifier thumb, Identifier thumbPressed,
Identifier thumbHovered) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.ArrayList;

public class WKirbSprite extends WWidget {
private static final Identifier KIRB = new Identifier(LibGuiCommon.MOD_ID, "textures/widget/kirb.png");
private static final Identifier KIRB = LibGuiCommon.id("textures/widget/kirb.png");

private static final float PX = 1f/416f;
private static final float KIRB_WIDTH = 32*PX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class WItemSlot extends WWidget {
*
* @since 6.2.0
*/
public static final Identifier SLOT_TEXTURE = new Identifier(LibGuiCommon.MOD_ID, "textures/widget/item_slot.png");
public static final Identifier SLOT_TEXTURE = LibGuiCommon.id("textures/widget/item_slot.png");

private static final VisualLogger LOGGER = new VisualLogger(WItemSlot.class);
private final List<ValidatedSlot> peers = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import io.github.cottonmc.cotton.gui.widget.data.InputResult;

public class WScrollBar extends WWidget {
private static final Identifier FOCUS_TEXTURE = new Identifier(LibGuiCommon.MOD_ID, "widget/scroll_bar/focus");
private static final Identifier FOCUS_TEXTURE = LibGuiCommon.id("widget/scroll_bar/focus");

/**
* The default {@linkplain #getScrollingSpeed() scrolling speed for mouse inputs}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
public class WSlider extends WAbstractSlider {
public static final int TRACK_WIDTH = 6;
public static final int THUMB_SIZE = 8;
public static final Identifier LIGHT_TEXTURE = new Identifier(LibGuiCommon.MOD_ID, "textures/widget/slider_light.png");
public static final Identifier DARK_TEXTURE = new Identifier(LibGuiCommon.MOD_ID, "textures/widget/slider_dark.png");
public static final Identifier LIGHT_TEXTURE = LibGuiCommon.id("textures/widget/slider_light.png");
public static final Identifier DARK_TEXTURE = LibGuiCommon.id("textures/widget/slider_dark.png");

@Environment(EnvType.CLIENT)
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.client.sound.PositionedSoundInstance;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;

import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
Expand Down Expand Up @@ -442,16 +441,16 @@ public void addNarrations(NarrationMessageBuilder builder) {
@Environment(EnvType.CLIENT)
final static class Painters {
static final BackgroundPainter SELECTED_TAB = BackgroundPainter.createLightDarkVariants(
BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/selected_light.png")).setTopPadding(2),
BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/selected_dark.png")).setTopPadding(2)
BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/selected_light.png")).setTopPadding(2),
BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/selected_dark.png")).setTopPadding(2)
);

static final BackgroundPainter UNSELECTED_TAB = BackgroundPainter.createLightDarkVariants(
BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/unselected_light.png")),
BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/unselected_dark.png"))
BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/unselected_light.png")),
BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/unselected_dark.png"))
);

static final BackgroundPainter SELECTED_TAB_FOCUS_BORDER = BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/focus.png")).setTopPadding(2);
static final BackgroundPainter UNSELECTED_TAB_FOCUS_BORDER = BackgroundPainter.createNinePatch(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/tab/focus.png"));
static final BackgroundPainter SELECTED_TAB_FOCUS_BORDER = BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/focus.png")).setTopPadding(2);
static final BackgroundPainter UNSELECTED_TAB_FOCUS_BORDER = BackgroundPainter.createNinePatch(LibGuiCommon.id("textures/widget/tab/focus.png"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,16 @@ protected void renderTextField(DrawContext context, int x, int y) {

@Environment(EnvType.CLIENT)
private void invertedRect(DrawContext context, int x, int y, int width, int height) {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
Matrix4f model = context.getMatrices().peek().getPositionMatrix();
RenderSystem.setShaderColor(0.0F, 0.0F, 1.0F, 1.0F);
RenderSystem.setShader(GameRenderer::getPositionProgram);
RenderSystem.enableColorLogicOp();
RenderSystem.logicOp(GlStateManager.LogicOp.OR_REVERSE);
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
buffer.vertex(model, x, y + height, 0).next();
buffer.vertex(model, x + width, y + height, 0).next();
buffer.vertex(model, x + width, y, 0).next();
buffer.vertex(model, x, y, 0).next();
BufferBuilder buffer = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
buffer.vertex(model, x, y + height, 0);
buffer.vertex(model, x + width, y + height, 0);
buffer.vertex(model, x + width, y, 0);
buffer.vertex(model, x, y, 0);
BufferRenderer.drawWithGlobalProgram(buffer.end());
RenderSystem.disableColorLogicOp();
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

public class WToggleButton extends WWidget {
// Default on/off images
protected static final Texture DEFAULT_OFF_IMAGE = new Texture(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/toggle_off.png"));
protected static final Texture DEFAULT_ON_IMAGE = new Texture(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/toggle_on.png"));
protected static final Texture DEFAULT_FOCUS_IMAGE = new Texture(new Identifier(LibGuiCommon.MOD_ID, "textures/widget/toggle_focus.png"));
protected static final Texture DEFAULT_OFF_IMAGE = new Texture(LibGuiCommon.id("textures/widget/toggle_off.png"));
protected static final Texture DEFAULT_ON_IMAGE = new Texture(LibGuiCommon.id("textures/widget/toggle_on.png"));
protected static final Texture DEFAULT_FOCUS_IMAGE = new Texture(LibGuiCommon.id("textures/widget/toggle_focus.png"));

protected Texture onImage;
protected Texture offImage;
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"depends": {
"java": ">=21",
"fabricloader": ">=0.15.11",
"fabric-api-base": ">=0.4.40",
"fabric-lifecycle-events-v1": "^2.3.4",
"fabric-networking-api-v1": "^4.0.8",
"fabric-rendering-v1": "^4.2.4",
"fabric-api-base": ">=0.4.42",
"fabric-lifecycle-events-v1": "^2.3.11",
"fabric-networking-api-v1": "^4.2.0",
"fabric-rendering-v1": "^5.0.3",
"fabric-resource-loader-v0": "*",
"minecraft": ">=1.20.6",
"jankson": "^7.0.0",
"minecraft": ">=1.21",
"jankson": "^8.0.0",
"libninepatch": "^1.2.0"
},
"suggests": {
Expand Down
21 changes: 12 additions & 9 deletions src/testMod/java/io/github/cottonmc/test/LibGuiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@ public class LibGuiTest implements ModInitializer {

@Override
public void onInitialize() {
Registry.register(Registries.ITEM, new Identifier(MODID, "client_gui"), new GuiItem());
Registry.register(Registries.ITEM, id("client_gui"), new GuiItem());

GUI_BLOCK = new GuiBlock();
Registry.register(Registries.BLOCK, new Identifier(MODID, "gui"), GUI_BLOCK);
Registry.register(Registries.BLOCK, id("gui"), GUI_BLOCK);
GUI_BLOCK_ITEM = new BlockItem(GUI_BLOCK, new Item.Settings());
Registry.register(Registries.ITEM, new Identifier(MODID, "gui"), GUI_BLOCK_ITEM);
Registry.register(Registries.ITEM, id("gui"), GUI_BLOCK_ITEM);
NO_BLOCK_INVENTORY_BLOCK = new NoBlockInventoryBlock(AbstractBlock.Settings.copy(Blocks.STONE));
Registry.register(Registries.BLOCK, new Identifier(MODID, "no_block_inventory"), NO_BLOCK_INVENTORY_BLOCK);
Registry.register(Registries.ITEM, new Identifier(MODID, "no_block_inventory"), new BlockItem(NO_BLOCK_INVENTORY_BLOCK, new Item.Settings()));
Registry.register(Registries.BLOCK, id("no_block_inventory"), NO_BLOCK_INVENTORY_BLOCK);
Registry.register(Registries.ITEM, id("no_block_inventory"), new BlockItem(NO_BLOCK_INVENTORY_BLOCK, new Item.Settings()));
GUI_BLOCKENTITY_TYPE = BlockEntityType.Builder.create(GuiBlockEntity::new, GUI_BLOCK).build(null);
Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(MODID, "gui"), GUI_BLOCKENTITY_TYPE);
Registry.register(Registries.BLOCK_ENTITY_TYPE, id("gui"), GUI_BLOCKENTITY_TYPE);

GUI_SCREEN_HANDLER_TYPE = new ScreenHandlerType<>((int syncId, PlayerInventory inventory) -> {
return new TestDescription(GUI_SCREEN_HANDLER_TYPE, syncId, inventory, ScreenHandlerContext.EMPTY);
}, FeatureSet.of(FeatureFlags.VANILLA));
Registry.register(Registries.SCREEN_HANDLER, new Identifier(MODID, "gui"), GUI_SCREEN_HANDLER_TYPE);
Registry.register(Registries.SCREEN_HANDLER, id("gui"), GUI_SCREEN_HANDLER_TYPE);
ITEM_SCREEN_HANDLER_TYPE = new ExtendedScreenHandlerType<>((syncId, inventory, slot) -> {
StackReference handStack = StackReference.of(inventory.player, slot);
return new TestItemDescription(syncId, inventory, handStack);
}, PacketCodecs.codec(EquipmentSlot.CODEC).cast());
Registry.register(Registries.SCREEN_HANDLER, new Identifier(MODID, "item_gui"), ITEM_SCREEN_HANDLER_TYPE);
Registry.register(Registries.SCREEN_HANDLER, id("item_gui"), ITEM_SCREEN_HANDLER_TYPE);

REALLY_SIMPLE_SCREEN_HANDLER_TYPE = new ScreenHandlerType<>(ReallySimpleDescription::new, FeatureSet.of(FeatureFlags.VANILLA));
Registry.register(Registries.SCREEN_HANDLER, new Identifier(MODID, "really_simple"), REALLY_SIMPLE_SCREEN_HANDLER_TYPE);
Registry.register(Registries.SCREEN_HANDLER, id("really_simple"), REALLY_SIMPLE_SCREEN_HANDLER_TYPE);

Optional<ModContainer> containerOpt = FabricLoader.getInstance().getModContainer("jankson");
if (containerOpt.isPresent()) {
Expand All @@ -87,4 +87,7 @@ public void onInitialize() {
}
}

public static Identifier id(String path) {
return Identifier.of(MODID, path);
}
}
15 changes: 8 additions & 7 deletions src/testMod/java/io/github/cottonmc/test/TestDescription.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.world.biome.Biome;

import io.github.cottonmc.cotton.gui.SyncedGuiDescription;
import io.github.cottonmc.cotton.gui.impl.LibGuiCommon;
import io.github.cottonmc.cotton.gui.networking.NetworkSide;
import io.github.cottonmc.cotton.gui.networking.ScreenNetworking;
import io.github.cottonmc.cotton.gui.widget.WButton;
Expand All @@ -23,9 +24,9 @@
import io.github.cottonmc.cotton.gui.widget.icon.TextureIcon;

public class TestDescription extends SyncedGuiDescription {
private static final Identifier TEST_MESSAGE = new Identifier("libgui", "test");
private static final Identifier TEST_REGISTRY_MESSAGE = new Identifier("libgui", "test_with_registry");
private static final Identifier UNREGISTERED_ON_SERVER = new Identifier("libgui", "unregistered_on_server");
private static final Identifier TEST_MESSAGE = LibGuiCommon.id("test");
private static final Identifier TEST_REGISTRY_MESSAGE = LibGuiCommon.id("test_with_registry");
private static final Identifier UNREGISTERED_ON_SERVER = LibGuiCommon.id("unregistered_on_server");

private int messagesSent;

Expand All @@ -49,23 +50,23 @@ public TestDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory pl
root.add(buttonA, 0, 3, 4, 1);

WButton buttonB = new WButton(Text.literal("Show Warnings"));
buttonB.setOnClick(() -> slot.setIcon(new TextureIcon(new Identifier("libgui-test", "saddle.png"))));
buttonB.setOnClick(() -> slot.setIcon(new TextureIcon(LibGuiTest.id("saddle.png"))));

root.add(buttonB, 5, 3, 4, 1);
TextureIcon testIcon = new TextureIcon(new Texture(new Identifier("libgui-test", "icon.png")));
TextureIcon testIcon = new TextureIcon(new Texture(LibGuiTest.id("icon.png")));
root.add(new WButton(testIcon, Text.literal("Button C")), 0, 5, 4, 1);
root.add(new WButton(Text.literal("Button D")), 5, 5, 4, 1);
root.add(new WTextField(Text.literal("Type something...")).setMaxLength(64), 0, 7, 5, 1);

root.add(new WLabel(Text.literal("Large Glass-only output:")), 0, 9);
WItemSlot glassOutputSlot = WItemSlot.outputOf(blockInventory, 0).setOutputFilter(stack -> stack.isOf(Items.GLASS));
glassOutputSlot.setIcon(new TextureIcon(new Identifier("minecraft:textures/block/glass.png")));
glassOutputSlot.setIcon(new TextureIcon(Identifier.ofVanilla("textures/block/glass.png")));
root.add(glassOutputSlot, 4, 9);
WToggleButton glassIconToggle = new WToggleButton(Text.literal("Show glass icon only when empty?"));
glassIconToggle.setOnToggle(glassOutputSlot::setIconOnlyPaintedForEmptySlots);
root.add(glassIconToggle, 0, 10);

root.add(WItemSlot.of(blockInventory, 7).setIcon(new TextureIcon(new Identifier("libgui-test", "saddle.png"))).setInputFilter(stack -> stack.isOf(Items.SADDLE)), 7, 10);
root.add(WItemSlot.of(blockInventory, 7).setIcon(new TextureIcon(LibGuiTest.id("saddle.png"))).setInputFilter(stack -> stack.isOf(Items.SADDLE)), 7, 10);

root.add(createPlayerInventoryPanel(), 0, 11);
System.out.println(root.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public void addTooltip(TooltipBuilder tooltip) {
WTiledSprite wood = new WTiledSprite(
8, 8, // tile width and height
500, // animation speed
new Identifier("minecraft:textures/block/birch_planks.png"),
new Identifier("minecraft:textures/block/dark_oak_planks.png"),
new Identifier("minecraft:textures/block/jungle_planks.png")
Identifier.ofVanilla("textures/block/birch_planks.png"),
Identifier.ofVanilla("textures/block/dark_oak_planks.png"),
Identifier.ofVanilla("textures/block/jungle_planks.png")
);
root.add(wood, 3, 3, 2, 2);
root.add(title, 0, 0);
Expand Down
Loading

0 comments on commit 15ed18f

Please sign in to comment.