Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 1c8fd2a

Browse files
authored
Implemented getHeight and setHeight on AbstractButtonWidget (#191)
* Implement getHeight and setHeight on AbstractButtonWidget * Fixed code style on commit 0b87d35
1 parent ccbaadd commit 1c8fd2a

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
package net.patchworkmc.mixin.gui;
21+
22+
import org.spongepowered.asm.mixin.Mixin;
23+
import org.spongepowered.asm.mixin.Shadow;
24+
25+
import net.minecraft.client.gui.DrawableHelper;
26+
import net.minecraft.client.gui.widget.AbstractButtonWidget;
27+
28+
@Mixin(AbstractButtonWidget.class)
29+
public abstract class MixinAbstractButtonWidget extends DrawableHelper {
30+
@Shadow
31+
protected int height;
32+
33+
public int getHeight() {
34+
return this.height;
35+
}
36+
37+
public void setHeight(int value) {
38+
this.height = value;
39+
}
40+
}

patchwork-gui/src/main/resources/patchwork-gui.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"package": "net.patchworkmc.mixin.gui",
44
"compatibilityLevel": "JAVA_8",
55
"client": [
6+
"MixinAbstractButtonWidget",
67
"MixinAbstractInventoryScreen",
78
"MixinGameRenderer",
89
"MixinKeyboard",

0 commit comments

Comments
 (0)