Jump to content

Adding WorldEvent.Init to ease instance manipulation


TheMasterGabriel

Recommended Posts

I think it would be pretty useful to have a WorldEvent.Init event. It would get called just before the return statement in the init() function in WorldServer and WorldClient. I suggest this because it would make manipulating World instances upon creation a lot easier and more convenient.

 

(Currently, I think the only way to manipulate world instances would be through WorldEvent.Load, but you would need to keep a running list of all the World instances/dimension ids that have loaded to prevent the desired manipulations being applied more than once [since WorldEvent.Load is called in a bunch of different places]. AND, you wouldn't be able to make the list static [since you can have multiple saves and world instances are freshly generated every time you quit and reload a save], so you would need to have some sort of identifier that was saved upon quitting and reloading).

 

Of course, you could manipulate all worlds with ASM/a coremod, but that's not really desirable (as per the hundreds of posts about why someone shouldn't make a coremod).

Link to comment
Share on other sites

User was banned for 4 days for his thinly veiled threat to coremod shit if his suggestion isnt taken.

Thinly veiled threats are still threats.

This is not being tolerated anymore.

 

 

On that, as Choonster stated, Load is only called once per instance.

And you need to be more specific of what you mean by 'manipulated'

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

User was banned for 4 days for his thinly veiled threat to coremod shit if his suggestion isnt taken.

Thinly veiled threats are still threats.

This is not being tolerated anymore.

 

 

On that, as Choonster stated, Load is only called once per instance.

And you need to be more specific of what you mean by 'manipulated'

 

 

May I just say, my statement wasn't a threat. In fact, how you even interpreted it as a personal threat is a mystery to me. I was simply stating "I researched asm stuff before posting and found it discouraged pretty much everywhere someone mentioned it, so there is probably a better alternative to what I'm trying to do." It was an innocent rhetorical statement and had nothing to do with "forcing your hand".

 

Also, I don't know why you are so pessimistic and unnecessarily rude all the time. It isn't really helpful to the people who are just trying to learn the platform you helped create and you don't seem to enjoy it either. You have forums, support systems and tutorials on this website for a reason, so it seems kinda unfair to just push aside everybody who you deem "unworthy" because they aren't professional programmers. Further, if you hate and are willing to ban people for just mentioning asm and coremods, why bother having a wiki tutorial page on them, not to mention having a system in Forge to help people make them? It seems kinda counter intuitive.

 

So sorry if you thought I was threatening you to implement a suggestion, I promise that was not my intention. As for making this new account just to clarify a misunderstanding, I'm sorry for that too, but I wanted to make sure you didn't get the wrong impression.

Link to comment
Share on other sites

Users second account was perma banned for ban evasion.

Coremods are a thing of the past, they only exist in modern minecraft because the community would literally explode if we even tried to remove it. {We've tried} And there is literally no way we CAN remove it because we have to use the mechanics so that Forge itself can work.

Coremods for APIs/Abstraction Layers {Currently, Forge, Sponge, LiteLoader} is FINE.

Coremods for every mod and it's dog is NOT.

 

I dont care what your intentions were, but your statement was a threat.

EVERY person who has ever said that, especially when dealing with things they want in Forge, has intended it as a "If you don't make this change I'll just hack it in with a coremod".

There is literally no other reason to acknowledge that core modding is a option other then to threaten to use it if we don't comply with what you want.

 

Either way, locking thread because this is not needed, The load event does exactly what you need.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • im stuck in a problem whit BlockEntities i cannot solve so im trying to work around it but in the less complex way possible  i think is posible to store data to the minecraft world  in older versions people talk about  WordDataSave i dont find anything about it for 1.20.4  i find a tutorial for player capability in 1.19    here is an event      //########## ########## ########## ##########     @SubscribeEvent     public static void onAttachCapabilitiesPlayer(AttachCapabilitiesEvent<Entity> event) {         if(event.getObject() instanceof Player) {             if(!event.getObject().getCapability(PlayerThirstProvider.PLAYER_THIRST).isPresent()) {                 event.addCapability(new ResourceLocation(mercmod.MOD_ID, "properties"), new PlayerThirstProvider());             }         }     }  soo i made this      //########## ########## ########## ##########     @SubscribeEvent     public static void onAttachCapabilitiesLevel(AttachCapabilitiesEvent<Level> event) {     } i think i can do some witchcraft  here  but is many things don't understand  to start whit i dont get yet how to recall the saved data from a BlockEntity  the handler still in progress the plan is to make a Map to store nbt data using the block coordinates as index later store that map as a big nbt      ########## any way the question is if theres alredy a tutorial for 1.20.4 for this ?? or some alredy working code from someone else doing something similar ?           
    • I tried this, and found out that Oculus is the mod that is crashing the game. I have removed it, and it now works fine! Thanks!
    • Hi @DanielderErbauer, I arrived here as I have the "as it does not exist in Block{minecraft:air}" error in a modpack I am trying to start. It's a long-shot, I know, but as the post that led this to being solved is missing, can I ask if you may recall what it said? Thanks in advance
    • Hm yeah sorry, not seeing anything else that's sticking out, I'd need to debug myself probably. Do you have a github or bitbucket repo? I could poke around when I have time to see what the problem might be.
    • looking around for the capabilities thing i found a piece of code and find this piece of code  //########## ########## ########## ########## @SubscribeEvent public static void addCustomTrades(VillagerTradesEvent event) { if(event.getType() == VillagerProfession.FLETCHER) { System.out.println("\n\n### VillagerProfession.FLETCHER \n\n");//<----------- Int2ObjectMap<List<VillagerTrades.ItemListing>> trades = event.getTrades(); ItemStack stack = new ItemStack(ItemInit.ARROW_STEEL.get(), 16); int villagerLevel = 1; trades.get(villagerLevel).add((trader, rand) -> new MerchantOffer( new ItemStack(Items.EMERALD, 2), stack,1,3,0.02F)); } if(event.getType() == VillagerProfession.TOOLSMITH) { System.out.println("\n\n### VillagerProfession.TOOLSMITH \n\n");//<----------- Int2ObjectMap<List<VillagerTrades.ItemListing>> trades = event.getTrades(); ItemStack stack = new ItemStack(ItemInit.INGOT_STEEL.get(), 1); int villagerLevel = 1; trades.get(villagerLevel).add((trader, rand) -> new MerchantOffer( new ItemStack(Items.EMERALD, 2), stack,10,8,0.02F)); } } //########## ########## ########## ########## the event is aknoledge and execute when the maps load  ### VillagerProfession.FLETCHER  ### VillagerProfession.TOOLSMITH  //########## But is not working      is a random piece of code is not working  could it be than this code is old 1.18 and no valid anymore for 1.20.4 or the thing are this numbers  stack,10,8,0.02F));  i dont know what this numbers means    ########## the question is ¿how to add things to the villager traders    thanks for your attention               
  • Topics

×
×
  • Create New...

Important Information

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