From ab75b7dafdcd147905f3d87c1e9c995aef39027c Mon Sep 17 00:00:00 2001 From: Falkreon Date: Fri, 30 Aug 2019 09:58:20 -0500 Subject: Update to 19w35a, rearrange ScreenDrawing, rename screens --- GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java | 4 ++-- .../main/java/io/github/cottonmc/test/client/LibGuiTestClient.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'GuiTest/src/main/java/io') diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java index 906ad82..b777361 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java @@ -1,6 +1,6 @@ package io.github.cottonmc.test; -import io.github.cottonmc.cotton.gui.client.ClientCottonScreen; +import io.github.cottonmc.cotton.gui.client.CottonClientScreen; import io.github.cottonmc.test.client.TestClientGui; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.player.PlayerEntity; @@ -22,7 +22,7 @@ public class GuiItem extends Item { @Override public TypedActionResult use(World world, PlayerEntity player, Hand hand) { if (world.isClient) { - MinecraftClient.getInstance().openScreen(new ClientCottonScreen(new TestClientGui())); + MinecraftClient.getInstance().openScreen(new CottonClientScreen(new TestClientGui())); } return new TypedActionResult(ActionResult.SUCCESS, (hand==Hand.MAIN_HAND) ? player.getMainHandStack() : player.getOffHandStack()); diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java index 360fd73..6db6902 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java @@ -1,6 +1,6 @@ package io.github.cottonmc.test.client; -import io.github.cottonmc.cotton.gui.client.CottonScreen; +import io.github.cottonmc.cotton.gui.client.CottonInventoryScreen; import io.github.cottonmc.test.LibGuiTest; import io.github.cottonmc.test.TestContainer; import net.fabricmc.api.ClientModInitializer; @@ -12,7 +12,7 @@ public class LibGuiTestClient implements ClientModInitializer { @Override public void onInitializeClient() { - ScreenProviderRegistry.INSTANCE.registerFactory(new Identifier(LibGuiTest.MODID, "gui"), (syncId, identifier, player, buf)->new CottonScreen(new TestContainer(syncId, player.inventory, BlockContext.create(player.getEntityWorld(), buf.readBlockPos())), player)); + ScreenProviderRegistry.INSTANCE.registerFactory(new Identifier(LibGuiTest.MODID, "gui"), (syncId, identifier, player, buf)->new CottonInventoryScreen(new TestContainer(syncId, player.inventory, BlockContext.create(player.getEntityWorld(), buf.readBlockPos())), player)); } } -- cgit