Skip to content

Commit de2106a

Browse files
committed
Error when right click to custom block?
1 parent 6aeb61b commit de2106a

29 files changed

+292
-228
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.junnio;
1+
package com.junnio.polymclient;
22

33
import com.junnio.polycoin.PoLymCoin;
44
import com.junnio.polycoin.screen.PolymTableScreenHandler;
@@ -10,25 +10,25 @@
1010
import net.minecraft.text.Text;
1111
import net.minecraft.util.Identifier;
1212

13+
1314
public class PolymTableScreen extends HandledScreen<PolymTableScreenHandler> {
14-
private static final Identifier GUI_TEXTURE =
15-
Identifier.of(PoLymCoin.MOD_ID, "textures/gui/container/crafting_table.png");
15+
private static final Identifier TEXTURE = Identifier.ofVanilla("textures/gui/container/crafting_table.png");
1616

1717
public PolymTableScreen(PolymTableScreenHandler handler, PlayerInventory inventory, Text title) {
1818
super(handler, inventory, title);
1919
}
2020

21-
@Override
22-
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) {
23-
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
24-
int i = this.x;
25-
int j = (this.height - this.backgroundHeight) / 2;
26-
context.drawTexture(RenderLayer::getGuiTextured, GUI_TEXTURE, i, j, 0.0F, 0.0F, this.backgroundWidth, this.backgroundHeight, 256, 256);
27-
}
28-
2921
@Override
3022
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
3123
super.render(context, mouseX, mouseY, delta);
3224
drawMouseoverTooltip(context, mouseX, mouseY);
3325
}
26+
27+
@Override
28+
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) {
29+
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
30+
RenderSystem.setShaderTexture(0, TEXTURE);
31+
context.drawTexture(RenderLayer::getGuiTextured, TEXTURE,this.x, this.y, 0F, 0F, this.backgroundWidth, this.backgroundHeight,256,256);
32+
}
33+
3434
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
package com.junnio;
1+
package com.junnio.polymclient;
22

33
import com.junnio.polycoin.screen.ModScreenHandlers;
44
import net.fabricmc.api.ClientModInitializer;
55
import net.minecraft.client.gui.screen.ingame.HandledScreens;
6-
import org.slf4j.Logger;
7-
import org.slf4j.LoggerFactory;
86

97
public class PolymcoinClient implements ClientModInitializer {
108
@Override
119
public void onInitializeClient() {
12-
HandledScreens.register(ModScreenHandlers.TACKLEBOX_SCREEN_HANDLER, PolymTableScreen::new);
10+
HandledScreens.register(ModScreenHandlers.POLYM_TABLE_SCREEN_HANDLER, PolymTableScreen::new);
1311
}
1412
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.junnio.polymclient;
2+
3+
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
4+
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
5+
6+
public class PolymcoinDataGenerator implements DataGeneratorEntrypoint {
7+
@Override
8+
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
9+
10+
}
11+
}
271 Bytes
Loading
265 Bytes
Loading
211 Bytes
Loading
404 Bytes
Loading
992 Bytes
Loading
611 Bytes
Loading
667 Bytes
Loading

0 commit comments

Comments
 (0)