MrChoke
Members-
Posts
86 -
Joined
-
Last visited
Everything posted by MrChoke
-
I don't know why IntelliJ and/or Gradle keep doing this. I have a fresh new install of latest version 21 IntelliJ. I followed the instructions on how to setup the Forge project with IntelliJ 21. It all worked great. I run any of the generated configurations like "Clean Clean Client" for example. And I get this error: > Task :clean:Main.main() FAILED Error: LinkageError occurred while loading main class net.minecraft.client.main.Main java.lang.UnsupportedClassVersionError: net/minecraft/client/main/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 LinkageError occurred while loading main class net.minecraft.client.main.Main It compiled the classes as Java 17, not 11. Sure enough I find the .class files at: \projects\clean\build\classes\java\main. I decompile any of them and they are all bytecode 61, not 55. I have JDK 11 installed. I have JDK 11 set in all places I can find in Gradle, module settings, SDKs and javac settings. I made sure I don't have a JDK 17 installed anywhere on my PC either. Anybody know why its doing this?
-
How can I build a new "clean" jar having my changes as well?
MrChoke replied to MrChoke's topic in Modder Support
Ok, you do mean the ai tasks and goals. I have used those a ton including making my own. "Brain" and the sensors I am learning now but that is all new to 1.14 and I had not done this stuff since since 1.13. For example I have them opening trapdoors and fences. Those are new goals I created for the AI. Note you still need to update pathfnding for this too. TRapdoors and fences each have their own PathNodeTypes but the pthfinding is hard-coded to treat them a certain way. An AI task or goal can't change this. ALl it can do is call tryTOMoveXYZ() to the pathfinder code. As far as going up ladders I assure you it is not that simple either. The vanilla pathfinder does not path search up or down ladders. The heart of it is WalkNodeProcessor and findPathOptions. It doesn't check up or down when calling getSafePoint(). And once you get the pathfinding to work you still have to get the mob to actually move up or down. That is harder part. I had to change MoveController and travel. The vanilla code in travel has hard coded 0.2 upward movement on a ladder (that is why you see him use a ladder on accident sometimes) and nothing for down except it stops free fall if you are on the ladder. Non-flying mobs use MoveController to set the "moveForward" and rotationYaw" which travel uses. "moveVertical" exists too however a walking mob never uses it, only flying ones do (it uses FlyingMoveController). travel never gets anything but 0 for moveVertical unless all of the code for a flying mob gets executed. I have learned this code very very well back in 1.1.3 I had fixed numerous bugs too. One in 1.15 that people reported is mobs spinning on scaffolidng and not path finding over it. Not my mod, not anymore. I fixed it. That fix was easy compared to most of the other stuff I have achieved. -
How can I build a new "clean" jar having my changes as well?
MrChoke replied to MrChoke's topic in Modder Support
Like I say, I have no intention of distributing these mods in any way, my work is only for me. I wanted a jar to run on my laptop as well as my desktop PC, that was the need. As far as using Forge I am not sure what an entity task is exactly. Is that a forge construct?? I know what tasks and goals are for the AI in vanilla. My mod for example allows ALL mobs to go up ladders. I had to make core changes to LivingEntity travel() among other core areas. Sure I can create my own versions of all of the mobs in the game, copy tons of code into my own versions of it, then turn off all of the vanilla mobs (I assume I can do that with forge). Fine, yeah. If I want to publish my mod someday maybe I'll do that Anyway, sorry I asked. I have been burned so many times asking questions here and and on Discord you'd think I would have learned my lesson by now. -
How can I build a new "clean" jar having my changes as well?
MrChoke replied to MrChoke's topic in Modder Support
Yeah, thanks the rude response. Typical of most of you people on this forum. I am modding for me, not you or anybody else. You tell me how I can use forge to make all the mos climb ladders, open trap doors, open/break fences and a bunch of other cool stuff then maybe I'll "do it right". Until then, too bad. I figure it out anyway at least for the sever. I didn't do the client yet. Thanks again for nothing. BTW, why is there a clean jar and clean release task in the project? I wouldn't have even asked if I didn't see those. Why have them if clowns like me try to use them right? -
I have made many changes to the "clean" project available from Forge. I can't use a forge build because many of my changes have no available hooks or ability to do it with Forge. How do I build a jar with my changes? I have tried "gradlew clean:jar" and it said it was successful. But I don't see that it did anything.
-
I notice that there are two types of ForgeChunkManager tickets you can create, NORMAL ones and ENTITY ones. With entity ones I had hoped that the behavior would be to automatically keep the chunk that the entity is in loaded. By automatic I mean that I do not have to manually force and unforce chunks as the entity moves. In testing it doesn't appear to be automatic. Does anyone know if it is supposed to work this way? If I do have to track the chunk the entity is in, I'd rather not do it as he moves. So that would leave doing it right before the chunk unloads. Any suggestions on this? Thanks.
-
Can someone explain how/when chunk unloading occurs?
MrChoke replied to MrChoke's topic in Modder Support
OK, yeah, read on the wiki, it says render distance. So chunk loaders, I see a ChunkLoader class in the minecraft code. Do we use that to keep chunks loaded or does Forge have some other way? Thanks. -
Can someone explain how/when chunk unloading occurs?
MrChoke replied to MrChoke's topic in Modder Support
Ok, good to know that it reads/writes to file. Do you know when a chunk unloads? -
I'd like to understand more about how chunk unloading occurs. Take for example some custom mobs that are moving around under new AI I wrote. I have them set to never despawn. But I am assuming they will *pause* their movement when the chunk unloads and resume when the chunk comes back. Can someone explain how that works? Thanks.
-
I am starting to learn how models work. My initial goal though is to be able to change my custom mob's color dynamically (with a mouse click). For the variation in color I have read that blocks and items can use IBlockColor and IItemColor. Can these apply to entities as well? My best guess at this time is NO. Another approach I think is to have different textures for my mob (one for each color) and then use variants to switch the texture. This is possible with entities right? The forge doco I saw talks about blocks and items but says nothing about entities. Any suggestion here would be great. UPDATE: WOW, I didn't even need to post this. Entities are always rendered dynamically. All I need to do is update the texture used in the render class for the entity.
-
How to prevent an entity from crossing a custom block?
MrChoke replied to OsHeaven's topic in Modder Support
You need to update the pathfinding code if you want the AI smart enough to avoid that block. You can create custom PathNodeType objects (even though its an enum) using a Forge class called EnumHelper. Example: LADDER = EnumHelper.addEnum(PathNodeType.class, MODID + "LADDER", parameterTypes, 0.0F); //0.0 means its as good as OPEN or WALKABLE -
Confusion as to how often I need to specify a "side" in code
MrChoke replied to MrChoke's topic in Modder Support
By sides, I mean specifying a side, with world.isRemote() or @Side. I guess I will just follow the common sense approach when I add sides. Right now I am running in any integrated server sop I know my code is going need work when I move to dedicated. -
I get the concept of sides, a server thread (or separate JVM if dedicated) versus a client thread. What confuses me is when should we specify a side in our code? I know if its rendering stuff it should be client only. But how about other things, like entity movement, AI, process mouse clicks, etc?? Is there someplace I can check or read up on to help with this? I fear I am not specifying the side enough (I barely have it at all) and does that mean I have the client loading and/or doing too much stuff that it doesn't need to.
-
Wondering if we can subscribe to events like like PlayerLoggedInEvent. Or if we can only use the ones under net.mineforge.event
-
You know that is exactly what I am trying to do. I am finding it doing some weird thing where his next block is a diagonal and seems that it makes him push up against the trapdoor. Though back on the GetCollisionEvent, I most likely won't need it here but I struggle how anyone can take advantage of it based on what you get to work with.
-
I am having entities pathfind through trap doors. The problem is, sometimes they collide with the open trap door on their way up and don't move through. This is happening in move() when it evaluates the collision boxes. I know Forge has a GetCollisionBoxes event but it is very generic. I believe if I can remove only the box for the trapdoor it would be ok but how do I tell which one that is? Getting a list of AxisAlignedBB objects and nothing more is proving very difficult to use. Any suggestions? Thanks.
-
I have learned how with Forge you can make private and/or final variables public and not final without reflection. And how to add to enums at runtime even though they are supposed to always be read-only. Very cool stuff. So how about method replacement? I know we can override things but if I want to modify vanilla behavior of existing mobs for example, I can't override that and there aren't really any hooks in place for most of what I am thinking. My only option right now is to make new mobs and maybe disable the vanilla ones when they are replaced. Or can we somehow override a vanilla method?
-
How do objects like "PathNavigate" and many others persist across saves?
MrChoke replied to MrChoke's topic in Modder Support
So yes I agree, it must only be NBT reds/writes that get things saved. Turns out that path var and many other things actually get re-initialized from scratch when a world is loaded. So if I want to save my own data to the a save, I guess I use what is explained here: https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/ -
Not that I want to necro this post but I am having the exact same problem. All of a sudden out of the blue. I get no console logging and get these errors instead: 2018-10-12 06:37:42,947 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2018-10-12 06:37:42,947 main ERROR Error processing element TerminalConsole ([Appenders: null]): CLASS_NOT_FOUND 2018-10-12 06:37:42,947 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2018-10-12 06:37:42,963 main ERROR Unable to locate appender "Console" for logger config "root" 2018-10-12 06:37:43,291 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2018-10-12 06:37:43,291 main ERROR Error processing element TerminalConsole ([Appenders: null]): CLASS_NOT_FOUND 2018-10-12 06:37:43,291 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2018-10-12 06:37:43,306 main ERROR Unable to locate appender "Console" for logger config "root"
-
Wish base classes like Entity didn't have so many private vars
MrChoke replied to MrChoke's topic in General Discussion
That Mapping Viewer worked well. As did the AT. It's pretty neat, it changes it in the class file but leaves the source as-is. And the mod reads the class file as public. Thanks! -
I'd like to understand more about how minecraft saves data. I know there is NBT reads and writes but I don't think that is used for everything is it? Let me use an example for my question. On EntityLiving is this member: protected PathNavigate navigator; It holds a variable that I know persists across saves and reloads of the game: protected Path currentPath; So how is this data saved? I don't see any NBT read/write code for it. Does it do something like serialize and write the whole Entity object out to file? Any help to understand this would be great.
-
Wish base classes like Entity didn't have so many private vars
MrChoke replied to MrChoke's topic in General Discussion
@DaemonUmbra Hi. I read your link to an AT tutorial. Where I got stuck is how to get Searge namings. It had this: Most devs use the MCP Bot on Esper IRC for AT work. I haven't used IRC for over 20 years (in college). I did logon to EsperNet and I can go to the #minecraft channel but A) I can't message to the channel even after I registered and B) I don't see MCP_BOT on there anyway. Is there another way I can get these namings? Thanks