Jump to content

net.minecraft.client.renderer.RenderBlocks#getBlockIconFromSideAndMetadata in 1.10.2?


Recommended Posts

Posted

im trying to port this bit of code to 1.10.2 (from 1.7.10)

                            IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, meta);
                            double tu0 = (double)icon.getMinUV();
                            double tu1 = (double)icon.getMaxU();
                            double tv0 = (double)icon.getMinV();
                            double tv1 = (double)icon.getMaxV();

 

Posted

What is your overall goal? What feature is this code a part of? We need some more context than a snippet of code.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)
  On 7/22/2017 at 12:31 PM, diesieben07 said:

That code alone does precisely nothing.

Expand  

yes i know its because its part of bigger thing

  On 7/22/2017 at 12:31 PM, Choonster said:

What is your overall goal? What feature is this code a part of? We need some more context than a snippet of code.

Expand  

im using this to then be able to use tessalator to render some stuff

Edited by lukas2005
Posted
  On 7/22/2017 at 12:35 PM, lukas2005 said:

im using this to then be able to use tessalator to render some stuff

Expand  

 

What "stuff"? You're being very vague, which makes it hard to help you.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 7/22/2017 at 12:41 PM, lukas2005 said:

i just use this little snippet for rendering an i need to know what is repacment for IIcon and RenderBlocks

Expand  

 

But what are you trying to render? Where are you rendering it?

 

IIcon and RenderBlocks were replaced by the baked model system, but it's hard to tell you what you need to do when we don't actually know what you're trying to do.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

i am trying to make terrain smoother rather than just blocks and i need to know the size of textures for tesselator

 

whole render method: (1.7.10)

 

