Page 1 of 1

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

PostPosted: Sat Aug 16, 2014 12:21
by BlockMen
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

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

PostPosted: Sat Aug 16, 2014 12:23
by AMMOnym
Nice mod (again)

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

PostPosted: Sat Aug 16, 2014 12:27
by Minetestforfun
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 ?

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

PostPosted: Sat Aug 16, 2014 17:55
by BlockMen
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.

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

PostPosted: Sun Aug 17, 2014 11:53
by balthazariv
Hello,

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

Thanks

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

PostPosted: Mon Aug 18, 2014 09:40
by BlockMen
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?

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

PostPosted: Mon Aug 18, 2014 19:02
by balthazariv
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 ;-)

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

PostPosted: Wed Aug 20, 2014 08:24
by TheEpicJames
whats the difference between fences and gate besides different model and you have to place them between two fence posts?

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

PostPosted: Wed Aug 20, 2014 08:34
by TenPlus1
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...

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

PostPosted: Tue Oct 07, 2014 14:02
by napodan
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.

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

PostPosted: Wed Oct 22, 2014 18:32
by Rochambeau
Hi,

mobs from sever mods still can jump the fences.

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

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

PostPosted: Thu Oct 23, 2014 06:35
by napodan
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 ?

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

PostPosted: Thu Oct 23, 2014 09:07
by Rochambeau
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

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

PostPosted: Thu Oct 23, 2014 09:31
by napodan
If your problem is only when they are following you, you can try to replace this line in api.lua file

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
v.y = 6

by
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
v.y = 5


and
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
self.get_velocity(self) <= 1.5

by
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

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

PostPosted: Thu Oct 23, 2014 09:55
by Rochambeau
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.

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

PostPosted: Thu Oct 23, 2014 11:36
by napodan
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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4},

by
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.5, 0.4},

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

PostPosted: Tue Oct 28, 2014 03:07
by Sokomine
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.

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

PostPosted: Fri Oct 31, 2014 04:45
by Nathan.S
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.