Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/07/18 in all areas

  1. There is a very good reason they did not allow rotation or irregular bounding boxes. If you allow rotation then every pathfinding and collision detection method would require many, many times more processing there would be lots of trigonometry and you'd have to know the relative position to understand the perspective when trying to interact with it and so on) and it would be a performance problem. Basically this is Minecraft and that means "blocky". So just like Minecraft's own large multipart entities using multiple hitboxes is the best way, even though I understand it will be annoying to program and also won't give a perfect effect. I'm not saying it is impossible to change but it would require re-writing lots of somewhat advanced code. You would need to re-write the ray-tracing code to look for your bus entity, you would need custom collision checking for your bus entity, and you would need custom path-finding. Each of these mainly involves just a lot of trigonometry.
    1 point
  2. It depends on what you want. If there are a lot of dogs in world you probably shouldn't make them all persistent. Rather only tamed one. So If you have a method for taming then I would set the persistence there. The persistenceRequired field is private and the enablePersistence() only sets it to true -- there is no way without Reflection to clear it again. But it is probably okay to leave dogs persistent if they've ever been tamed as that shouldn't be that many and certainly would be less than all the dogs in the world. But if you really wanted to clear it again you can use reflection or alternatively you can create your own field and override the despawn method to use that instead. But I would start by just using enablePersistence() whenever you do the taming.
    1 point
  3. Considering that you are posting on a Forge forum... There are at least 3 current Launchers you could possibly be using. The majority of mods are on CurseForge, so it is even more likely that you using the TwitchApp for the modpack. Sadly the TwictchApp ignores the modpack developers suggestion on the recommend ram setting and this is therefore a common problem with Twitch packs. Not an issue with MultiMC as that one grabs at least 4Gb by default. On the Twitchapp, the following instructions are for my World of Dragons mod pack and will work for any other mod pack on TwitchApp as well. click on view profile Click the 3 dots button now click profile options uncheck Use System Settings Move the memory slider as far to the right as you feel comfortable. I have a 32GB systems so I moved it all the way to the right. The minimum to run the pack is 3.5GB, 6 to 8GB is a good average. remember to click ok to finalize the changes and then start the pack.
    1 point
  4. Did you try making the entities persistent with the setPersistent() method when they are tamed? If you look at EntityLiving there are some related fields/methods: - canDespawn() which defaults to true - despawnEntity() which looks at a couple things including distance, the canDespawn() and also - isPersistenceRequired which can be set with the enablePersistence() method, and this also is returned for the isNoDespawnRequired() method. If you look at the despawnEntity() method and trace the logic, you'll see that simply setting the persistence with enablePersistence() method will prevent despawning. That should help a fair bit because entities despawn even when chunks are loaded without persistence. Now I don't think persistence really helps if the chunk is actually unloaded. But it might so maybe Draco18s or diesieben07 know more details about that. You could force the entities to stay loaded by handling the chunk unload event and directly manipulating the world unloadedEntitiesList, but I think that would be a problem to have entities loaded without the chunk. But again others might know better. I would start by ensuring your entities are persistent. If there is still an issue, then what I would do is create a capability for the player that contains a List of the EntityDogs that have been tamed. I think you would actually just keep some information about the dogs and when you want to whistle them you would find the ones in the world and bring them, and then all the ones that are missing you'd have to re-construct. But I'm guessing at this point.
    1 point
  5. You can't, depth and width have to be the same. This is because, for performance reasons things like path finding and collision checking need to be simplified. For the same reason the hitbox doesn't rotate even if the entity model does. The only way to make an irregular hitbox is to actually make multiple hit boxes. There are many ways to do that, but one way is to make invisible entities that track along with your entity and have hitboxes, like multipart entities like dragon do.
    1 point
  6. Replying for the sake of google. You can add dependencies "before" and "after", as well as specify required vesions: "required-after:mod1@[1.0,)" - This means you require a mod with id "mod1" of version 1.0 and higher to be loaded before your mod. See javadoc for cpw.mods.fml.common.versioning.VersionRange.createFromVersionSpec(String spec)
    1 point
×
×
  • Create New...

Important Information

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