New Blocks
#11
Hey,

Wouldn't it be possible for plugins to add recipe's etc ?
Simply like it does a command it registers the recipe and possible new blocks,

Now for when a case when the plugin has not been loaded, i do assume the plugins load before the world does,
So if the block is not registered turn it to air.

If i recall forge etc do it like that.
Though for more advanced blocks we might require additional windows, not just vanilla.
So perhaps even be able to register new windows, with options like what slots to remember, and what slots to simply drop on the ground when a window is closed.
The actual window handling for closing remember/drop could be done by the plugin self though.

But i am not sure if the window code, currently allows you to set how many slots it has etc.
But i could be wrong if it does, there is no code change needed for that :p.

Also on a last note, i don't think modded blocks/recipes should be added to the actual files.
Just registered on load of the plugin.
Reply
Thanks given by:
#12
It IS possible for plugins to implement custom crafting recipes - there are OnCraftingNoRecpie ( http://mc-server.xoft.cz/LuaAPI/OnCraftingNoRecipe.html ), OnPreCrafting ( http://mc-server.xoft.cz/LuaAPI/OnPreCrafting.html ) and OnPostCrafting ( http://mc-server.xoft.cz/LuaAPI/OnPostCrafting.html ) hooks in the API which should provide everything you need for crafting recipes in a plugin.

For smelting recipes, there isn't an API yet, because it hasn't ever been requested. If you do want it, try to think up a way how it should work - what hooks it should provide, what structures etc.

ThuGie, our plugins can be loaded and unloaded dynamically during the gameplay, that's the biggest problem with custom blocks provided by plugins.

I personally consider the world generating API to be complete - you can either provide your own generating by using the OnChunkGenerating hook ( http://mc-server.xoft.cz/LuaAPI/OnChunkGenerating.html ) or tweak the results of a built-in generator using the OnChunkGenerated hook ( http://mc-server.xoft.cz/LuaAPI/OnChunkGenerated.html ). Note, however, that generating chunks is quite a bottleneck so if you have some nice idea, it may be worth implementing it directly in the C++ base code. We are rather flexible in our generator configuration, so it should be possible to fit things in nicely.
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)