Jump to content

LemonekPL

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by LemonekPL

  1. This is beyond my knowledge of Java... and I have no idea how to do it. Declaration of function looks like this:

     

    default <T extends Entity> java.util.List<T> getEntitiesOfClass(java.lang.Class<? extends T> p_217357_1_, AxisAlignedBB p_217357_2_)

     

    I can put there param like PigEntity.class or ZombieEntity.class but is there a possibility to parametrize this "java.lang.Class<? extends T> p_217357_1_"  like this?

     

    switch (sEntity)
    {
    	case "ZOMBIE":
    		ent = ZombieEntity.class;
    		break;
    	case "SKELETON":
    		ent = SkeletonEntity.class;
    		break;
    }
    monsters = mc.level.getEntitiesOfClass(ent, new AxisAlignedBB((double)(posx - 5.0), (double)(posy - 5.0), (double)(posz - 5.0F),(double)(posx + 5.0),(double)(posy + 5),(double)(posz + 5)));

    If Yes then what type "ent" and "monsters"  should be?

     

    Or maybe it should be done totally different? The idea is to be able to look for defined type of Entities within a AxisAlignedBB or Range?

     

     

  2. I know how to move client.Player but I have no idea how to use Pathfinding(?) to find (I actually have no idea what and how I can get). I need some small hints.

    I have no idea also if this is optimal but I want to create function which will return list of points(Vec3i) where steering to will result that clientPlayer will reach destination. 

    I would appreciete extremly small tutorial like "from game object use this method and You will get that and that and then use it like..." :) 

     

  3. As in topic, is there any way to get String  like FARMLAND or COBBLESTONE from BLOCK object? 

    Here is a class, with static fields. I would appreciate if there would be possibility to get such String like those static fields are named. Currently Im using getDescriptionId() which returns strings like "block.minecraft.farmland" its ok, but if I want to implement support for other types I would need to know those descriptiosn and those are not hmm Human friendly. If I would get string like FARMLAND I could easly nearly copy/paste list from link below and implement it.

    https://nekoyue.github.io/ForgeJavaDocs-NG/javadoc/1.16.5/net/minecraft/block/Blocks.html

     

  4. Hi @dieseben07 

    I think I have misunderstood concept - I taught that ClientWorld refers to local play while ServerWorld to online play. Now I understand how to get job done. I believe that now I know everything what I was missing.

    Im writing small mod with web interface to send commands to Minecraft. Something like robot steering. While I managed to get control of movements I wanted to add more commands and sensors for better orientation like "is next block a lava?".

     

×
×
  • Create New...

Important Information

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