public static boolean renderChunk(int pass, int cx, int cy, int cz, IBlockAccess cache, RenderBlocks renderer) {
        if(!ModConfig.MOD_ENABLED) {
            return false;
        } else if(pass != 0) {
            return false;
        } else {
            Tessellator tess = Tessellator.getInstance();
            int[] dims = new int[]{16, 16, 16};
            int[] c = new int[]{cx, cy, cz};
            int[] x = new int[3];
            int[] r = new int[]{1, dims[0] + 3, (dims[0] + 3) * (dims[1] + 3)};
            float[] grid = new float[8];
            float[][] buffer = new float[r[2] * 2][3];
            int bufno = 1;

            for(x[2] = 0; x[2] < dims[2] + 1; r[2] = -r[2]) {
                int m = 1 + (dims[0] + 3) * (1 + bufno * (dims[1] + 3));

                for(x[1] = 0; x[1] < dims[1] + 1; m += 2) {
                    for(x[0] = 0; x[0] < dims[0] + 1; ++m) {
                        int mask = 0;
                        int g = 0;

                        for(int k = 0; k < 2; ++k) {
                            for(int j = 0; j < 2; ++j) {
                                for(int i = 0; i < 2; ++g) {
                                    float p = getBlockDensity(c[0] + x[0] + i, c[1] + x[1] + j, c[2] + x[2] + k, cache);
                                    grid[g] = p;
                                    mask |= p > 0.0F?1 << g:0;
                                    ++i;
                                }
                            }
                        }

                        if(mask != 0 && mask != 255) {
                            Block block = Blocks.AIR;
                            int meta = 0;

                            label368:
                            for(int k = -1; k < 2; ++k) {
                                for(int j = -1; j < 2; ++j) {
                                    for(int i = -1; i < 2; ++i) {
                                        IBlockState bs = cache.getBlockState(new BlockPos(c[0] + x[0] + i, c[1] + x[1] + k, c[2] + x[2] + j));
                                        Block b = bs.getBlock();
                                        if(Main.shouldSmooth(b) && block != Blocks.SNOW_LAYER && block != Blocks.GRASS) {
                                            block = b;
                                            meta = b.getMetaFromState(bs);
                                            if(b == Blocks.SNOW_LAYER || b == Blocks.GRASS) {
                                                break label368;
                                            }
                                        }
                                    }
                                }
                            }

                            int[] br = new int[]{c[0] + x[0], c[1] + x[1] + 1, c[2] + x[2]};

                            label594:
                            for(int k = -1; k < 2; ++k) {
                                for(int j = -2; j < 3; ++j) {
                                    for(int i = -1; i < 2; ++i) {
                                        IBlockState bs = cache.getBlockState(new BlockPos(c[0] + x[0] + i, c[1] + x[1] + k, c[2] + x[2] + j));
                                        Block b = bs.getBlock();
                                        if(!b.isOpaqueCube(bs)) {
                                            br[0] = c[0] + x[0] + i;
                                            br[1] = c[1] + x[1] + k;
                                            br[2] = c[2] + x[2] + j;
                                            break label594;
                                        }
                                    }
                                }
                            }

                            IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, meta);
                            double tu0 = (double)icon.getMinUV();
                            double tu1 = (double)icon.getMaxU();
                            double tv0 = (double)icon.getMinV();
                            double tv1 = (double)icon.getMaxV();
                            int edgemask = edge_table[mask];
                            int ecount = 0;
                            float[] v = new float[]{0.0F, 0.0F, 0.0F};

                            for(int i = 0; i < 12; ++i) {
                                if((edgemask & 1 << i) != 0) {
                                    ++ecount;
                                    int e0 = cube_edges[i << 1];
                                    int e1 = cube_edges[(i << 1) + 1];
                                    float g0 = grid[e0];
                                    float g1 = grid[e1];
                                    float t = g0 - g1;
                                    if(Math.abs(t) > 0.0F) {
                                        t = g0 / t;
                                        int j = 0;

                                        for(int k = 1; j < 3; k <<= 1) {
                                            int a = e0 & k;
                                            int b = e1 & k;
                                            if(a != b) {
                                                v[j] += a != 0?1.0F - t:t;
                                            } else {
                                                v[j] += a != 0?1.0F:0.0F;
                                            }

                                            ++j;
                                        }
                                    }
                                }
                            }

                            float s = 1.0F / (float)ecount;

                            for(int i = 0; i < 3; ++i) {
                                v[i] = (float)(c[i] + x[i]) + s * v[i];
                            }

                            int tx = x[0] == 16?0:x[0];
                            int ty = x[1] == 16?0:x[1];
                            int tz = x[2] == 16?0:x[2];
                            long i1 = (long)(tx * 3129871) ^ (long)tz * 116129781L ^ (long)ty;
                            i1 = i1 * i1 * 42317861L + i1 * 11L;
                            v[0] = (float)((double)v[0] - ((double)((float)(i1 >> 16 & 15L) / 15.0F) - 0.5D) * 0.2D);
                            v[1] = (float)((double)v[1] - ((double)((float)(i1 >> 20 & 15L) / 15.0F) - 1.0D) * 0.2D);
                            v[2] = (float)((double)v[2] - ((double)((float)(i1 >> 24 & 15L) / 15.0F) - 0.5D) * 0.2D);
                            buffer[m] = v;

                            for(int i = 0; i < 3; ++i) {
                                if((edgemask & 1 << i) != 0) {
                                    int iu = (i + 1) % 3;
                                    int iv = (i + 2) % 3;
                                    if(x[iu] != 0 && x[iv] != 0) {
                                        int du = r[iu];
                                        int dv = r[iv];
                                        //tess.setBrightness(block.getMixedBrightnessForBlock(Minecraft.getMinecraft().theWorld, br[0], br[1], br[2]));
                                        //tess.setColorOpaque_I(block.colorMultiplier(cache, c[0] + x[0], c[1] + x[1], c[2] + x[2])); dont know what to do with these too
                                        float[] v0 = buffer[m];
                                        float[] v1 = buffer[m - du];
                                        float[] v2 = buffer[m - du - dv];
                                        float[] v3 = buffer[m - dv];
                                        if((mask & 1) != 0) {
                                            tess.addVertexWithUV((double)v0[0], (double)v0[1], (double)v0[2], tu0, tv1);
                                            tess.addVertexWithUV((double)v1[0], (double)v1[1], (double)v1[2], tu1, tv1);
                                            tess.addVertexWithUV((double)v2[0], (double)v2[1], (double)v2[2], tu1, tv0);
                                            tess.addVertexWithUV((double)v3[0], (double)v3[1], (double)v3[2], tu0, tv0);
                                        } else {
                                            tess.addVertexWithUV((double)v0[0], (double)v0[1], (double)v0[2], tu0, tv1);
                                            tess.addVertexWithUV((double)v3[0], (double)v3[1], (double)v3[2], tu1, tv1);
                                            tess.addVertexWithUV((double)v2[0], (double)v2[1], (double)v2[2], tu1, tv0);
                                            tess.addVertexWithUV((double)v1[0], (double)v1[1], (double)v1[2], tu0, tv0);
                                        }
                                    }
                                }
                            }
                        }

                        ++x[0];
                    }

                    ++x[1];
                }

                ++x[2];
                bufno ^= 1;
            }

            return true;
        }
    }

    static {
        int k = 0;

        for(int i = 0; i < 8; ++i) {
            for(int j = 1; j <= 4; j <<= 1) {
                int p = i ^ j;
                if(i <= p) {
                    cube_edges[k++] = i;
                    cube_edges[k++] = p;
                }
            }
        }

        for(int i = 0; i < 256; ++i) {
            int em = 0;

            for(int j = 0; j < 24; j += 2) {
                boolean a = (i & 1 << cube_edges[j]) != 0;
                boolean b = (i & 1 << cube_edges[j + 1]) != 0;
                em |= a != b?1 << (j >> 1):0;
            }

            edge_table[i] = em;
        }

    }

 

