TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
Howdy I suggest you could troubleshoot it by putting a breakpoint in WorldRenderer::updateCameraAndRender() at the iprofiler.endStartSection("entities"); section, then stepping through the entity loop until it reaches your entity and then tracing in to see where the problem is, eg 1) Is your entity present at all? 2) Is it being clipped (out of view)? 3) Is the correct renderer being called? 4) Is the renderer actually drawing anything? etc Cheers TGG
-
[1.15.2] Where is isCollisionBoxesEmpty method?
TheGreyGhost replied to naari3's topic in Modder Support
Howdy My usual strategy for solving this sort of problem is 1) For a method in a small class, I just open the new class and browse it looking for code which is similar to the 1.14.4 code If the class is large or the method has moved out to another class 1) Use my IDE to search for all usages of the method in 1.14.4, and make note of a distinctive class/method which uses it 2) Go to the same class+method in 1.15.2 and see what the same code is calling now. YOu might also find these links helpful https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a and https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e Cheers TGG -
[1.15.2][SOLVED] Listen for block break event on client
TheGreyGhost replied to henne90gen's topic in Modder Support
Hi If you can't modify the server, and there is only one or a few chests that you're trying to track, then you could consider the client tick event; once every (eg) 20 ticks you could check to see if the chest still exists at the expected location. Likewise you could periodically check the chest contents to see if they have changed. That would detect changes not caused by the local player. I can't think of any other client events which are triggered on updates to changes to chest contents. -TGG -
See my answer to the other post How the hell do you friggin load .obj things or whatever
-
Hi I just finished figuring this out myself; I loaded obj files as a block, for use by a TileEntityRenderer Try this github branch https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-working-latestMCP The key files: blockstates json: { "forge_marker": 1, "variants": { "use_wavefront_obj_model=false": { "model": "block/hopper" }, "use_wavefront_obj_model=true": { "model": "minecraftbyexample:block/mbe21_ter_wavefront_model" } } } in models/block: { "loader": "forge:obj", "flip-v": true, "ambientToFullbright": false, "__comment": "flip-v may be required if your texture appears mirrored. See OBJloader::read() for other flags. currently the available options are", "__comment1": "detectCullableFaces (default true) = try to convert faces to Directional Quads (EAST, WEST, etc) instead of just general quads", "__comment2": "diffuseLighting (default false) = attempt to apply the direction-dependent lighting as per vanilla blocks. Currently does nothing.", "__comment3": "flipV (default false) = mirror the texture sheet top-->bottom (if your textures appear upside-down)", "__comment4": "ambientToFullbright (default true) = always render at maximum world illumination (combinedLight) regardless of the actual skylight or blocklight present", "__comment5": "materialLibraryOverrideLocation (default null) = use this path/filename for the material library file .mtl", "model" : "minecraftbyexample:models/block/mbe21_ter_gem.obj" } obj file in same directory: # Blender v2.80 (sub 75) OBJ File: 'mbe21_ter_gem.blend' # www.blender.org mtllib mbe21_ter_gem.mtl o Gem v 0.000000 1.000000 0.000000 v -0.500000 0.000000 -0.500000 v 0.500000 0.000000 -0.500000 v 0.500000 -0.000000 0.500000 v -0.500000 -0.000000 0.500000 v 0.000000 -1.000000 -0.000000 vt 0.125000 0.000000 vt 0.000000 0.500000 vt 0.250000 0.500000 vt 0.375000 0.000000 vt 0.250000 0.500000 vt 0.500000 0.500000 vt 0.625000 0.000000 vt 0.500000 0.500000 vt 0.750000 0.500000 vt 0.875000 0.000000 vt 0.750000 0.500000 vt 1.000000 0.500000 vt 0.125000 1.000000 vt 0.000000 0.500000 vt 0.250000 0.500000 vt 0.375000 1.000000 vt 0.250000 0.500000 vt 0.500000 0.500000 vt 0.625000 1.000000 vt 0.500000 0.500000 vt 0.750000 0.500000 vt 0.875000 1.000000 vt 0.750000 0.500000 vt 1.000000 0.500000 vn 0.0000 0.4472 -0.8944 vn 0.8944 0.4472 0.0000 vn 0.0000 0.4472 0.8944 vn -0.8944 0.4472 0.0000 vn 0.0000 -0.4472 -0.8944 vn 0.8944 -0.4472 -0.0000 vn 0.0000 -0.4472 0.8944 vn -0.8944 -0.4472 -0.0000 usemtl Material s 1 f 1/1/1 3/2/1 2/3/1 f 1/4/2 4/5/2 3/6/2 f 1/7/3 5/8/3 4/9/3 f 1/10/4 2/11/4 5/12/4 f 6/13/5 2/14/5 3/15/5 f 6/16/6 3/17/6 4/18/6 f 6/19/7 4/20/7 5/21/7 f 6/22/8 5/23/8 2/24/8 mtl file in same directory: # Blender MTL File: 'mbe21_ter_gem.blend' # Material Count: 1 newmtl Material Ns 323.999994 Ka 1.000000 1.000000 1.000000 Kd 0.800000 0.800000 0.800000 Ks 0.500000 0.500000 0.500000 Ke 0.0 0.0 0.0 Ni 1.450000 d 1.000000 illum 2 map_Kd minecraftbyexample:model/mbe21_ter_gem texture file is in textures/model Cheers TGG
-
Hi No you shouldn't need to use a custom network, NBTList transmit fine just using vanilla. If you haven't already I'd suggest you use your debugger to step through what your code is doing, it should become more obvious then. BTW this also looks wrong: if (SMBlock.getPositions().contains(position)) return; Cheers TGG
-
Hi yes a lot has changed. In particular, the code no longer uses the OpenGL transformation matrices, it keeps track of its own in a MatrixStack. So you need to supply the MatrixStack to the rendering method. Check out this link https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e And this example code (from a Tile Entity Renderer, but you should be able to adapt it.) https://github.com/TheGreyGhost/MinecraftByExample/tree/master - see mbe21 class RenderLines or class DebugBlockVoxelShapeHighlighter package minecraftbyexample.mbe21_tileentityrenderer; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import minecraftbyexample.usefultools.RenderTypeHelper; import net.minecraft.client.renderer.*; import net.minecraft.util.math.Vec3d; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.awt.*; /** * User: The Grey Ghost * Date: 12/01/2015 * This class shows examples of rendering using lines. * The lines have position and colour information only (RenderType.getLines()). No lightmap information, which means that * they will always be the same brightness regardless of day/night or nearby torches. */ public class RenderLines { public static void renderWireframe(TileEntityMBE21 tileEntityMBE21, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer renderBuffers, int combinedLight, int combinedOverlay) { // draw the artifact using lines // (Draws an inverted tetrahedron wireframe above the rendered base block (hopper block model)) // When the TER::render method is called, the origin [0,0,0] is at the current [x,y,z] of the block being rendered. // The tetrahedron-drawing method draws the tetrahedron in a cube region from [0,0,0] to [1,1,1] but we want it // to be in the block one above this, i.e. from [0,1,0] to [1,2,1], // so we need to translate up by one block, i.e. by [0,1,0] final Vec3d TRANSLATION_OFFSET = new Vec3d(0, 1, 0); matrixStack.push(); // push the current transformation matrix + normals matrix matrixStack.translate(TRANSLATION_OFFSET.x,TRANSLATION_OFFSET.y,TRANSLATION_OFFSET.z); // translate Color artifactColour = tileEntityMBE21.getArtifactColour(); drawTetrahedronWireframe(matrixStack, renderBuffers, artifactColour); matrixStack.pop(); // restore the original transformation matrix + normals matrix } /** * Draw an upside-down wireframe tetrahedron with its tip at [0.5,0,0.5] * and 1x1 square "base" at y = 1 (x= 0 to 1, z = 0 to 1) * @param matrixStack transformation matrix and normal matrix * @param renderBuffers the renderbuffers we'll be drawing to */ private static void drawTetrahedronWireframe(MatrixStack matrixStack, IRenderTypeBuffer renderBuffers, Color color) { final Vec3d [] BASE_VERTICES = { new Vec3d(0, 1, 0), new Vec3d(1, 1, 0), new Vec3d(1, 1, 1), new Vec3d(0, 1, 1), }; final Vec3d APEX_VERTEX = new Vec3d(0.5, 0, 0.5); IVertexBuilder vertexBuilderLines = renderBuffers.getBuffer(RenderTypeHelper.MBE_LINE_DEPTH_WRITING_ON); // Note that, although RenderType.getLines() might appear to be suitable, it leads to weird rendering if used in // tile entity rendering, because it doesn't write to the depth buffer. In other words, any object in the scene // which is drawn after the lines, will render over the top of the line (erase it) even if the object is behind // the lines. This means that RenderType.getLines() is only suitable for lines which are the last thing drawn in // the scene (such as DrawBlockHighlightEvent) // The solution I used here is a custom RenderType for lines which does write to the depth buffer. Matrix4f matrixPos = matrixStack.getLast().getMatrix(); //retrieves the current transformation matrix // draw the base for (int i = 1; i < BASE_VERTICES.length; ++i) { drawLine(matrixPos, vertexBuilderLines, color, BASE_VERTICES[i-1], BASE_VERTICES[i]); } drawLine(matrixPos, vertexBuilderLines, color, BASE_VERTICES[BASE_VERTICES.length - 1], BASE_VERTICES[0]); // draw the sides (from the corners of the base to the apex) for (Vec3d baseVertex : BASE_VERTICES) { drawLine(matrixPos, vertexBuilderLines, color, APEX_VERTEX, baseVertex); } } /** * Draw a coloured line from a starting vertex to an end vertex * @param matrixPos the current transformation matrix * @param renderBuffer the vertex builder used to draw the line * @param startVertex * @param endVertex */ private static void drawLine(Matrix4f matrixPos, IVertexBuilder renderBuffer, Color color, Vec3d startVertex, Vec3d endVertex) { renderBuffer.pos(matrixPos, (float) startVertex.getX(), (float) startVertex.getY(), (float) startVertex.getZ()) .color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()) // there is also a version for floats (0 -> 1) .endVertex(); renderBuffer.pos(matrixPos, (float) endVertex.getX(), (float) endVertex.getY(), (float) endVertex.getZ()) .color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()) // there is also a version for floats (0 -> 1) .endVertex(); } } or this one, from the HighlightBlock event package minecraftbyexample.usefultools.debugging; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.vertex.IVertexBuilder; import minecraftbyexample.usefultools.RenderTypeMBE; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.World; import net.minecraftforge.client.event.DrawHighlightEvent; import net.minecraftforge.client.event.RenderTooltipEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; import java.awt.*; import java.lang.reflect.Field; import static minecraftbyexample.usefultools.debugging.DebugSettings.getDebugParameter; /** * Created by TGG on 27/06/2019. */ public class DebugBlockVoxelShapeHighlighter { @SubscribeEvent public static void onDrawBlockHighlightEvent(DrawHighlightEvent.HighlightBlock event) { RayTraceResult rayTraceResult = event.getTarget(); if (rayTraceResult.getType() != RayTraceResult.Type.BLOCK) return; World world; try { world = getPrivateWorldFromWorldRenderer(event.getContext()); } catch (IllegalAccessException e) { return; } BlockPos blockpos = ((BlockRayTraceResult) rayTraceResult).getPos(); BlockState blockstate = world.getBlockState(blockpos); if (blockstate.isAir(world, blockpos) || !world.getWorldBorder().contains(blockpos)) return; final Color SHAPE_COLOR = Color.RED; final Color RENDERSHAPE_COLOR = Color.BLUE; final Color COLLISIONSHAPE_COLOR = Color.GREEN; final Color RAYTRACESHAPE_COLOR = Color.MAGENTA; boolean showshape = DebugSettings.getDebugParameter("showshape").isPresent(); boolean showrendershapeshape = DebugSettings.getDebugParameter("showrendershape").isPresent(); boolean showcollisionshape = DebugSettings.getDebugParameter("showcollisionshape").isPresent(); boolean showraytraceshape = DebugSettings.getDebugParameter("showraytraceshape").isPresent(); if (!(showshape || showrendershapeshape || showcollisionshape || showraytraceshape)) return; ActiveRenderInfo activeRenderInfo = event.getInfo(); ISelectionContext iSelectionContext = ISelectionContext.forEntity(activeRenderInfo.getRenderViewEntity()); IRenderTypeBuffer renderTypeBuffers = event.getBuffers(); MatrixStack matrixStack = event.getMatrix(); if (showshape) { VoxelShape shape = blockstate.getShape(world, blockpos, iSelectionContext); drawSelectionBox(event.getContext(), renderTypeBuffers, matrixStack, blockpos, activeRenderInfo, shape, SHAPE_COLOR); } if (showrendershapeshape) { VoxelShape shape = blockstate.getRenderShape(world, blockpos); drawSelectionBox(event.getContext(), renderTypeBuffers, matrixStack, blockpos, activeRenderInfo, shape, RENDERSHAPE_COLOR); } if (showcollisionshape) { VoxelShape shape = blockstate.getCollisionShape(world, blockpos, iSelectionContext); drawSelectionBox(event.getContext(), renderTypeBuffers, matrixStack, blockpos, activeRenderInfo, shape, COLLISIONSHAPE_COLOR); } if (showraytraceshape) { VoxelShape shape = blockstate.getRaytraceShape(world, blockpos); drawSelectionBox(event.getContext(), renderTypeBuffers, matrixStack, blockpos, activeRenderInfo, shape, RAYTRACESHAPE_COLOR); } event.setCanceled(true); } private static World getPrivateWorldFromWorldRenderer(WorldRenderer worldRenderer) throws IllegalAccessException { if (worldField == null) { worldField = ObfuscationReflectionHelper.findField(WorldRenderer.class, "world"); } return (World)worldField.get(worldRenderer); } private static Field worldField; /** * copied from WorldRenderer; starting from the code marked with iprofiler.endStartSection("outline"); * * @param activeRenderInfo */ private static void drawSelectionBox(WorldRenderer worldRenderer, IRenderTypeBuffer renderTypeBuffers, MatrixStack matrixStack, BlockPos blockPos, ActiveRenderInfo activeRenderInfo, VoxelShape shape, Color color) { RenderType renderType = RenderTypeMBE.LINES(); IVertexBuilder vertexBuilder = renderTypeBuffers.getBuffer(renderType); double eyeX = activeRenderInfo.getProjectedView().getX(); double eyeY = activeRenderInfo.getProjectedView().getY(); double eyeZ = activeRenderInfo.getProjectedView().getZ(); final float ALPHA = 0.5f; drawShapeOutline(matrixStack, vertexBuilder, shape, blockPos.getX() - eyeX, blockPos.getY() - eyeY, blockPos.getZ() - eyeZ, color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, ALPHA); } private static void drawShapeOutline(MatrixStack matrixStack, IVertexBuilder vertexBuilder, VoxelShape voxelShape, double originX, double originY, double originZ, float red, float green, float blue, float alpha) { Matrix4f matrix4f = matrixStack.getLast().getMatrix(); voxelShape.forEachEdge((x0, y0, z0, x1, y1, z1) -> { vertexBuilder.pos(matrix4f, (float)(x0 + originX), (float)(y0 + originY), (float)(z0 + originZ)).color(red, green, blue, alpha).endVertex(); vertexBuilder.pos(matrix4f, (float)(x1 + originX), (float)(y1 + originY), (float)(z1 + originZ)).color(red, green, blue, alpha).endVertex(); }); } } Cheers TGG
-
[1.14.4] TESR Selective Rectanle texturing
TheGreyGhost replied to Simon_kungen's topic in Modder Support
Hi The difference is in the VertexBuffer (IVertexBuilder) that you're using to render. You can make faces only render on one side if you have back face culling turned on. Some of the render modes use back face culling, the others don't . Normal solid blocks, using RenderType.SOLID, have faces which are invisible from the back. For example the difference between this public static RenderType getEntitySolid(ResourceLocation p_228634_0_) { RenderType.State lvt_1_1_ = RenderType.State.getBuilder().texture(new TextureState(p_228634_0_, false, false)).transparency(NO_TRANSPARENCY).diffuseLighting(DIFFUSE_LIGHTING_ENABLED).lightmap(LIGHTMAP_ENABLED).overlay(OVERLAY_ENABLED).build(true); return makeType("entity_solid", DefaultVertexFormats.ENTITY, 7, 256, true, false, lvt_1_1_); } and this public static RenderType func_230167_a_(ResourceLocation p_230167_0_, boolean p_230167_1_) { RenderType.State lvt_2_1_ = RenderType.State.getBuilder().texture(new TextureState(p_230167_0_, false, false)).transparency(NO_TRANSPARENCY).diffuseLighting(DIFFUSE_LIGHTING_ENABLED).alpha(DEFAULT_ALPHA).cull(CULL_DISABLED).lightmap(LIGHTMAP_ENABLED).overlay(OVERLAY_ENABLED).build(p_230167_1_); return makeType("entity_cutout_no_cull", DefaultVertexFormats.ENTITY, 7, 256, true, false, lvt_2_1_); } --> .cull(CULL_DISABLE) If you're not familiar with backface culling it's probably worthwhile spending some time to learn a bit about OpenGL, this guide is not too bad to explain the basic concepts of rendering, worth a skim read for key concepts/keywords https://www.glprogramming.com/red/ If you're worried about the back faces for efficiency reasons, I wouldn't bother. Quad rendering is extremely quick. Cheers TGG -
Howdy The only thing that leaps out at me on your existing code - try putting your calls to super as the first statement in your method (might not help but worth a try) eg public CompoundNBT write(CompoundNBT compound) { super.write(compound); ListNBT mList = new ListNBT(); Map<BlockPos, Set<ResourceLocation>> mPos = SMBlock.getMap(); if (mPos != null) { mPos.forEach((pos, rec) -> { if (rec.size() > 0) { CompoundNBT map = new CompoundNBT(); map.putString(pos.toString(), rec.toString()); mList.add(map); } }); } compound.put("mComp", mList); return compound; } Do you have the other sync methods defined properly? getUpdatePacket() and onDataPacket() -- for single TileEntity updates getUpdateTag() and handleUpdateTag() -- for sending as part of a chunk update packet eg see here https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe20_tileentity_data and here https://mcforge.readthedocs.io/en/latest/tileentities/tileentity/ -TGG
-
Howdy If you want your item to store information about a block, you can use NBT storage. Here's a working example: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe12_item_nbt_animate Cheers TGG
-
[1.14.4] Z fighting issues with semi-transparent entity layers
TheGreyGhost replied to JayZX535's topic in Modder Support
Hi The dynamic texture should actually be very quick if you cache the texture (i.e. generate it only once for your entity and then re-use the same one every frame - for example by storing a map of entityID -> texture in the renderer class). The texture itself is tiny (a few kB) so render memory shouldn't be a problem either. In your second approach, regenerating the wolf models every frame might be slowing it down significantly. You could test this by generating them once only when the entity is created and then seeing what frame rate you get. If the model generation is the issue, you could consider having a few different cached wolf sizes, i.e. you have * five wolf models for a distance <= 1 metre * five wolf models for a distance of 1 - 4 metres * five wolf models for a distance of 4 - 20 metres * five wolf models for > 20 metres and then you pick the ones for the appropriate distance. If your computer is reasonably powerful I think it should be able to handle that much rendering without such a drastic framerate drop. The wolf is only made up of a few quads. -TGG -
Hi See also this guide for hints about which-bus-for-which-event. http://greyminecraftcoder.blogspot.com/2020/02/how-forge-starts-up-your-code-1144.html With a worked example here: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/MinecraftByExample.java -TGG
-
[1.14.4] Z fighting issues with semi-transparent entity layers
TheGreyGhost replied to JayZX535's topic in Modder Support
Howdy I think trying to put five layers one on top of the other is going to be a struggle, and if you're using alpha blending that makes it worse because it becomes important what order you render the textures in (i.e. the rearmost first, then progressively nearer). Sometimes that's easy to do, other times almost impossible. The problem you're seeing is related to the precision of the depth buffer (which is why the size increase of 0.001 works fine up close but doesn't work further away). There is no single magic number or OpenGL setting that can fix this, it's a fundamental rendering problem. You could try adjusting your size increase depending on how far away the entity is from the viewer, that might help (i.e. your "glow" will be unnoticeable further away). Personally I would consider using a custom dynamic texture for each entity, i.e. one that you generate algorithmically similar to the vanilla map - see DynamicTexture and MapItemRenderer. There would be a few details to work out but it would avoid the problem of multiple layers entirely. I've done that with blocks and item before but admittedly not with entity models. -TGG -
Missing class sources for Vanilla 1.15.2
TheGreyGhost replied to TheGreyGhost's topic in ForgeGradle
Hi Umbra Yes, I tried reimporting but it made no difference. I even tried: 1) Create a new user account on my PC 2) Install IntelliJ IDEA fresh 3) Download forge-1.15.2-31.1.18-mdk.zip 4) Extract contents to Documents\test 5) IntelliJ IDEA 2019.3 open build.gradle (open as project) 6) wait.... It linked the library fine: forge-1.15.31.1.18_mapped_snapshot_20200225-1.15.1.jar but TNTMinecraftEntity is still obfuscated. When I browse through the sources jar: forge-1.15.2-31.1.18_mapped_snapshot_20200225-1.15.1-sources.jar there is a TNTMinecraftEntity.java in there, and it is properly deobfuscated. When I go through it line-by-line to compare with the decompiled TNTMinecraftEntity.class file, it appears to be the same. So for some reason IntelliJ is not matching the TNTMinecraftEntity.class to the corresponding source in the sources jar. I'll keep digging... any advice gratefully received... Cheers, TGG -
HowdyAll I'm finding that many of the vanilla sources seem to be missing from my mcp gradle-generated workspace and I'm not sure why. Am I doing something wrong? Example my screenshot below- The source for TNTMinecartEntity isn't present in \forge-1.15.2-31.1.18_mapped_snapshot_20200225-1.15.1-sources.jar, even though the source for SpawnerMinecraftEntity is present. Strangely enough, the private member variable is deobfuscated, even though the various method parameters aren't. I'm using IntelliJ 2019.3, with minecraft 'net.minecraftforge:forge:1.15.2-31.1.18' mappings channel: 'snapshot', version: '20200225-1.15.1' Any ideas? Cheers TGG
-
Howdy I'm trying to tweak my build.gradle to add a new run configuration (to reduce the console debug level). It appears to generate the IDEA gradle tasks fine, but when I run it (clientfewerconsolemessages) it tells me "no main class specified". Any clues? I don't know much about Gradle so I'm hoping it's something obvious I'm missing. I have no idea why it automagically works for "client" but not "clientfewerconsolemessages" cheers TGG // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { client { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { minecraftbyexample { source sourceSets.main } } } clientfewerconsolemessages { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'warn' mods { minecraftbyexample { source sourceSets.main } } }
-
Howdy I'm trying to set up the forge development workspace to help me figure out some of the new code in Minecraft 1.14.4+ (the proliferation of lambdas is doing my head in!) and I'm having trouble setting it up. The docs page seems to be a fair bit out of date https://mcforge.readthedocs.io/en/latest/forgedev/ and I haven't managed to figure out what's changed. I've forked the MinecraftForge project https://github.com/MinecraftForge/MinecraftForge imported the build.gradle which appeared to complete without error but it hasn't generated the tasks I expected. The docs page says to find the task "forgegradle and right click the “Create Forge [setup]” option" but this doesn't exist. I haven't been able to figure out which one I should be running, trial and error has just gotten me a horrible mess so far. Any advice? Cheers TGG
-
that's sounds ominous {sinking feeling in the pit of my stomach when I remember how much effort it took me to figure out rendering, especially for TileEntities} Yeah I think I will update to 1.14.4 for the basic stuff only and then jump to 1.15.2 when it comes out of beta. I think it's probably time to retire a few of the "fancier" topics now. And I've brought myself up to speed on Entities using another project I'm working on so I might add that in as well. Too many ideas not enough time Thanks for the tip!
-
Thanks Cadiboo >Why not go directly to 1.15.2? The main reason is that a lot of the changes from 1.12.2 seem to be pretty big and I want to be sure that I don't waste hours debugging problems that turn out to be Forge 1.15.2 Beta issues. I'm thinking that the update from 1.14.4 to 1.15.2 will be much easier. But that might be wishful thinking >I’m not sure what you mean by this but use your run configs instead of the gradle tasks for this exact reason. Yeah I always used to do it that way: gradlew setupDecompWorkspace idea and gradlew genIntelliJruns; but with 1.14.2 that no longer works, and genIntelliJruns doesn't seem to create any configurations on the Run menu like it used to. I'm using a pretty old version of IDEA (14!) so that might have something to do with it. I can use the gradle runClient to debug like the Run menu did so I think it should be ok. I looked at your link (thanks for that) but it didn't generate the configurations how it did for you. Cheers TGG
-
Howdy folks I'm just returning to modding after a break (since 1.12.2) and I'm having trouble getting started with the MDK for 1.14.4. I've imported the project using gradle.build and then executed genIntelliJRuns, and it appears to have worked except that the debug configurations are missing from IDEA's Run menu. I can run the project using the gradle task runClient, but I can't debug it. Any clues? TGG ---------------------- Never mind - I found a solution; I need to right click on the runClient gradle task which gives me the option to debug.
-
OK. Thanks for the info. -TGG
-
Howdy All. For some reason the Minecraft Game Output is always blank when I run Forge 1.11. The latest.log still contains all the relevant entries (see below). In contrast, Vanilla 1.11 prints the logs fine (see screenshot). Also, running Forge 1.11 from an IDE prints in the IDE debug console no problems. Is this a known bug? Or am I missing something? It doesn't print anything at all, not even the launcher messages. -TGG Contents of latest.log Output from vanilla minecraft
-
Hi all I'm porting some old 1.8 code to 1.10, and I'm stuck on ChestGenHooks. I found this PR, which is pointing in the right direction, but then it is closed with "superceded". https://github.com/MinecraftForge/MinecraftForge/pull/2543 Anyone know what it was superceded by? i.e. how to add custom loot to vanilla chests? cheers TGG