[Mod] Fences [1.0] [fences]

Post Reply
User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

[Mod] Fences [1.0] [fences]

by BlockMen » Post

Hi everyone,

this mod implements Fences like known from Minecraft.

Differences (to default Fence):
- new look
- connects to a neighbour Block
- introduces Fencegates
- NEW: impossible to jump over Fence and closed Fencegate

Screenshot:
Image
Although the Fence acts like 1.5 Blocks, you can still build on it.


Recipes:
This mod "overrides" the recipe for the default fence, so when crafting THIS fence will be crafted.
The Fencegate is crafted this way:

Code: Select all

stick    wood    stick
stick    wood    stick
Notice:
-This mod does not(!) replace automatically the default fence.
-If you want replace already placed default fences open the "init.lua" and change
the first line to "local override_original = true". Then all placed default fences will be replaced with this fence.

Depends:
default

Info: If you have installed the "Doors mod" the fencegate also has opening/closing sounds.

Download:
Version 1.0: current Release

Version 0.2: beta
Version 0.1: first version
Notice: works with Minetest 0.4.5

License:
WTFPL


Please give Feedback and ideas for improvement
Last edited by BlockMen on Mon Mar 25, 2013 20:11, edited 1 time in total.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

+1
Back from the dead!

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Should Minetest Fences have, some new cool addons Minecraft don't have?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

deivan
Member
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Post

Nice

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

that's neat, thexyz has done this but I think yours looks a little better
hello, am program. do language in rust. make computer do. okay i go now.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

This version has it's problems: http://youtu.be/f-Y7XvVeIIk
Last edited by 4aiman on Fri Mar 08, 2013 20:02, edited 1 time in total.

User avatar
Mito551
Member
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Post

4aiman wrote:This version has it's problems: http://youtu.be/f-Y7XvVeIIk
facedir done wrong :D

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

4aiman wrote:This version has it's problems: http://youtu.be/f-Y7XvVeIIk
Thanks, that was a great feedback! ;)
It is fixed now in Version 0.2

Mito551 wrote:
4aiman wrote:This version has it's problems: http://youtu.be/f-Y7XvVeIIk
facedir done wrong :D
Wow, how brilliant -.-'

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

Version 0.2 released.
Changelog:
-Fencegates open like Doors in Minetest 0.4.5 (rightclick)
-Fixed direction when placing Fencegate
-Fixed "opening-problem" of Fencegates

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

I still have problems with direction of fencegates...
Also It would be nice to have fences that will connect to other blocks - like xfences.

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

4aiman wrote:I still have problems with direction of fencegates...
Also It would be nice to have fences that will connect to other blocks - like xfences.
The same problems like before?? If not another vid would be great...

And the fences connect to other blocks:
BlockMen wrote: ...
Screenshot:
Image
You can see the connection to the neighbour block and an open fencegate.
...
But not to every type of block ;) So if you are missing a type, please write here .

User avatar
GloopMaster
Member
Posts: 213
Joined: Wed Aug 01, 2012 18:03
Location: http://minetest.net/forum/

by GloopMaster » Post

So basically your fences are like xfences but more picky. Seems legit.
Meow.

That is all.

johnbone
New member
Posts: 3
Joined: Sun Mar 10, 2013 04:44

by johnbone » Post

+1

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

GloopMaster wrote:So basically your fences are like xfences but more picky. Seems legit.
As far i know xFences has no Fencegates and a different look.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

Good mod, I prefer the look of these over the default. The sound that you get when including your doors mod that has working steel door that supports mesecons. This is a combo must have. Should be in default.

User avatar
BlockMen
Developer
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen
Location: Germany

by BlockMen » Post

Version 1.0 released.
Changelog:
- Fences and closed Fencegates can't be jumped over anymore.

Although the Fences acts like a 1.5 high Block it is still possible to build any Block, torches, or whatever upon it. (See screenshot)

User avatar
Johnyknowhow
Member
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian
Location: Washington, USA

