diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-12-17 11:47:43 +0200 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-12-17 11:47:43 +0200 |
commit | f880c0d5ac35be17703581fa0dc847e0de053424 (patch) | |
tree | ca28b585439316cdfcf47cb73c49f52310e1830b | |
parent | 68cb08a1042d9f5e0c3315fc5755a6e8db3941aa (diff) | |
download | LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.tar.gz LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.tar.bz2 LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.zip |
Update to 20w51a
5 files changed, 10 insertions, 10 deletions
diff --git a/gradle.properties b/gradle.properties index 84be842..13efc74 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=20w48a - yarn_mappings=20w48a+build.1 + minecraft_version=20w51a + yarn_mappings=20w51a+build.2 loader_version=0.10.8 # Mod Properties @@ -13,6 +13,6 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = LibGui # Dependencies - fabric_version=0.26.4+1.17 + fabric_version=0.28.3+1.17 jankson_version=3.0.1+j1.2.0 modmenu_version=2.0.0-beta.1+build.2 diff --git a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java index 6f81346..ec779a6 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java @@ -158,7 +158,7 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio /** WILL MODIFY toInsert! Returns true if anything was inserted. */ private boolean insertIntoExisting(ItemStack toInsert, Slot slot, PlayerEntity player) { ItemStack curSlotStack = slot.getStack(); - if (!curSlotStack.isEmpty() && ItemStack.method_31577(toInsert, curSlotStack) && slot.canInsert(toInsert)) { + if (!curSlotStack.isEmpty() && ItemStack.canCombine(toInsert, curSlotStack) && slot.canInsert(toInsert)) { int combinedAmount = curSlotStack.getCount() + toInsert.getCount(); int maxAmount = Math.min(toInsert.getMaxCount(), slot.getMaxItemCount()); if (combinedAmount <= maxAmount) { diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/access/ScreenAccessor.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/access/ScreenAccessor.java index 0d97e7c..33add9f 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/impl/access/ScreenAccessor.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/access/ScreenAccessor.java @@ -11,6 +11,6 @@ import java.util.List; @Mixin(Screen.class) public interface ScreenAccessor { - @Invoker("method_32633") + @Invoker void callRenderTooltipFromComponents(MatrixStack matrices, List<TooltipComponent> components, int x, int y); } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.java index 05c5c02..86b8016 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/TooltipBuilder.java @@ -39,7 +39,7 @@ public final class TooltipBuilder { public TooltipBuilder add(Text... lines) { Objects.requireNonNull(lines, "lines"); for (Text line : lines) { - components.add(TooltipComponent.createOrderedTextTooltipComponent(line.asOrderedText())); + components.add(TooltipComponent.of(line.asOrderedText())); } return this; @@ -55,7 +55,7 @@ public final class TooltipBuilder { public TooltipBuilder add(OrderedText... lines) { Objects.requireNonNull(lines, "lines"); for (OrderedText line : lines) { - components.add(TooltipComponent.createOrderedTextTooltipComponent(line)); + components.add(TooltipComponent.of(line)); } return this; @@ -86,7 +86,7 @@ public final class TooltipBuilder { */ public TooltipBuilder add(TooltipData tooltipData) { Objects.requireNonNull(tooltipData, "tooltipData"); - components.add(TooltipComponent.createTooltipComponent(tooltipData)); + components.add(TooltipComponent.of(tooltipData)); return this; } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java index ba5edd4..57cc8e6 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java @@ -4,8 +4,8 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.widget.AbstractButtonWidget; import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.client.util.math.Vector3f; import net.minecraft.text.Text; +import net.minecraft.util.math.Vec3f; import io.github.cottonmc.cotton.gui.client.ScreenDrawing; import io.github.cottonmc.cotton.gui.widget.data.Axis; @@ -169,7 +169,7 @@ public class WLabeledSlider extends WAbstractSlider { matrices.translate(x, y, 0); if (axis == Axis.VERTICAL) { matrices.translate(0, height, 0); - matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(270)); + matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(270)); } drawButton(matrices, 0, 0, 0, aWidth); |