Posted

The main problem you'll run into is that blocks no longer have textures, they now have models. An IBakedModel can have any number of BakedQuads, each of which belongs to an EnumFacing (or null) and has a texture.

 

You can use IBakedModel#getQuads to get the BakedQuads for an optional IBlockState and optional EnumFacing. You'll need to work out what to do if the model has either zero or more than one BakedQuads for EnumFacing.UP (probably blacklist that state from being smoothed).

 

Look at BlockRendererDispatcher#renderBlock to see how it gets the actual state from the in-world state, the model from the actual state and the extended state from the actual state before rendering the model.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 7/22/2017 at 1:07 PM, Choonster said:

The main problem you'll run into is that blocks no longer have textures, they now have models. An IBakedModel can have any number of BakedQuads, each of which belongs to an EnumFacing (or null) and has a texture.

 

You can use IBakedModel#getQuads to get the BakedQuads for an optional IBlockState and optional EnumFacing. You'll need to work out what to do if the model has either zero or more than one BakedQuads for EnumFacing.UP (probably blacklist that state from being smoothed).

 

Look at BlockRendererDispatcher#renderBlock to see how it gets the actual state from the in-world state, the model from the actual state and the extended state from the actual state before rendering the model.

Expand  

how do i get the IBakedModel from block?

Posted
  On 7/22/2017 at 1:14 PM, lukas2005 said:

how do i get the IBakedModel from block?

Expand  

 

As I said, look at BlockRendererDispatcher#renderBlock.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)
  On 7/22/2017 at 1:17 PM, Choonster said:

 

As I said, look at BlockRendererDispatcher#renderBlock.

Expand  

well it uses non-static method getModelForState then how do i get BlockRendererDispatcher instance?EDIT ok i got it Minecraft.getMinecraft().getBlockRendererDispatcher()

Edited by lukas2005
Posted
  On 7/22/2017 at 1:18 PM, lukas2005 said:

well it uses non-static method getModelForState

Expand  

 

Yes, you should use it too. Use Minecraft#getBlockRendererDispatcher to get the BlockRenderDispatcher instance.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
  On 7/22/2017 at 1:23 PM, lukas2005 said:

now in IBakedModel#getQuads teres a strange long at the and called rand what shlou it be? random long?

Expand  

 

That's a "random" number derived from the BlockPos, use MathHelper.getPositionRandom to calculate it.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

ok i have the quads list now what do i do with a quad?]

 

EDIT: i got an object called TextureAtlasSprite from a quad and it seems to have almost same functions as the old IIcon object wich is great

Edited by lukas2005
Posted
  On 7/22/2017 at 1:36 PM, lukas2005 said:

ok i have the quads list now what do i do with a quad?

Expand  

 

Get its texture with BakedQuad#getSprite. This is a TextureAtlasSprite, a sprite on the block/item texture atlas (like IIcon).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

ok i now have my sizes but there is one more thing what are these?

tess.setBrightness(block.getMixedBrightnessForBlock(Minecraft.getMinecraft().theWorld, br[0], br[1], br[2]));

tess.setColorOpaque_I(block.colorMultiplier(cache, c[0] + x[0], c[1] + x[1], c[2] + x[2]));

Posted
  On 7/22/2017 at 1:41 PM, lukas2005 said:

ok i now have my sizes but there is one more thing what are these?

tess.setBrightness(block.getMixedBrightnessForBlock(Minecraft.getMinecraft().theWorld, br[0], br[1], br[2]));

tess.setColorOpaque_I(block.colorMultiplier(cache, c[0] + x[0], c[1] + x[1], c[2] + x[2]));

Expand  

 

