• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Of course there is, change some version numbers in your mods.toml and build.gradle and voila, you're on 1.16, it's pretty obvious which ones you should change, but if you aren't sure I recommend setting up a 1.16 project from the MDK and copying it from that. On a separate note, I personally recommend you stay away from 1.16 Forge until it gets a recommended release.
    • It's just a parameter, pass it in, but you can't directly reference the one in AxeItem as it's private, if you really don't want to copy it,     
    • I'm having some trouble understanding how the effectiveBlocksIn field of ToolItem works. I know i'm supposed to put this private static final Set<Block> field_150917_d_ = Sets.newHashSet(Blocks.WARPED_BUTTON); (taken from AxeItem) Here but i'm not sure how. new ToolItem(0.0f, -2.8f, FossilsAndStuffItemMaterial.CRETACEOUS, /*HERE*/, new Item.Properties().group(FossilsAndStuff.TAB));   Thanks for the help.
    • Is there any way to move a mod from older edition of Minecraft Forge to a newer one?
    • I am attempting to create a semi transparent model that will appear in a GUI. However, you can see behind the GUI with it and not behind in the GUI @SubscribeEvent public static void onTextureStitch(TextureStitchEvent.Pre event){ if(event.getMap().getTextureLocation().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)){ event.addSprite(new ResourceLocation(MOD_ID, "planets/default")); } } @Mod.EventBusSubscriber(modid=Main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class GUIBlockScreen extends ContainerScreen<GUIBlockContainer> { public GUIBlockScreen(GUIBlockContainer screenContainer, PlayerInventory inv, ITextComponent titleIn) { super(screenContainer, inv, titleIn); } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); drawEntityOnScreen(this.width / 2, this.height / 2, (int) pow(30 - this.zoom / 3, 2 )); } public void drawOnScreen(int posX, int posY, int scale) { RenderSystem.pushMatrix(); // I have tried all of these but it dosn't seem to do anything // RenderSystem.enableBlend(); // RenderSystem.enableTexture(); // RenderSystem.enableDepthTest(); // RenderSystem.disableCull(); // RenderSystem.enableRescaleNormal(); // RenderSystem.enableAlphaTest(); // RenderSystem.defaultAlphaFunc(); // RenderSystem.enableBlend(); // RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); // RenderSystem.defaultBlendFunc(); RenderSystem.translatef((float)posX, (float)posY, -1050.0F); RenderSystem.scalef(0.12F, 0.12F, 0.12F); MatrixStack matrixstack = new MatrixStack(); IRenderTypeBuffer.Impl irendertypebuffer$impl = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); IVertexBuilder vertexBuilder = irendertypebuffer$impl.getBuffer(RenderType.getTranslucent()); Material material = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(Main.MOD_ID, "planets/defaulttransparency")); drawCube(new Vec3d(0.5, 0, 0), new Vec3d(0, 0.5, 0), new Vec3d(0, 0, 0.5), matrixstack, vertexBuilder, this.material, 0.3F); irendertypebuffer$impl.finish(); RenderSystem.popMatrix(); } } private static void add(IVertexBuilder renderer, Matrix4f matrixPos, Vec3d A, Vec3d N, float u, float v, float opacity) { renderer.pos(matrixPos, (float) A.x, (float) A.y, (float) A.z) .color(1.0F, 1.0F, 1.0F, opacity) .tex(u, v) .lightmap(0, 240) .normal((float) N.x, (float) N.y, (float) N.z) .endVertex(); } private static void square(IVertexBuilder renderer, Matrix4f matrixPos, Vec3d A, Vec3d B, Vec3d C, Material material, float opacity) { Vec3d N = A.crossProduct(B).normalize(); float u = material.getSprite().getMinU(); float U = material.getSprite().getMaxU(); float v = material.getSprite().getMinV(); float V = material.getSprite().getMaxV(); add(renderer, matrixPos, C, N, u, v, opacity); add(renderer, matrixPos, A.add(C), N, U, v, opacity); add(renderer, matrixPos, A.add(B).add(C), N, U, V, opacity); add(renderer, matrixPos, B.add(C), N, u, V, opacity); } public static void drawCube(Vec3d A, Vec3d B, Vec3d C, MatrixStack matrixstack, IVertexBuilder renderBuffer, Material material, float opacity) { // retrieves a position matrix Matrix4f matrixPos = matrixstack.getLast().getMatrix(); // draws the 6 sides square(renderBuffer, matrixPos, A, B, Vec3d.ZERO, material, opacity); square(renderBuffer, matrixPos, B, A, C, material, opacity); square(renderBuffer, matrixPos, C, A, Vec3d.ZERO, material, opacity); square(renderBuffer, matrixPos, A, C, B, material, opacity); square(renderBuffer, matrixPos, B, C, Vec3d.ZERO, material, opacity); square(renderBuffer, matrixPos, C, B, A, material, opacity); }  
  • Topics

  • Who's Online (See full list)