-
Posts
172 -
Joined
-
Last visited
Everything posted by Budschie
-
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.
-
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
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. -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
Aaand I forgot to add StructureIDPacket.java... -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
@TheGreyGhost Oh, I forgot to update my BlockInit... -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
I also noticed a weird behaviour of the block rendering, the pixels are flickering a bit. -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] How to archive transparent leaves?
Budschie replied to Budschie's topic in Modder Support
Thanks for replying, but my issue still persists. This is my texture: , but the block looks like this: -
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.
-
[1.15.2] [Solved] How can I render an Bounding Box?
Budschie replied to Budschie's topic in Modder Support
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); } } } } -
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
-
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
Requested chunk : -15 -28 Region bounds : -16 -22 | 0 -6 -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
-
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
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 -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@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" -
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/
-
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@diesieben07 Thanks. But how should I handle tile entity placement? -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@diesieben07 Ok, I'll try it. But why can't I use IWorld.getWorld()? -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@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. -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@diesieben07 But can I copy a tileentity information from one tileentity to another just using getTileEntity()? -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
@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(...). -
[1.15.2] [Solved] Game "freezes" when generating custom feature
Budschie replied to Budschie's topic in Modder Support
I have no idea how I can fix this issue, please help.