I can't really help you with rendering specifics like this, all I can suggest is looking at ForgeBlockModelRenderer#renderModelFlat/ForgeBlockModelRenderer#renderModelSmooth (called by BlockModelRenderer#renderModel) to see how they render block models.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi! I'm trying to add my custom models/textures renderer like this: public class PonyPlayerWrapperRenderer extends EntityRenderer<Player> { // wrapper class under my LivingEntityRenderer class implementation private final PonyPlayerRenderer innerRenderer; private final PonyPlayerRenderer innerSlimRenderer; public PonyPlayerWrapperRenderer(final EntityRendererProvider.Context context) { super(context); System.out.println("creating new PonyPlayerWrapperRenderer"); this.innerRenderer = new PonyPlayerRenderer(context, false); this.innerSlimRenderer = new PonyPlayerRenderer(context, true); } @Override public void render(final Player entity, final float yaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource bufferSource, final int packedLight) { System.out.println("PonyPlayerWrapperRenderer render: " + entity.toString()); if (entity instanceof AbstractClientPlayer clientPlayer) { if (clientPlayer.getModelName().contains("slim")) { innerSlimRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } else { innerRenderer.render(clientPlayer, yaw, partialTicks, poseStack, bufferSource, packedLight); } } } @Override public ResourceLocation getTextureLocation(final Player player) { System.out.println("PonyPlayerWrapperRenderer getTextureLocation"); if (player instanceof AbstractClientPlayer clientPlayer) { return clientPlayer.getSkinTextureLocation(); } System.out.println("player instanceof AbstractClientPlayer is false"); return getDefaultSkin(player.getUUID()); } } public class PonyPlayerRenderer extends LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { private final PlayerModel<AbstractClientPlayer> earthModel; private final PlayerModel<AbstractClientPlayer> pegasusModel; private final PlayerModel<AbstractClientPlayer> unicornModel; public PonyPlayerRenderer(final EntityRendererProvider.Context context, final boolean slim) { super( context, slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)), 0.5f ); System.out.println("creating new PonyPlayerRenderer"); this.earthModel = slim ? new PonyModelSlim(context.bakeLayer(PonyModelSlim.LAYER_LOCATION)) : new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); this.pegasusModel = new PegasusModel(context.bakeLayer(PegasusModel.LAYER_LOCATION)); this.unicornModel = new UnicornModel(context.bakeLayer(UnicornModel.LAYER_LOCATION)); } @Override public void render(final AbstractClientPlayer player, final float entityYaw, final float partialTicks, final PoseStack poseStack, final MultiBufferSource buffer, final int packedLight) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); this.model = switch (race) { case PEGASUS -> pegasusModel; case UNICORN -> unicornModel; case EARTH -> earthModel; }; super.render(player, entityYaw, partialTicks, poseStack, buffer, packedLight); } @Override public ResourceLocation getTextureLocation(final AbstractClientPlayer player) { final PonyRace race = player.getCapability(PONY_DATA) .map(data -> ofNullable(data.getRace()).orElse(PonyRace.EARTH)) .orElse(PonyRace.EARTH); return switch (race) { case EARTH -> fromNamespaceAndPath(MODID, "textures/entity/earth_pony.png"); case PEGASUS -> fromNamespaceAndPath(MODID, "textures/entity/pegasus.png"); case UNICORN -> fromNamespaceAndPath(MODID, "textures/entity/unicorn.png"); }; } } @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { // mod bus render registration config @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onRegisterRenderers(final EntityRenderersEvent.RegisterRenderers event) { event.registerEntityRenderer(EntityType.PLAYER, PonyPlayerWrapperRenderer::new); System.out.println("onRegisterRenderers end"); } } Method onRegisterRenderers() is called and I can see it being logged. But when I enter the world, my PonyWrapperRenderer render() method doesn't ever seem to be called. I also tried to put my renderer to EntityRenderDispatcher's playerRenderers via reflection: @Mod.EventBusSubscriber(modid = MODID, bus = MOD, value = CLIENT) public class ClientRenderers { @SubscribeEvent public static void onRegisterLayerDefinitions(final EntityRenderersEvent.RegisterLayerDefinitions event) { event.registerLayerDefinition(PonyModel.LAYER_LOCATION, PonyModel::createBodyLayer); event.registerLayerDefinition(PonyModelSlim.LAYER_LOCATION, PonyModelSlim::createBodyLayer); event.registerLayerDefinition(PegasusModel.LAYER_LOCATION, PegasusModel::createBodyLayer); event.registerLayerDefinition(UnicornModel.LAYER_LOCATION, UnicornModel::createBodyLayer); event.registerLayerDefinition(InnerPonyArmorModel.LAYER_LOCATION, InnerPonyArmorModel::createBodyLayer); event.registerLayerDefinition(OuterPonyArmorModel.LAYER_LOCATION, OuterPonyArmorModel::createBodyLayer); } @SubscribeEvent public static void onClientSetup(final FMLClientSetupEvent event) { event.enqueueWork(() -> { try { final EntityRenderDispatcher dispatcher = Minecraft.getInstance().getEntityRenderDispatcher(); final Field renderersField = getEntityRenderDispatcherField("playerRenderers"); final Field itemInHandRenderer = getEntityRenderDispatcherField("itemInHandRenderer"); @SuppressWarnings("unchecked") final Map<String, EntityRenderer<? extends Player>> playerRenderers = (Map<String, EntityRenderer<? extends Player>>)renderersField.get(dispatcher); final PonyPlayerWrapperRenderer renderer = new PonyPlayerWrapperRenderer( new EntityRendererProvider.Context( dispatcher, Minecraft.getInstance().getItemRenderer(), Minecraft.getInstance().getBlockRenderer(), (ItemInHandRenderer)itemInHandRenderer.get(dispatcher), Minecraft.getInstance().getResourceManager(), Minecraft.getInstance().getEntityModels(), Minecraft.getInstance().font ) ); playerRenderers.put("default", renderer); playerRenderers.put("slim", renderer); System.out.println("Player renderers replaced"); } catch (final Exception e) { throw new RuntimeException("Failed to replace player renderers", e); } }); } private static Field getEntityRenderDispatcherField(final String fieldName) throws NoSuchFieldException { final Field field = EntityRenderDispatcher.class.getDeclaredField(fieldName); field.setAccessible(true); return field; } } But I receive the error before Minecraft Client appears (RuntimeException: Failed to replace player renderers - from ClientRenderers onClientSetup() method - and its cause below): java.lang.IllegalArgumentException: No model for layer anotherlittlepony:earth_pony#main at net.minecraft.client.model.geom.EntityModelSet.bakeLayer(EntityModelSet.java:18) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.entity.EntityRendererProvider$Context.bakeLayer(EntityRendererProvider.java:69) ~[forge-1.20.1-47.4.0_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerRenderer.<init>(PonyPlayerRenderer.java:32) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.pony.PonyPlayerWrapperRenderer.<init>(PonyPlayerWrapperRenderer.java:24) ~[main/:?] {re:classloading} at com.thuggeelya.anotherlittlepony.client.renderer.ClientRenderers.lambda$onClientSetup$0(ClientRenderers.java:79) ~[main/:?] {re:classloading} ... 33 more Problem appears when EntityRendererProvider context tries to bakeLayer with my model layer location: new PonyModel(context.bakeLayer(PonyModel.LAYER_LOCATION)); // PonyPlayerRenderer.java:32 public class PonyModel extends PlayerModel<AbstractClientPlayer> { // the model class itself public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation( ResourceLocation.fromNamespaceAndPath(MODID, "earth_pony"), "main" ); public PonyModel(final ModelPart root) { super(root, false); } public static LayerDefinition createBodyLayer() { // some CubeListBuilder stuff for model appearance } } Textures PNGs are placed at: resources/assets/[my mod id]/textures/entity. My forge version is 1.20.1. Would appreciate any help.
    • Well, a bit more information about what you're trying to do would be helpful. e.g. why you're trying to use "INVOKE_ASSIGN" instead of "INVOKE". "INVOKE_ASSIGN" calls your code after the "target" is called and its value is stored, if applicable. "INVOKE" calls your code before the target is called. "target" expects a fully qualified name, as per the SpongePowered docs, if that name is going to be remapped (which it will be if your injecting into Minecraft itself and not another mod). For more information on fully qualified names versus canonical names, see the Java specifications. Here's an example of a working "@At" from my own code that targets the "getClosestsVulnerablePlayerToEntity" call inside a mob's logic: @At(value = "INVOKE_ASSIGN", target = "net.minecraft.world.World.getClosestVulnerablePlayerToEntity(Lnet/minecraft/entity/Entity;D)Lnet/minecraft/entity/player/EntityPlayer;") Hope this helps!
    • Ran it one more time just to check, and there's no errors this time on the log??? Log : https://mclo.gs/LnuaAiu I tried allocating more memory to the modpack, around 8000MB and it's still the same; stopping at "LOAD_REGISTRIES". Are some of the mods clashing, maybe? I have no clue what to do LOL
    • Tried removing some biome generation mods and test ran it again, but it's still the same; still not responding as soon as it gets to "LOAD_REGISTRIES". This time with more errors though. Log : https://mclo.gs/uygZzD8 Is there too little memory allocated to the modpack maybe? Can someone help please.    (T.T)💔
    • This is sad. Over 3300 people have checked the thread and no one is able to help or give any ideas :(.
  • Topics

×
×
  • Create New...

Important Information

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