diff --git a/patchwork-gui/src/main/java/net/patchworkmc/mixin/gui/MixinAbstractButtonWidget.java b/patchwork-gui/src/main/java/net/patchworkmc/mixin/gui/MixinAbstractButtonWidget.java new file mode 100644 index 00000000..5434e17f --- /dev/null +++ b/patchwork-gui/src/main/java/net/patchworkmc/mixin/gui/MixinAbstractButtonWidget.java @@ -0,0 +1,40 @@ +/* + * Minecraft Forge, Patchwork Project + * Copyright (c) 2016-2020, 2019-2020 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version 2.1 + * of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package net.patchworkmc.mixin.gui; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +import net.minecraft.client.gui.DrawableHelper; +import net.minecraft.client.gui.widget.AbstractButtonWidget; + +@Mixin(AbstractButtonWidget.class) +public abstract class MixinAbstractButtonWidget extends DrawableHelper { + @Shadow + protected int height; + + public int getHeight() { + return this.height; + } + + public void setHeight(int value) { + this.height = value; + } +} diff --git a/patchwork-gui/src/main/resources/patchwork-gui.mixins.json b/patchwork-gui/src/main/resources/patchwork-gui.mixins.json index 6bb1e5a0..4a01c95a 100644 --- a/patchwork-gui/src/main/resources/patchwork-gui.mixins.json +++ b/patchwork-gui/src/main/resources/patchwork-gui.mixins.json @@ -3,6 +3,7 @@ "package": "net.patchworkmc.mixin.gui", "compatibilityLevel": "JAVA_8", "client": [ + "MixinAbstractButtonWidget", "MixinAbstractInventoryScreen", "MixinGameRenderer", "MixinKeyboard",