[Mod]Frame - lag-free non-entity item frames![frame]

User avatar
Fixer
Member
 
Posts: 853
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by Fixer » Tue Jun 12, 2018 10:56

List of supported blocks is hardcoded? Can it autogenerate for all mods loaded by using some criteria?
 

User avatar
texmex
Member
 
Posts: 871
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by texmex » Tue Jun 12, 2018 15:03

Fixer wrote:List of supported blocks is hardcoded? Can it autogenerate for all mods loaded by using some criteria?

You should be able to use the API for creating an autogeneration loop from registered items. The problem is making sure that code runs last, I reckon.

Also, please add support for craftitems.
 

User avatar
Krock
Developer
 
Posts: 4051
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by Krock » Tue Jun 12, 2018 15:50

This mod registers an item frame for each item and node which you would like to have supported. The limit of ~32k registered nodes is reached quite easily on that way. However, would be possible to loop through the registered nodes (and overwrite minetest.register_node for nodes that were registered afterwards) and ignore all of them which are in the "not_in_creative_inventory" group.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
bosapara
Member
 
Posts: 263
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Tue Jun 12, 2018 18:01

Fixer wrote:List of supported blocks is hardcoded? Can it autogenerate for all mods loaded by using some criteria?


No, because there is no way to guarantee that you're last mod loaded, ever.
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Tue Jun 12, 2018 18:03

texmex wrote:
Fixer wrote:List of supported blocks is hardcoded? Can it autogenerate for all mods loaded by using some criteria?

You should be able to use the API for creating an autogeneration loop from registered items. The problem is making sure that code runs last, I reckon.


I specifically avoided doing this for lots of reasons. You can't add stairs or non-cubic blocks like this easily, and putting water in a frame is nonsensical (it needs to go into a bucket).

texmex wrote:Also, please add support for craftitems.


They are supported, and mods that add them can use the API to create the needed frame blocks.
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Tue Jun 12, 2018 18:05

Krock wrote:This mod registers an item frame for each item and node which you would like to have supported. The limit of ~32k registered nodes is reached quite easily on that way. However, would be possible to loop through the registered nodes (and overwrite minetest.register_node for nodes that were registered afterwards) and ignore all of them which are in the "not_in_creative_inventory" group.


I considered this, but I'd rather avoid the possible max_node overflow and offer a simple API to allow mods to create frames. This is more consistent and robust, and avoids lots of the aforementioned problems with adding them automatically.
 

User avatar
texmex
Member
 
Posts: 871
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by texmex » Tue Jun 12, 2018 20:27

Woulf it be possible to whip up an engine feature for marking a mod to load last?

Has craftitem support been added recently? Is this issue invalid? https://github.com/minetest-mods/frame/issues/4
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Tue Jun 12, 2018 20:30

texmex wrote:Woulf it be possible to whip up an engine feature for marking a mod to load last?

Has craftitem support been added recently? Is this issue invalid? https://github.com/minetest-mods/frame/issues/4


https://github.com/minetest-mods/frame

This minetest mod adds a lag-free, simple and stylish item and node frame to minetest. It can contain either nodes or craftitems.


I haven't (re) tested this claim, but it should... just work?
 

User avatar
bosapara
Member
 
Posts: 263
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by bosapara » Tue Jun 12, 2018 21:31

sofar wrote:putting water in a frame is nonsensical (it needs to go into a bucket


Adding bucket with lava/water to frame doesnt work
 

User avatar
csirolli
Member
 
Posts: 128
Joined: Mon Jan 15, 2018 21:46
Location: Florida, USA
GitHub: ChristianSirolli
IRC: CSirolli
In-game: CSirolli

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by csirolli » Wed Jun 13, 2018 02:29

texmex wrote:Woulf it be possible to whip up an engine feature for marking a mod to load last?

What happens if a bunch of mods ask to be loaded last?
Jesus is the only Way to heaven, the only saving Truth, and the only Life that is worth living.
 

User avatar
texmex
Member
 
Posts: 871
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by texmex » Wed Jun 13, 2018 05:43

csirolli wrote:
texmex wrote:Woulf it be possible to whip up an engine feature for marking a mod to load last?

What happens if a bunch of mods ask to be loaded last?

Then those would load last but in a random order internally.
 

User avatar
bosapara
Member
 
Posts: 263
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by bosapara » Wed Jun 13, 2018 21:50

problem with not adding of the bucket with lava/water solved with World Edit,
just replaced block with name: frame:bucket_bucket_lava and frame:bucket_bucket_water

but with default:dirt_with_rainforest_litter block this trick doesnt works

Image
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Thu Jun 14, 2018 18:55

bosapara wrote:
sofar wrote:putting water in a frame is nonsensical (it needs to go into a bucket


Adding bucket with lava/water to frame doesnt work


This is probably an interface problem in the bucket code - it likely doesn't pass the right click event to the clicked node. I'm not sure this is fixable, since it would mean fixing the bucket, not the frame mod.
 

sofar
Developer
 
Posts: 1652
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by sofar » Thu Jun 14, 2018 18:57

bosapara wrote:but with default:dirt_with_rainforest_litter block this trick doesnt works


that's because that node isn't registered in the frame mod. Send a PR to add it to the list in `init.lua` and I'll merge it.
 

User avatar
bosapara
Member
 
Posts: 263
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara
In-game: Jozet

Re: [Mod]Frame - lag-free non-entity item frames![frame]

by bosapara » Thu Jun 14, 2018 19:03

sofar wrote:
bosapara wrote:but with default:dirt_with_rainforest_litter block this trick doesnt works


that's because that node isn't registered in the frame mod. Send a PR to add it to the list in `init.lua` and I'll merge it.


by some reasons even after adding didnt work, now all works (did several shutdowns)
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: TenPlus1 and 2 guests