Posted September 30, 20214 yr So I am trying to invoke a custom siege (rather than a zombie siege). I want this event to be independent of zombie sieges (ruling out cancelling the zombie siege event hook). The following code in ServerWorld#tickCustomSpawners loops through the ISpecialSpawners, one of which is a net.minecraft.village.VillageSiege: public void tickCustomSpawners(boolean p_241123_1_, boolean p_241123_2_) { for(ISpecialSpawner ispecialspawner : this.customSpawners) { ispecialspawner.tick(this, p_241123_1_, p_241123_2_); } } I've written my own Siege class... almost identical to VillageSiege for now... and I want it to tick on the ServerWorld with siegeObject.tick(serverWorld, bool1, bool2). However, I can't access the ServerWorld of a ServerTickEvent. Is there a static ServerWorld I can access for my purposes? Or is there a better event hook I can use that will offer up the ServerWorld object?
September 30, 20214 yr Author I may have posted this prematurely... I came across the WorldTickEvent hook through which I can access the ServerWorld. I'd still appreciate any feedback from more knowledgeable modders... would my implementation with WorldTickEvent be equivalent according to my specification in my original post? Otherwise, I hope this is useful reference to anyone experiencing the same problem.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.