[Mod] Fences [1.0] [fences]

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

[Mod] Fences [1.0] [fences]

by BlockMen » Thu Mar 07, 2013 13:52

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
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Mar 07, 2013 14:05

+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 » Thu Mar 07, 2013 14:31

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
 

User avatar
jordan4ibanez
Member
 
Posts: 1894
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Mar 08, 2013 17:13

that's neat, thexyz has done this but I think yours looks a little better
I've been gone for a long time
 

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

by 4aiman » Fri Mar 08, 2013 20:01

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 » Fri Mar 08, 2013 22:58

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
Location: Germany
GitHub: BlockMen

by BlockMen » Sat Mar 09, 2013 12:03

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
Location: Germany
GitHub: BlockMen

by BlockMen » Sat Mar 09, 2013 12:04

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 » Sat Mar 09, 2013 13:04

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
Location: Germany
GitHub: BlockMen

by BlockMen » Sat Mar 09, 2013 21:38

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 » Sun Mar 10, 2013 03:38

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
 

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

by BlockMen » Wed Mar 13, 2013 18:59

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
Location: Netherlands
GitHub: bas080
IRC: bas080
In-game: bas080

by Bas080 » Tue Mar 19, 2013 19:19

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
Location: Germany
GitHub: BlockMen

by BlockMen » Mon Mar 25, 2013 18:28

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
Location: Washington, USA
In-game: Minetestian

by Johnyknowhow » Sun Nov 17, 2013 21:06

Great, I love it
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here
 

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

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

by gumangel » Thu Jan 22, 2015 14:47

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: 4152
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

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

by Krock » Thu Jan 22, 2015 18:14

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.
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 » Thu Jan 22, 2015 18:21

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 » Thu Jan 22, 2015 21:27

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 » Fri Jan 23, 2015 10:28

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: 71
Joined: Thu Feb 19, 2015 13:21
Location: Lombardy, Italy
In-game: Echoes

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

by Echoes91 » Wed Sep 23, 2015 10:40

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,
"It wasn't easy to break so many functions by editing a single line"
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 4 guests