-
Illager Patrols spawn code [1.16.5]
That's... Why I'm here. I guess I'll seek assistance elsewhere, then
-
Illager Patrols spawn code [1.16.5]
MiSquadSpawner is my spawner, which is public int tick(ServerWorld, boolean, boolean). @SubscribeEvent public void onWorldTick(TickEvent.WorldTickEvent xevent) { if (xevent.phase != null) { MiSquadSpawner.tick(xevent.world, false, false); } } I do not fully understand what to do, how exactly to check the phase, and how to get a ServerWorld from a TickEvent.WorldTickEvent. Currently, the errors I get are- "xevent cannot be resolved to a type" "The method tick(Serverworld, boolean, boolean) is not applicable for the arguments (World, boolean, boolean)" Does anyone know how to continue from here?
-
Illager Patrols spawn code [1.16.5]
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public void onWorldTick(TickEvent.WorldTickEvent event) { ServerWorld.tickCustomSpawners(true, true); } } I have this in my main mod class- I see where it's going, but how do I obtain the correct instance of ServerWorld? I tried getting it by using the event variable by writing "event.world.tickCustomSpawners(true, true);" but I am not sure how to go from a WorldTickEvent to a ServerWorld
-
Illager Patrols spawn code [1.16.5]
That sounds feasible! Thank you, I'll try that as well. Though, silly question maybe, but where would I call customSpawners' tick method? Do you have an example? Should I call it from my RegisterEntities class? I'm not sure how to make it so that I call the method once ServerWorld starts, if that is how it works
-
Illager Patrols spawn code [1.16.5]
ServerWorld, Access Transformers and a list entry, thank you very much, that sends me underway! I'll figure out what I can, though I am not familiar yet with Access Transformers. Any additional help is appreciated.
-
Blubbee joined the community
-
Illager Patrols spawn code [1.16.5]
Hello there! I'm a new modder. I have created a functional entity similar to Pillagers. Public class net.minecraft.world.spawner.PatrolSpawner which implements ISpecialSpawner spawns these, and I have copied this class with a variant that spawns my own entities. However, I can't for the life of me figure out where PatrolSpawner is ever called or initiated to happen, and thus, I am also unsure where to start with causing my own custom class to start working. The Illager spawn mechanic is pretty niche to work with and I can't find anything about it. Does anyone have ideas? Thanks for the help!
IPS spam blocked by CleanTalk.