• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Now I achieved the end of line: every tick on server, entity sends a custom packet to all tracking clients. Clientside entity instance has separate variables for storing previous tick position and real position change during last tick, for me to use them in rendering. And render matrix move vector looks like this: Vector3d move = entityIn.getRealMotion().scale(partialTicks).add(entityIn.getRealPos().add(entityIn.getPositionVec().scale(-1))); So, I calculate position change due to moving for last partialTiks (getRealMotion() returns REAL motion I calculated with sending packets) AND add to it difference between my entity position and wherever minecraft thinks entity is. This means, that after matrixStackIn.translate(move.x, move.y, move.z) I am at my coordinates (that were certainly unchanged during last tick) + offset from MY personal calculated speed (that couldn't be changed too). And in the game, like, 70% of the time it looks flawless, but then entity starts jumping over the movement direction. Looks like minecraft changes coordinates of the entity during rendering, so even with such a complicated code you can't adapt for it.   NOTE: No, you can't use Entity.lastTickPos- variables, because they are updated, like, 6-7 times per second, or once at 3 ticks.
    • Hello, First, here is the method that i'm using to render my fluid.       public static void renderFluid(IRenderTypeBuffer buffer, MatrixStack stack, Fluid fluid, float size, World world, BlockPos pos, int light) {         ILightReader lightReader =  MinecraftForgeClient.getRegionRenderCache(world, pos);         TextureAtlasSprite[] sprites = ForgeHooksClient.getFluidSprites(lightReader, pos, fluid.getDefaultState());         TextureAtlasSprite sprite = sprites[0]; // Get first sprite         IVertexBuilder builder = buffer.getBuffer(RenderType.getTranslucent());         float[] color = getARGBFromInt(fluid.getFluid().getAttributes().getColor());         float minU = sprite.getMinU();         float maxU = sprite.getMaxU();         float minV = sprite.getMinV();         float maxV = sprite.getMaxV();         float m = (1 - size) / 2;         builder.pos(stack.getLast().getMatrix(), m, 0, 1 - m).color(color[1], color[2], color[3], color[0]).tex(minU, maxV).lightmap(light).normal(1, 0, 0).endVertex();         builder.pos(stack.getLast().getMatrix(), 1 - m, 0, 1 - m).color(color[1], color[2], color[3], color[0]).tex(maxU, maxV).lightmap(light).normal(1, 0, 0).endVertex();         builder.pos(stack.getLast().getMatrix(), 1 - m, 0, m).color(color[1], color[2], color[3], color[0]).tex(maxU, minV).lightmap(light).normal(1, 0, 0).endVertex();         builder.pos(stack.getLast().getMatrix(), m, 0, m).color(color[1], color[2], color[3], color[0]).tex(minU, minV).lightmap(light).normal(1, 0, 0).endVertex();     }   The rendering looks good but when I move the light is weird :   I tried to hardcode lightmap value but the problem doesn't seem to come from here.   Thanks for reading. Bye.
    • Thank you for the response, I'm using 1.12.2 since my final plan is to use these features on 2b2t (which is running on 1.12.2), and yes I know it will take time, but I thought I'd rather learn modding on 1.12.2 because maybe in more updated versions stuff have changed. Also I managed to see the Events in Intellij, I scrolled through PlayerEvent and LivingEvent, and for example for AutoEat, the event that I see that fits it the most is LivingUpdateEvent, but it's probably not it. I've taken a look at the tutorial you sent, but it pretty much explains how to make custom items, blocks, registering them, etc, I'm not an expert, far from it, but from how I see it, making custom items or blocks or any of these stuff won't help me in making "Hacked Clients" features, I could be wrong because as I said I'm not an expert, but I'm opened to anything that will help me learn modding, so will it actually help?
    • My milk capacity is in range [0;8]. Do I still have to override detectAndSendChanges() and use custom network packet to make it work?
  • Topics

  • Who's Online (See full list)