by Johnyknowhow » Post

Great, I love it
It's weird looking back on my old posts as an adult. Miss some of the old times though. Johnyknowhow#5272

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [Mod] Fences [1.0] [fences]

by gumangel » Post

is there any way to make it connect to other blocks beside wood? it a really nice mod,but also idk why my fences dont replace even that i placed true in the ini....it replces it only when u craft it? and not in the creative menu?

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

Re: [Mod] Fences [1.0] [fences]

by Krock » Post

gumangel wrote:is there any way to make it connect to other blocks beside wood?
No, this is a limitation in the engine. But it's possible to connect one fence type to another.

EDIT:
If it's possible to connect to other cubic nodes, then it's an ugly hack.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [Mod] Fences [1.0] [fences]

by gumangel » Post

Krock wrote:
gumangel wrote:is there any way to make it connect to other blocks beside wood?
No, this is a limitation in the engine. But it's possible to connect one fence type to another.

EDIT:
If it's possible to connect to other cubic nodes, then it's an ugly hack.
thank you,i found a way to connect other blocks to fences,just : -connect a fence to a plank,-remove plank,-place another block,but still thank you :) God bless you!

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Fences [1.0] [fences]

by 4aiman » Post

Don't listen to Krock - he doesn't know what he's talking about. He even used "if".
There's nothing "ugly" OR "hacky" in checking the drawtype of a node.

Code: Select all

local function dockable(nodename)
    if nodename == "default:wood" or nodename == "default:brick" or nodename == "default:cobble" or nodename == "default:dirt" or nodename == "default:sandstone" or nodename == "default:stone" or string.find(nodename, "fences:fence_wood") or string.find(nodename, "fences:fencegate") then
        return true
    end
end
Just change all that conditions to smth like

Code: Select all

local function dockable(nodename)
    if (minetest.registered_nodes[nodename] and minetest.registered_nodes[nodename].drawtype=='normal')
    or nodename:find("fence_wood") 
    or nodename:find("fencegate") then
        return true
    end
end
Edit:
One may even search for "fences:"

Code: Select all

local function dockable(nodename)
    if (minetest.registered_nodes[nodename] and minetest.registered_nodes[nodename].drawtype=='normal')
    or nodename:find("fences:") then
        return true
    end
end

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [Mod] Fences [1.0] [fences]

by gumangel » Post

4aiman wrote:Don't listen to Krock - he doesn't know what he's talking about. He even used "if".
There's nothing "ugly" OR "hacky" in checking the drawtype of a node.

Code: Select all

local function dockable(nodename)
    if nodename == "default:wood" or nodename == "default:brick" or nodename == "default:cobble" or nodename == "default:dirt" or nodename == "default:sandstone" or nodename == "default:stone" or string.find(nodename, "fences:fence_wood") or string.find(nodename, "fences:fencegate") then
        return true
    end
end
Just change all that conditions to smth like

Code: Select all

local function dockable(nodename)
    if (minetest.registered_nodes[nodename] and minetest.registered_nodes[nodename].drawtype=='normal')
    or nodename:find("fence_wood") 
    or nodename:find("fencegate") then
        return true
    end
end
Edit:
One may even search for "fences:"

Code: Select all

local function dockable(nodename)
    if (minetest.registered_nodes[nodename] and minetest.registered_nodes[nodename].drawtype=='normal')
    or nodename:find("fences:") then
        return true
    end
end
thank you really much! God bless you! your really good with programing,just like the other modders over here,it really amaze me.

User avatar
Echoes91
Member
Posts: 80
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Fences [1.0] [fences]

by Echoes91 » Post

Since default_fence.png seems to not exist anymore or have been replaced (I don't know how it was before 0.4.12), I suggest this addition to follow the new default's fences definition:

Code: Select all

local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
then replace all inventory and weld images:

Code: Select all

inventory_image = fence_texture,
wield_image = fence_texture,

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests