[Mod] Item Frames [itemframes]
- Calinou
- Moderator
- Posts: 3169
- Joined: Mon Aug 01, 2011 14:26
- GitHub: Calinou
- IRC: Calinou
- In-game: Calinou
- Location: Troyes, France
- Contact:
[Mod] Item Frames [itemframes]
Another item frames and pedestals mod. Based on Zeg9's item frames mod.
This mod is originating from Carbone. You don't install this mod if you're playing that particular game; it's already included and enabled by default there.
Download
No dependencies on non-default mods.
License for code: CC0
License for textures: CC BY-SA 3.0
Crafting
X = stick, P = paper.
X X X
X P X
X X X
S = stone, _ = nothing.
S S S
_ S _
S S S
This mod is originating from Carbone. You don't install this mod if you're playing that particular game; it's already included and enabled by default there.
Download
No dependencies on non-default mods.
License for code: CC0
License for textures: CC BY-SA 3.0
Crafting
X = stick, P = paper.
X X X
X P X
X X X
S = stone, _ = nothing.
S S S
_ S _
S S S
Re: [Mod] Item Frames [itemframes]
It looks like Zeg9 might be gone for some time, so I am glad that you are doing this. Along with the frames and the pedestals, glass cases would be useful too.
Could the displays work like locked treasure chests, but have only one slot for the item to be put on display to be placed in? That way, if clearobjects is performed, they could reshow the single item that they have either by the player getting close enough to them or by being punched.
Could the displays work like locked treasure chests, but have only one slot for the item to be put on display to be placed in? That way, if clearobjects is performed, they could reshow the single item that they have either by the player getting close enough to them or by being punched.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
Re: [Mod] Item Frames [itemframes]
Glad to see this mod getting some attention... what differs between this and Zeg's ?
- Calinou
- Moderator
- Posts: 3169
- Joined: Mon Aug 01, 2011 14:26
- GitHub: Calinou
- IRC: Calinou
- In-game: Calinou
- Location: Troyes, France
- Contact:
Re: [Mod] Item Frames [itemframes]
Textures were redone, items rotate slower on pedestals, code style fixed and cleaned up.TenPlus1 wrote:Glad to see this mod getting some attention... what differs between this and Zeg's ?
Re: [Mod] Item Frames [itemframes]
Nice, I did however notice that using a screwdriver to rotate the item frame then adding an item crashes minetest and servers it runs on and the only fix I could see was to tweak the screwdriver mod slightly to ignore frames... ADDED below...
- Attachments
-
- screwdriver(frame_fix).zip
- (5.33 KiB) Downloaded 211 times
Re: [Mod] Item Frames [itemframes]
In the topic of the original item_frames mod, thus was spoken:
Very significant, very significant.Inocudom wrote:This mod was updated yesterday, so displayed objects will now reappear after /clearobjects actions.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
Re: [Mod] Item Frames [itemframes]
https://github.com/VanessaE/minetest-it ... 873b117244
This is the commit to Zeg9's itemframes mod that fixes displayed objects vanishing after /clearobjects.
This is the commit to Zeg9's itemframes mod that fixes displayed objects vanishing after /clearobjects.
[BitChute: https://www.bitchute.com/channel/fCcBQxrYQjNX/] [Rumble: https://rumble.com/user/HPoorHMagentaHChildH]
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: [Mod] Item Frames [itemframes]
You can't place the following Minetest Game items on item frames and pedestals:
Also, the Minetest mod manager gets confused if you have this mod and Homedecor installed. If you try to enable this mod, it doesn't get enabled!
I noticed this mod has the identical name as a homedecor mod. This is a very confusing bug, please consider a rename.
- Boat
- Cart
- Screwdriver
- Wheat Seed
- Cotton Seed
- Skeleton Key
- Key
Also, the Minetest mod manager gets confused if you have this mod and Homedecor installed. If you try to enable this mod, it doesn't get enabled!
I noticed this mod has the identical name as a homedecor mod. This is a very confusing bug, please consider a rename.
Re: [Mod] Item Frames [itemframes]
We could easily add the following code to the on_rightclick for each item that doesn't work for itemframes so that they do (like I did with Farming Redo crop/seed):
Code: Select all
local def = minetest.registered_nodes[under.name]
if def and def.on_rightclick then
return def.on_rightclick(pt.under, under, placer, itemstack)
end
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: [Mod] Item Frames [itemframes]
Thanks for the heads up Wuzzy. I didn't realize those items were incompatible with the itemframes mod. I think TenPlus has the right solution. I'll get the fix in place on the JT2 server.
Re: [Mod] Item Frames [itemframes]
Download is down.
- sorcerykid
- Member
- Posts: 1841
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: [Mod] Item Frames [itemframes]
My solution was to override the registration functions. This affords a universal means for interactive nodes (like those used in the itemframes mod) to intercept right-clicks whenever a player is wielding a craftitem or a node with an on_place handler. With this code it is also possible to open doors and chests while a cart, a boat, a wheat seed, or a cotton seed is currently selected in the inventory.
The above code snippet is a global dependency, so obviously needs to be executed ahead of all other mods. A suitable location would be default/init.lua.
Code: Select all
local old_register_node = minetest.register_node
local old_register_craftitem = minetest.register_craftitem
minetest.register_craftitem = function ( name, fields )
if fields.on_place then
fields._on_place = fields.on_place
fields.on_place = function( itemstack, player, pointed_thing )
local pos = pointed_thing.under
local node = minetest.get_node( pos )
-- allow on_rightclick callback of pointed_thing to intercept item placement
if minetest.registered_nodes[ node.name ].on_rightclick then
minetest.registered_nodes[ node.name ].on_rightclick( pos, node, player, itemstack )
-- otherwise placement is dependent on anti-grief rules of this item (if hook is defined)
elseif not fields.allow_place or fields.allow_place( pos, player ) then
return fields._on_place( itemstack, player, pointed_thing )
end
return itemstack
end
end
old_register_craftitem( name, fields )
end
minetest.register_node = function ( name, fields )
if fields.on_place and fields.on_place ~= minetest.rotate_node then
fields._on_place = fields.on_place
fields.on_place = function( itemstack, player, pointed_thing )
local pos = pointed_thing.under
local node = minetest.get_node( pos )
-- allow on_rightclick callback of pointed_thing to intercept item placement
if minetest.registered_nodes[ node.name ].on_rightclick then
minetest.registered_nodes[ node.name ].on_rightclick( pos, node, player, itemstack )
-- otherwise placement is dependent on anti-grief rules of this item (if hook is defined)
elseif not fields.allow_place or fields.allow_place( pos, player ) then
return fields._on_place( itemstack, player, pointed_thing )
end
return itemstack
end
end
if fields.on_punch then
fields._on_punch = fields.on_punch
fields.on_punch = function( pos, node, player )
-- punching is dependent on anti-grief rules of this item (currently only used by tnt)
if not fields.allow_punch or fields.allow_punch( pos, player ) then
fields._on_punch( pos, node, player )
end
end
end
old_register_node( name, fields )
end
- TechNolaByte
- Member
- Posts: 465
- Joined: Wed May 10, 2017 21:00
- GitHub: TechNolaByte
Re: [Mod] Item Frames [itemframes]
i don't think that will ever get fixed as this is an old modLord_Vlad wrote:Download is down.
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.
Update:
- Invisible Item Frame added
- Glowing items will glow inside of a frame or pedestal
- Better itemframe placement (wall, floor, ceiling)
- Frames can be rotated and can sit flat on a surface to showcase items
- Both frames and pedestals no longer owned but protected (protection mod required)
https://content.minetest.net/packages/T ... temframes/
- Glowing items will glow inside of a frame or pedestal
- Better itemframe placement (wall, floor, ceiling)
- Frames can be rotated and can sit flat on a surface to showcase items
- Both frames and pedestals no longer owned but protected (protection mod required)
https://content.minetest.net/packages/T ... temframes/
Who is online
Users browsing this forum: Google [Bot] and 19 guests