• Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Гугл переводчик извините ... In general, I decided to work on NBT tags. Using the NbttagCompound class but ran into an incomprehensible problem. If I get the ItemStack via Minecraft.getMinecraft (). Player.getHeldItemMainHand () and use the item.setTagCompound (/ * something * /) method and then immediately throw the item, then the changes will not be applied, and if via PlayerInteractEvent.RightClickItem event and get ItemStack item = event.getItemStack () then after operations with nbt and item drop, it will be applied. Why is that? I noticed that in the first case, if you install nbt and immediately open the inventory, then nbt will be applied, since the item will move up and then down. In the second case, the object will immediately move back and forth. How to do this with a method?   Версия Forge 1.12.2   Если вдруг есть русские: Вообщем я решил поработать над тегами NBT. Используя класс NbttagCompound, но столкнулся с непонятной проблемой. Если я получу ItemStack через Minecraft.getMinecraft (). Player.getHeldItemMainHand () и после использую метод item.setTagCompound (/ * что то * /) и после сразу выкину предмет, то изменения не применяется, а если через PlayerInteractEvent.RightClickItem event и получить ItemStack item = event.getItemStack () то после операций с nbt и дропа предмета, он применится. Почему так? Заметил, что в первом случае, если установить nbt и сразу открыть инвентарь, то nbt применится, так как предмет сдвинется вверх, а потом вниз. Во втором случае, предмет сразу туда-сюда передвинется. Как такое сделать методом?
    • The following code just sets a small rendered plane with the texture of "polished_andesite" at the coordinates 0|60|0 But even in complete darkness, the plane still "glows". How can I get the plane to interact with the local light level? Im using the following options: public static final RenderType OVERLAY_PLATE = makeType("overlay_plate", DefaultVertexFormats.POSITION_TEX, GL11.GL_QUADS, 256, RenderType.State.getBuilder() .layer(PROJECTION_LAYERING) .transparency(TRANSLUCENT_TRANSPARENCY) .texture(new TextureState(new ResourceLocation("minecraft:textures/block/polished_andesite.png"), false, false)) .depthTest(DEPTH_ALWAYS) .cull(CULL_DISABLED) .lightmap(LIGHTMAP_DISABLED) .writeMask(COLOR_WRITE) .build(true)); And the following code to render: @SubscribeEvent public void render(RenderWorldLastEvent event) { IRenderTypeBuffer.Impl bufferSource = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource(); IVertexBuilder builder = bufferSource.getBuffer(ModRenderTypes.OVERLAY_PLATE); Vec3d view = Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getProjectedView(); int x = 0; int y = 60; int z = 0; MatrixStack stack = event.getMatrixStack(); stack.push(); stack.translate(-view.x, -view.y, -view.z); Matrix4f lastStack = stack.getLast().getMatrix(); builder.pos(lastStack, x, y + 1.0f, z + 1.0f).tex(0, 1).endVertex(); builder.pos(lastStack, x + 1.0f, y + 1.0f, z + 1.0f).tex(1, 1).lightmap(0, 240).endVertex(); builder.pos(lastStack, x + 1.0f, y + 1.0f, z).tex(1, 0).lightmap(0, 240).endVertex(); builder.pos(lastStack, x, y + 1.0f, z).tex(0, 0).lightmap(0, 240).endVertex(); stack.pop(); bufferSource.finish(ModRenderTypes.OVERLAY_PLATE); } My idea was to copy some code out of the BlockRendererDispatcher and use it every tick with the measured light level. Is that a possible? Any help is appreciated, -Lukas
    • Do not use OnlyIn. Minecraft#player is always the client player. By accessing it on a packet thats sent to the server, you are reaching across logical sides, which will just crash on dedicated servers and cause strange behavior in single player.
    • Added Forge version to title. Does anyone meet this network issue?
  • Topics

  • Who's Online (See full list)