
MrChoke
Members-
Content Count
79 -
Joined
-
Last visited
Community Reputation
2 NeutralAbout MrChoke
-
Rank
Stone Miner
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
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"