Rate85 wrote:2: Do I Need To Update To Make It Look Like Steel Blocks?
tiles = {"default_coal_block.png"},
tiles = {"default_steel_block.png"},
TenPlus1 wrote:Updated to 1.0:
- New node timer furnaces don't work properly so reverted back to abm one's instead
https://github.com/tenplus1/hopper
TenPlus1 wrote:Update: Hoppers now have 2x lucky blocks added when mod available.
TenPlus1 wrote:You sure ? it was originally your mod, I just helped it along in places :)
FaceDeer wrote:A few weeks back I was working on a mod of my own that included chest- and furnace-like inventory-bearing blocks, and one of my testers suggested that I should make my mod compatible with Hoppers. Unfortunately, when I cracked open the code for Hoppers I found that the source and target node types were hard-coded within it.
So I got started on adding a modding API, and I kiiiind of went a little bit crazy and did a bunch of other tweaks and fixes and stuff in the process. :) Here's a summary of the changes I made:
- Hoppers now call on_metadata_inventory_put and on_metadata_inventory_take, triggering furnace timers via their standard callbacks. This approach also prevents hoppers from inserting "illegal" items into the furnace's fuel inventory slot.
- Hoppers record the identity of the player that placed them in their metadata, which should in theory allow them to work correctly with locked chests (they'll only be able to take/place items in locked chests if the player that placed the hopper has the permissions needed to do so). I haven't tried that yet though.
- Added an API to allow other mods to add new "source" and "target" blocks to hoppers without having to edit this mod's code.
- Updated side hopper rotation handling to allow it to function in any orientation.
- Added settings options to use 16-pixel or 32-pixel textures so that the mod can fit in better with whatever other textures the world is using.
- Added settings option to allow explicit crafting of standard/side hoppers or to allow crafting of a single item that selects which type to use on place. The original version of the mod had the single-crafting-item approach and I liked it, but this way both approaches are supported.
- Added in-game documentation via optional "doc" mod dependency
- Updated the screenshot
My fork is here: https://github.com/FaceDeer/hopper/ (Download).
If you're curious to see how the API works for allowing other mods to add hopper support, here's where I make use of it in my own mod.
tenplus1, want me to send you a pull request? I think I'm about done with this particular coding spree for now.
TenPlus1 wrote:It seems that FaceDeer and myself have both been working on our own API's for the Hopper mod :)
TenPlus1 wrote:Initially there was three different api examples and I've settled for the simplest to implement and fastest to use. It's finished and on my git page listed in this thread.
texmex wrote:There's a "reverse hopper" item with this mod, I believe it could be useful to possibly merge the concept into the more established hopper mod.
FaceDeer wrote:texmex wrote:I've taken a stab at this with the minetest-mods branch of this mod, I added an "eject items"/"don't eject" button to the inventory formspecs that you can use to set a hopper to eject items out into the "real world" if there's no suitable inventory to receive them. Let me know if this is what you were thinking of.
texmex wrote:For me the most intuitive usage flow would be for hoppers to become ejectors whenever they're placed (or screwdrived) upside down, connecting to a chest, furnace, regular hopper or chute.
Maybe once I'm done the mod will be suitable for use by your subgame out-of-the-box. I'll see if I can swing that. I've heavily refactored the code myself with an eye toward making it as efficient and general-purpose as possible, so I'd love the opportunity to test it out "in the field" like that.
Wuzzy wrote:I still think having defined groups for containers is useful in general.
Wuzzy wrote:I don't really understand your callback approach, to be honest.
if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= nil then
hopper:add_container({
{"top", "castle:workbench", "dst"},
{"side", "castle:workbench", "src"},
{"bottom", "castle:workbench", "src"},
})
end
if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= nil then
hopper:add_container({
{"top", "group:container", "main"},
{"side", "group:container", "main"},
{"bottom", "group:container", "main"},
})
end
Wuzzy wrote:EDIT:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
Maybe once I'm done the mod will be suitable for use by your subgame out-of-the-box. I'll see if I can swing that. I've heavily refactored the code myself with an eye toward making it as efficient and general-purpose as possible, so I'd love the opportunity to test it out "in the field" like that.
Don't bother trying to tailor your mod directly towards MineClone 2. It would be pointless, MineClone 2 already has working hoppers and you would end up just repeating what I already did. I would be unlikely I include it.
This is just a heads-up for you. Do what you mod what you have to do, but I don't guarantee a re-inclusion into MineClone 2 at all.
Users browsing this forum: No registered users and 7 guests