Fix item group naming being inconsistent, and fix minor rendering artifact with the creative gui buttons

This commit is contained in:
modmuss50 2018-12-28 22:00:36 +00:00
parent 2b462b0c51
commit 7203236c17
2 changed files with 2 additions and 1 deletions

View file

@ -91,7 +91,7 @@ public final class FabricItemGroupBuilder {
*/ */
public ItemGroup build() { public ItemGroup build() {
((ItemGroupExtensions) ItemGroup.BUILDING_BLOCKS).fabric_expandArray(); ((ItemGroupExtensions) ItemGroup.BUILDING_BLOCKS).fabric_expandArray();
return new ItemGroup(ItemGroup.GROUPS.length - 1, identifier.toString()) { return new ItemGroup(ItemGroup.GROUPS.length - 1, String.format("%s.%s", identifier.getNamespace(), identifier.getPath())) {
@Override @Override
public ItemStack getIconItem() { public ItemStack getIconItem() {
return stackSupplier.get(); return stackSupplier.get();

View file

@ -66,6 +66,7 @@ public class FabricCreativeGuiComponents {
if (this.visible) { if (this.visible) {
MinecraftClient minecraftClient = MinecraftClient.getInstance(); MinecraftClient minecraftClient = MinecraftClient.getInstance();
minecraftClient.getTextureManager().bindTexture(BUTTON_TEX); minecraftClient.getTextureManager().bindTexture(BUTTON_TEX);
GlStateManager.disableLighting();
GlStateManager.color4f(1F, 1F, 1F, 1F); GlStateManager.color4f(1F, 1F, 1F, 1F);
this.drawTexturedRect(this.x, this.y, (type == Type.NEXT ? 12 : 0), (enabled ? 0 : 12), 12, 12); this.drawTexturedRect(this.x, this.y, (type == Type.NEXT ? 12 : 0), (enabled ? 0 : 12), 12, 12);