[Mod] Simple Fence gate [1.0] [gate]

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

[Mod] Simple Fence gate [1.0] [gate]

by BlockMen » Post

Hi everyone,

this mod adds a fence gate to Minetest, preserving the visual fence style of Minetest. Also it makes jumping over fence impossible and fixes the collision box of it (not like a full block anymore).
You can place the fence gate ONLY between two fence posts.

Screenshots:
Image

Crafting:
stick wood stick
stick wood stick

Download:
Version 1.0 (Minetest 0.4.9 or later)
Github: gate

License:
WTFPL
Last edited by BlockMen on Sat Aug 16, 2014 17:54, edited 2 times in total.

User avatar
AMMOnym
Member
Posts: 682
Joined: Tue Sep 10, 2013 14:18
IRC: AMMOnym
In-game: AMMOnym
Location: Slovakia

Re: [Mod] Simple Fence gates [1.0] [gate]

by AMMOnym » Post

Nice mod (again)

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Simple Fence gates [1.0] [gate]

by Minetestforfun » Post

Thank you for your work ! (im happy because it's a "minetest skin")
I add this mod instead of your other "fence-gate" old mod

the recipe of this fence-gate is the same recipe of the old-fence-gate, so how can i make the new fence-gate without loose the fences wood ?

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

Re: [Mod] Simple Fence gates [1.0] [gate]

by BlockMen » Post

Minetestforfun wrote:Thank you for your work ! (im happy because it's a "minetest skin")
I add this mod instead of your other "fence-gate" old mod

the recipe of this fence-gate is the same recipe of the old-fence-gate, so how can i make the new fence-gate without loose the fences wood ?
This mod and the fences mod is not compatible, sry.

User avatar
balthazariv
Member
Posts: 214
Joined: Mon Apr 07, 2014 15:48
Contact:

Re: [Mod] Simple Fence gate [1.0] [gate]

by balthazariv » Post

Hello,

I tried but every time it disappears. No error in debug.txt. (Minetest 0.4.10)

Thanks

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

Re: [Mod] Simple Fence gate [1.0] [gate]

by BlockMen » Post

balthazariv wrote:Hello,

I tried but every time it disappears. No error in debug.txt. (Minetest 0.4.10)

Thanks
You noticed this?
BlockMen wrote: You can place the fence gate ONLY between two fence posts.
If so, does this happen aswell with just his mod enabled?

User avatar
balthazariv
Member
Posts: 214
Joined: Mon Apr 07, 2014 15:48
Contact:

Re: [Mod] Simple Fence gate [1.0] [gate]

by balthazariv » Post

BlockMen wrote: You can place the fence gate ONLY between two fence posts.
Oh, I apologize a thousand times I had not seen.
It works now ;-)

User avatar
TheEpicJames
Member
Posts: 634
Joined: Sun Dec 29, 2013 23:05
IRC: TheEpicJames
In-game: Block_Guy
Location: Some grassy area next to a forest, a river and a desert.
Contact:

Re: [Mod] Simple Fence gate [1.0] [gate]

by TheEpicJames » Post

whats the difference between fences and gate besides different model and you have to place them between two fence posts?
I'm honestly not sure why I had "I like PIE." in my signature when I don't even really like it that much.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Simple Fence gate [1.0] [gate]

by TenPlus1 » Post

A bug was pointed out with the expanded node box on fence posts... place 2 sand on a post then dig the bottom one and the top one hangs and cannot be removed...

User avatar
napodan
Member
Posts: 42
Joined: Mon Sep 29, 2014 12:07
GitHub: napodan
Location: Asnieres/France

Re: [Mod] Simple Fence gate [1.0] [gate]

by napodan » Post

Hi,

I tried to use your gate with some mobs but I've problem with the collision box. Can you tell me, what is the maximum collision box I can use for my mobs ? I try to find it myself, but I don't understand how it's working.

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Simple Fence gate [1.0] [gate]

by Rochambeau » Post

Hi,

mobs from sever mods still can jump the fences.

Don't know who to inform, you or the mobs modder. :)

User avatar
napodan
Member
Posts: 42
Joined: Mon Sep 29, 2014 12:07
GitHub: napodan
Location: Asnieres/France

Re: [Mod] Simple Fence gate [1.0] [gate]

by napodan » Post

In some mods, mobs can jump very high (sheeps in simple mobs and derivative, can jump 2 blocks or more if they follow you). The problem is more a "compatibility problem". To get rid of this problem, I modify simple mobs for my use.
Which mod are you using ?

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Simple Fence gate [1.0] [gate]

by Rochambeau » Post

napodan wrote:In some mods, mobs can jump very high (sheeps in simple mobs and derivative, can jump 2 blocks or more if they follow you). The problem is more a "compatibility problem". To get rid of this problem, I modify simple mobs for my use.
Which mod are you using ?
Mobs redo
viewtopic.php?f=11&t=9917

User avatar
napodan
Member
Posts: 42
Joined: Mon Sep 29, 2014 12:07
GitHub: napodan
Location: Asnieres/France

Re: [Mod] Simple Fence gate [1.0] [gate]

by napodan » Post

If your problem is only when they are following you, you can try to replace this line in api.lua file

Code: Select all

v.y = 6
by

Code: Select all

v.y = 5
and

Code: Select all

self.get_velocity(self) <= 1.5 
by

Code: Select all

self.get_velocity(self) <= 0.5 
With the last fix, mobs will stop jumping when there is no need when they follow you.

I can't test it now. But if that doesn't work, or if your problem is not only when they are following you, I will test it later.

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Simple Fence gate [1.0] [gate]

by Rochambeau » Post

Thank you for your help.

The problem is, when they are not following me.

I want to keep some animals on my farm. But they always escape if i don't build the fences high enough. Two layers of fences works, but doesn't look good to me.

User avatar
napodan
Member
Posts: 42
Joined: Mon Sep 29, 2014 12:07
GitHub: napodan
Location: Asnieres/France

Re: [Mod] Simple Fence gate [1.0] [gate]

by napodan » Post

I try with one sheep and only fence_wood (no gate). It can't jump over the fence. With 2 sheeps, one can jump on the other and then over the fence. The only solution, I see for now, is to modifiy in sheep.lua (or any other animal file) the line

Code: Select all

collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},
by

Code: Select all

collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.5, 0.4},

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Simple Fence gate [1.0] [gate]

by Sokomine » Post

napodan wrote: The only solution, I see for now, is to modifiy in sheep.lua
Hm. Increasing sheep height so that a sheep doesn't manage to jump on another sheep's back anymore because it's too heigh might indeed be a solution. Except that the sheep then won't be able to pass below something where there is enough space for the animal but not for the increased collusion box.
Mobs from mobf/animals modpack are far more well-behaved in this regard. They stay in their pens.
A list of my mods can be found here.

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Simple Fence gate [1.0] [gate]

by Nathan.S » Post

The craft recipe for the gate is only default:wood, it could/should be expanded to be group:wood. I've created a pull request on the repo with said changes.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 24 guests