-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
[1.15.2] onKillEntity not being called on player death
Animefan8888 replied to SSilvamc's topic in Modder Support
onKillEntity method in what class? -
[1.14.4+] Unlocking Lore Book Sections as Player Progresses
Animefan8888 replied to JayZX535's topic in Modder Support
Depends on what you mean by efficient. You essentially need a bunch of booleans right. So it makes sense to just have a Map<SOMEID, Boolean> which will map some ID of any type to your boolean. Or you could go with the raw array style. boolean[] where the ID is an integer so indexing just works. Or if you want to be memory efficient you could use bit logic(bitmasks, or simply using the bits of an int as a boolean). -
[1.15.2] Questions regarding the overhead of tickable tile entities
Animefan8888 replied to DavidM's topic in Modder Support
Yes it should. because it would be less function calls and less stack manipulation. It's kinda applicable. All the Tickable TE's would be considered a master and all the non Tickable TE's would be considered slaves. Mind that you do not even need a TE for slaves if there is nothing to store there. Sure it could require a tickable TileEntity. Or you could abstract another layer out. This is my preferred method for implementing pipes. Having many Tickable TEs would require them all containing a connection network. Or running a pathfinding algorithm every time you want to send something from A to B. However if you instead take away their autonomy just a little and instead store a "Network" of pipes in the world via a Capability and interact with it every tick with a World Tick event. You then save memory by only storing the connections once and you can cache the shortest/determined path between point A and B. -
[1.14.4] finished with non zero exit value 1
Animefan8888 replied to DarkAssassin's topic in Modder Support
Looks like you are using Java 9+ you need to use Java 8. -
[SOLVED] [1.15.2] Saving and Loading data per world
Animefan8888 replied to Roxane's topic in Modder Support
You create one. A Supplier is just a functional interface that returns an instance of type T. In this case I believe it would be an instance of your WorldSavedData class. It's the only forge provided way of doing it yes. There's three ways to do this. WorldSavedData(which has apparently changed a little bit), Capabilities(which to my knowledge are still the same as when they were first introduced), and of course you can write the file to disk yourself(not really the best option because the first two already exist). -
[SOLVED] [1.15.2] Saving and Loading data per world
Animefan8888 replied to Roxane's topic in Modder Support
The WorldEvent.Load and WorldEvent.Save do not fire on the mod event bus. They instead fire on the MinecraftForge.EVENT_BUS. The mod event bus is only for life-cycle events such as FMLCommonSetupEvent. It seems to have been renamed to World::getMapData or ServerWorld::getSavedData()::getOrCreate At the moment I'm not fully aware of how the WorldSavedData system has changed, however you can use a Capability that is attached to the World. instanceof and cast. -
[1.15.2] How would I spawn a Lightning Bolt?
Animefan8888 replied to fieldbox's topic in Modder Support
The thing about LightningBoltEntities is they have to be spawned with ServerWorld::addLightningBolt -
Why not just install forge 1.15 and take the version.json from there?
-
1.12.2 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page.
-
That will work if the Entity is guaranteed to have been given your equipment. However, that is not the case. What if another mod changes the equipment or your method determines that it doesn't get an item. You should instead attach a capability to the Entity to check if you have already tried to add your equipment.
-
You can't Item's are singletons. But there is something that stores Items which is not a singleton. It's called an ItemStack. You'll notice a lot of methods take ItemStack as a parameter you can use ItemStack::setTag and ItemStack::getTag to store stack based information.
-
Yes you can. However you fire the event and your event only sets the events new height. It doesn't actually set the eye height. When the event is normally fired you'll notice that after it has fired forge takes the new eye height from the event and uses that.
-
[1.15.2] Adding a particle track to my ProjectileItemEntity
Animefan8888 replied to Peerius's topic in Modder Support
I'd love to see a list of these so i can share them with people who try to learn Java by learning how to mod. -
Have you downloaded/played the vanilla version of Minecraft 1.15.2?
-
Make a computer that has infinite accuracy. Your problem lies with the precision of floating point notation.
-
forge 1.12.2 - 14.23.5.2768 serverlaunchwrapper.class
Animefan8888 replied to Lanteans's topic in General Discussion
1.12.2 is no longer supported on this forum. Please update to a modern Minecraft version to receive support. For more information read the LTS at the top of the page. -
1.12.2 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page.