Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Budschie

Members
  • Joined

  • Last visited

Everything posted by Budschie

  1. Hello. I want to archive a tool system similar to tinkers construct. But in order to do this, I have to generate crafting recipes through code. Is there any way to do that? Thanks for any help.
  2. I finally managed to solve my issue: I just had to extend my ModLeavesBlock from BreakableBlock instead of LeavesBlock. That fixed the transparency issue... But I'm not exactly sure why. Maybe some instanceof checking.
  3. Aaand I forgot to add StructureIDPacket.java...
  4. @TheGreyGhost Oh, I forgot to update my BlockInit...
  5. @TheGreyGhost That's strange. It could be because I use AdoptOpenJDK as a compiler. I run my project with the minecraft jre. Make sure to use java 1.8. Maybe that will fix the problem.
  6. @TheGreyGhost I'm sure it is not z-fighting, because there is no pattern that usually occurs when I have z-fighting. The whole brightness of the pixel changes. It should be translucent like for example ice. But when I set the RenderLayer to translucent, the alpha is still either 0 or 255.
  7. I also noticed a weird behaviour of the block rendering, the pixels are flickering a bit.
  8. @DavidM Here is my github repo: https://github.com/Budschie/Deepnether-Mod/ I use the translucent render layer, but I also tried cutout and cutout mipped, but those didn't work either. By the way, I have no idea how the render layers work, what performance impact they have etc.
  9. Thanks for replying, but my issue still persists. This is my texture: , but the block looks like this:
  10. Hello. I want to archive a block which has a transparent texture. I've already found out how to do basic transparency, but when I try to use a texture which has an other alpha value than 0 or 255, the alpha value for that pixel changes to 255. Thanks for any help.
  11. Ah, I see where my problem was. I used the wrong AxisAlignedBoundingBox. I should have offset it by it's position. @EventBusSubscriber(bus = Bus.FORGE, modid = References.MODID, value = Dist.CLIENT) public class AABBDebug { @SubscribeEvent public static void onRender(RenderWorldLastEvent event) { if(Minecraft.getInstance().world != null) { System.out.println("Rendering..."); ArrayList<StructureData> structures = StructureDataHandler.getStructures(Minecraft.getInstance().world); if(structures == null) return; for(StructureData data : structures) { AxisAlignedBB aabb = data.getTranslatedAABB(); RenderSystem.lineWidth(10.0f); IRenderTypeBuffer.Impl buffer = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); if(buffer == null) return; IVertexBuilder builder = buffer.getBuffer(RenderType.LINES); MatrixStack matrixStack = event.getMatrixStack(); PlayerEntity player = Minecraft.getInstance().player; double x = player.lastTickPosX + (player.getPosX() - player.lastTickPosX) * event.getPartialTicks(); double y = player.lastTickPosY + (player.getPosY() - player.lastTickPosY) * event.getPartialTicks(); double z = player.lastTickPosZ + (player.getPosZ() - player.lastTickPosZ) * event.getPartialTicks(); matrixStack.push(); matrixStack.translate(-x, -y, -z); WorldRenderer.drawBoundingBox(matrixStack, builder, aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ, 1.0f, 1.0f, 1.0f, 1.0f); matrixStack.pop(); RenderSystem.disableDepthTest(); buffer.finish(RenderType.LINES); } } } }
  12. Hello! I recently tried to render an AxisAlignedBoundingBox, did a bit of research on rendering, and coded a bit, only to find out that the code I ended up with doesn't work. I get less FPS, but not a single AABB is rendered. @EventBusSubscriber(bus = Bus.FORGE, modid = References.MODID, value = Dist.CLIENT) public class AABBDebug { @SubscribeEvent public static void onRender(RenderWorldLastEvent event) { if(Minecraft.getInstance().world != null) { ArrayList<StructureData> structures = StructureDataHandler.getStructures(Minecraft.getInstance().world); if(structures == null) return; for(StructureData data : structures) { IRenderTypeBuffer.Impl buffer = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); IVertexBuilder builder = buffer.getBuffer(RenderType.LINES); MatrixStack matrixStack = event.getMatrixStack(); PlayerEntity player = Minecraft.getInstance().player; double x = player.lastTickPosX + (player.getPosX() - player.lastTickPosX) * event.getPartialTicks(); double y = player.lastTickPosY + (player.getPosY() - player.lastTickPosY) * event.getPartialTicks(); double z = player.lastTickPosZ + (player.getPosZ() - player.lastTickPosZ) * event.getPartialTicks(); matrixStack.push(); matrixStack.translate(-x, -y, -z); WorldRenderer.drawBoundingBox(matrixStack, builder, data.aabb.minX, data.aabb.minY, data.aabb.minZ, data.aabb.maxX, data.aabb.maxY, data.aabb.maxZ, 1.0f, 1.0f, 1, 1); matrixStack.pop(); RenderSystem.disableDepthTest(); buffer.finish(RenderType.LINES); } } } } Thanks for any help
  13. Requested chunk : -15 -28 Region bounds : -16 -22 | 0 -6
  14. https://github.com/Budschie/Deepnether-Mod/blob/master/src/main/java/de/budschie/deepnether/worldgen/TestFeature.java https://github.com/Budschie/Deepnether-Mod/blob/master/src/main/java/de/budschie/deepnether/structures/StructureBase.java
  15. @diesieben07 When I get the tileentity my game crashes with following message: "We are asking a region for a chunk out of bound | -15 -28"
  16. Rendering isn't done on server side. Just check on the server, if you for example ate something. Then, you have to send a Packet to the client. If you want to know how to implement packets, just read the forge documentation: https://mcforge.readthedocs.io/en/latest/networking/ Also, the forge docs have an article about clientside/serverside and what you should do on those sides: https://mcforge.readthedocs.io/en/latest/concepts/sides/
  17. @diesieben07 Do flags in the setBlockState method affect tileentity placement? Because if I try to get the tile entity via IWorld.getTileEntity(...), it will return null.
  18. @diesieben07 Thanks. But how should I handle tile entity placement?
  19. @diesieben07 Ok, I'll try it. But why can't I use IWorld.getWorld()?
  20. @diesieben07 It has a maximum of blocks that you can put into one structure. I have to set the tile entity because I create it using TileEntity.create(compound) when placing a structure.
  21. @diesieben07 I'm copying my blocks, tileentities etc. from a worldedit-like structure file and placing that into my world. The advantage is that I can easily built structures manually, without having to spend hours figuring out how to generate a simple structure procedurally.
  22. @diesieben07 But can I copy a tileentity information from one tileentity to another just using getTileEntity()?
  23. @diesieben07 That wouldn't work, because I have to add tile entities to that world, and an IWorld won't provide me a method of doing that other than calling getWorld().setTileEntity(...).
  24. I have no idea how I can fix this issue, please help.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.