11
11
import net .minecraft .client .audio .PositionedSoundRecord ;
12
12
import net .minecraft .client .renderer .GlStateManager ;
13
13
import net .minecraft .init .SoundEvents ;
14
+ import net .minecraft .util .ResourceLocation ;
14
15
15
16
import java .util .ArrayList ;
16
17
@@ -31,7 +32,7 @@ public Component(String name, int x, int y, boolean open) {
31
32
this .x = x ;
32
33
this .y = y ;
33
34
this .width = 80 ;
34
- this .height = 17 ;
35
+ this .height = ( int ) 17.7f ;
35
36
this .open = open ;
36
37
this .setupItems ();
37
38
}
@@ -57,7 +58,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
57
58
RenderUtil .drawRect (this .x , (float )this .y - 1f , this .x + this .width , this .y + this .height - 6 , color );//0x77FB4242, 0x77FB4242);
58
59
59
60
if (this .open ) {
60
- RenderUtil .drawRect (this .x -1f , (float )this .y + 11f , this .x + this .width + 1f , this .open ? (float )(this .y + this .height + 2f ) + totalItemHeight : (float )(this .y + this .height - 1 ), ColorUtil .toARGB (255 ,255 ,255 ,255 ));//1996488704
61
+ RenderUtil .drawRect (this .x -1f , (float )this .y + 11.5f , this .x + this .width + 1f , this .open ? (float )(this .y + this .height + 1. 2f ) + totalItemHeight : (float )(this .y + this .height - 1 ), ColorUtil .toARGB (255 ,255 ,255 ,255 ));//1996488704
61
62
RenderUtil .drawRect (this .x , (float )this .y + 12.5f , this .x + this .width , this .open ? (float )(this .y + this .height ) + totalItemHeight : (float )(this .y + this .height - 1 ), color2 );//1996488704
62
63
}
63
64
Claudius .textManager .drawStringWithShadow (this .getName (), (float ) this .x + 3.0f , (float ) this .y - 4.0f - (float ) ClickGui .getClickGui ().getTextOffset (), -1 );
@@ -80,27 +81,6 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
80
81
y += (float )item .getHeight () + 1.5f ;
81
82
}
82
83
}
83
-
84
- /*this.drag(mouseX, mouseY);
85
- counter1 = new int[]{1};
86
- float totalItemHeight = this.open ? this.getTotalItemHeight() - 2.0f : 1.0f;
87
- int color = ColorUtil.toARGB(ClickGuiModule.INSTANCE.topRed.getValue(), ClickGuiModule.INSTANCE.topGreen.getValue(), ClickGuiModule.INSTANCE.topBlue.getValue(), 255);
88
- RenderUtil.drawRect(this.x, this.y - 1, this.x + this.width, this.y + this.height - 6, color);
89
- if (this.open) {
90
- RenderUtil.drawRect(this.x, (float) this.y + 13.5f, this.x + this.width, (float) (this.y + this.height) + totalItemHeight, 0x77000000);
91
- }
92
- Claudius.textManager.drawStringWithShadow(this.getName(), (float) this.x + 3.0f, (float) this.y - 4.0f - (float) ClickGui.getClickGui().getTextOffset(), -1);
93
- if (this.open) {
94
- float y = (float) (this.getY() + this.getHeight()) - 3.0f;
95
- for (Item item : this.getItems()) {
96
- Component.counter1[0] = counter1[0] + 1;
97
- if (item.isHidden()) continue;
98
- item.setLocation((float) this.x + 2.0f, y);
99
- item.setWidth(this.getWidth() - 4);
100
- item.drawScreen(mouseX, mouseY, partialTicks);
101
- y += (float) item.getHeight() + 1.5f;
102
- }
103
- }*/
104
84
}
105
85
106
86
public void mouseClicked (int mouseX , int mouseY , int mouseButton ) {
0 commit comments