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 /src/main/java/io | |
parent | 68cb08a1042d9f5e0c3315fc5755a6e8db3941aa (diff) | |
download | LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.tar.gz LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.tar.bz2 LibGui-f880c0d5ac35be17703581fa0dc847e0de053424.zip |
Update to 20w51a
Diffstat (limited to 'src/main/java/io')
4 files changed, 7 insertions, 7 deletions
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); |