Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by LemonekPL

  1. sEntity is comming from input / String - I'm really know only basics of Java but why would You prefer this as enum (TBH I cannot imagine (with my poor language knowledge) how can it be Enum)? And regarding types - it has compiled properly - thank You.
  2. 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?
  3. 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..."
  4. I made some ugly solution quickly with a help of excel... ... if(inBlock.equals(Blocks.SLIME_BLOCK)) return "SLIME_BLOCK"; if(inBlock.equals(Blocks.SMITHING_TABLE)) return "SMITHING_TABLE"; if(inBlock.equals(Blocks.SMOKER)) return "SMOKER"; if(inBlock.equals(Blocks.SMOOTH_QUARTZ)) return "SMOOTH_QUARTZ"; ...
  5. 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
  6. 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?".
  7. with latest Forge - how to get access to World? as In Minecraft I can see only ClientWorld which is not relevant here. I believe asking about very neastest blocks should be safe. And does this asking is actually involving server? Like what is block under player?
  8. Dear Team, Im writing small mod and Im missing small piece - while playing ForgeClient on remote non forge server - how to get information about Block (preferebly with usage of BlockPos?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.