Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/21 in all areas

  1. "minecraft:block" is the type of missing object. Blocks is a vanilla registry. The item that is missing is the next bit: "mcore:dark_dirt" Show how you register your blocks.
    1 point
  2. Sure, here are my two classes that I used. The render event: @EventBusSubscriber(modid = Epidemics.MOD_ID, bus = Bus.FORGE) public class GuiRenderEvents { @SubscribeEvent public static void renderGameOverlay(RenderGameOverlayEvent.Post event) { if (event.getType() == RenderGameOverlayEvent.ElementType.ALL) { System.out.println(1); RenderTest render = new RenderTest(Minecraft.getInstance()); render.renderTestPumpkin(Minecraft.getInstance()); } } } The renderer: public class RenderTest extends IngameGui{ public static final ResourceLocation NEW_PUMPKIN_LOCATION = new ResourceLocation(Epidemics.MOD_ID + ":textures/gui/pumpkinblurtest.png"); private int screenWidth; private int screenHeight; public RenderTest(Minecraft minecraft) { super(minecraft); screenWidth = minecraft.getWindow().getGuiScaledWidth(); screenHeight = minecraft.getWindow().getGuiScaledHeight(); } public void renderTestPumpkin(Minecraft minecraft) { RenderSystem.disableDepthTest(); RenderSystem.enableBlend(); RenderSystem.depthMask(false); RenderSystem.defaultBlendFunc(); RenderSystem.blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.disableAlphaTest(); minecraft.getTextureManager().bind(NEW_PUMPKIN_LOCATION); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferbuilder = tessellator.getBuilder(); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); bufferbuilder.vertex(0.0D, (double)screenHeight, -90.0D).uv(0.0F, 1.0F).endVertex(); bufferbuilder.vertex((double)screenWidth, (double)screenHeight, -90.0D).uv(1.0F, 1.0F).endVertex(); bufferbuilder.vertex((double)screenWidth, 0.0D, -90.0D).uv(1.0F, 0.0F).endVertex(); bufferbuilder.vertex(0.0D, 0.0D, -90.0D).uv(0.0F, 0.0F).endVertex(); tessellator.end(); RenderSystem.depthMask(true); RenderSystem.enableDepthTest(); RenderSystem.enableAlphaTest(); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); } }
    1 point
  3. FMLPaths.GAMEDIR.get().resolve(FMLConfig.defaultConfigPath()); should allow you to get the default config path. This returns a Path object.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.