[Mod] A simple bedrock mod [20120316] [bedrock]

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

by Wuzzy » Tue Sep 24, 2013 21:54

Yes.
But why should I want it?
Since it’s an entire layer full of bedrock, there is no way to legitimately get to the other side. Therefore, it does not matter if the layer is one node length thick or even 1000. You’ll never see what’s on the other side unless you cheat.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Wed Sep 25, 2013 00:56

I'd like to see this mod rewritten to use the engine's Voxel Manipulator functions, which are much faster at setting large regions of nodes.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

by Wuzzy » Wed Sep 25, 2013 14:50

I’d like to try it (seems easy enough), but I do not understand anything about LuaVoxelManip. :-(
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Sep 25, 2013 19:31

can i have the way to make it deep
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Thu Oct 03, 2013 00:46

is there a way to put a bedrock layer in the air an underground...it will be like a limit on how far you can go up an down
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Oct 03, 2013 01:10

Element wrote:is there a way to put a bedrock layer in the air an underground...it will be like a limit on how far you can go up an down
Of course there is. -_-
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Thu Oct 03, 2013 19:43

then how...do i do -1000, 1000
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Oct 03, 2013 20:33

Element wrote:then how...do i do -1000, 1000
I don't know, but it certainly is possible. To quote my original signature "If you want something done, do it yourself."
Last edited by Evergreen on Thu Oct 03, 2013 20:33, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Mon Oct 21, 2013 19:02

i have had this mod for sometime and all of a sudden i cant build under the bedrock layer...do i have to change something in the programing
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Tue Oct 22, 2013 19:58

can anyone help me
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Tue Oct 22, 2013 20:00

do i replace this init with the old one
Wuzzy wrote:
Element wrote:the unuke(tnt) mod can destroy bedrock...


This is both a bug in unuke and bedrock.

Element wrote:is there a way you can make it so it cant

Yes, by fixing the bugs. I fixed one of them. :-)

Now to the bugs:
unuke bug: A nuke destroys ANY node, no matter what it is, completely ignoring the properties of the node. This is a bit rude. This is also true for the TNT mod, for the same reasons.
bedrock bug: It does not use on_blast. By the way, bedrock’s code is kinda dated, I am surprised that you made the mod work at all.

On_blast is a neat little function defined in the modding API as a node callback if an explosion is close to a node. The engine does not use this function yet, but it is intended to be called by mods that cause explosions for every node that is affected by the explosion.
on_blast syntax: on_blast(pos, intensity)
pos = position
intensity = intensity of explosion. The intensity of a regular TNT is defined to be 1.

The trick is, on_blast will only be called if it’s not nil. If it’s nil, a standard behaviour will be done to the mod (removing it, for example). Well, at least that’s the idea how the mods handle on_blast. Mods still may screw this up.

Also there were no groups back in the days where this olden mod had been created. For nodes like bedrocks, there is now the group “immortal”. :-) Now you can dig forever on a bedrock and it will never break. It may be still possible to remove bedrock with special tools like the admin pickaxe, or stuff like that.

Here is a fresh version of Bedrock:
init.lua:
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
local bedrock = {}

bedrock.layer = -30912 -- determined as appropriate by experiment
bedrock.node = {name = "bedrock:bedrock"}

minetest.register_on_generated(function(minp, maxp)
    if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then
        local p = {y = bedrock.layer}
        local n = bedrock.node
        for x = minp.x,maxp.x do
        for z = minp.z,maxp.z do
            p.x=x; p.z=z
            minetest.env:set_node(p, n)
        end
        end
    end
end)

minetest.register_node("bedrock:bedrock", {
    description = "Bedrock",
    tiles = {"bedrock.png"},
    groups = {immortal=1, stone=1, not_in_creative_inventory=1},
    on_blast = function() end,
})

(the other files keep unchanged)

Above code was tested with 0.4.7. It’s usable again. :-)
I call this version of bedrock “20130924”.
Funnily, the lowest possible Y coordinate has changed over the years.

See the trick? On_blast here is defined as a function which does literally nothing, not caring about the position and the explosion intensity. Because that’s exactly what we want: No matter how big the explosion, bedrock shall stay bedrock forever.

Note that the unuke mod and the TNT mod both do not respect on_blast yet. So these mods have to be changed, too, so that bedrock does not get destroyed by explosions. I should start complaining in their respective threads soon. ;-)

For the future I would like the bedrock mod to:
  1. have sounds for bedrock (preferably not the default sounds! ;-))
  2. use LuaVoxelManip instead of set_node for better performance (I do not understand LuaVoxelManip yet :-(. )

My changes fall under the WTFPL, of course.
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 15:20

Element wrote:do i replace this init with the old one

You can 'comment out' the old code:
Put this --[[ above it and
put: --]] under it.

Then copy Wuzzy's code from here and paste it under the --]] in the init.lua


Element wrote:i have had this mod for sometime and all of a sudden i cant build under the bedrock layer...do i have to change something in the programing


I've no idea which height you are:
- It's not possible to build under -30912, because that's as far down as minetest goes at the moment.

Element wrote:then how...do i do -1000, 1000

When using Wuzzy's code, replace -30912 with -1000. You'll create a bedrock layer at -1000 and will be able to build under it (when you teleport or fly under it).




Edit: Typo's.
Last edited by Topywo on Wed Oct 23, 2013 15:22, edited 1 time in total.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 19:20

my layer is at -1000nodes and for the init, do i do it like this...--[[
(the old init)
--]]
(the new init)
or like this, --[[ (the old init) --]] (the new init)

the reason why im asking this is because im not good at programing and do i put the (--) in it as well
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 22:21

im sorry for saying this but...Im P.O...i cant build or destroy anything at or below the bedrock layer, i even put the new code in like thiss...
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
--[[ A simple bedrock mod by jn
-- Calinou made the texture, I brightened it up

-- This program is free software. It comes without any warranty, to
-- the extent permitted by applicable law. You can redistribute it
-- and/or modify it under the terms of the Do What The Fuck You Want
-- To Public License, Version 2, as published by Sam Hocevar. See
-- http://sam.zoy.org/wtfpl/COPYING or the file COPYING for more details.

--do return end -- uncomment to disable bedrock

local bedrock = {}

bedrock.layer = -1000 -- determined as appropriate by experiment
bedrock.node = {name = "bedrock:bedrock"}
--bedrock.digprop = minetest.digprop_constanttime(1000000)
bedrock.digprop = {diggability = "not"}

minetest.register_on_generated(function(minp, maxp)
    if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then
        local p = {y = bedrock.layer}
        local n = bedrock.node
        for x = minp.x,maxp.x do
        for z = minp.z,maxp.z do
            p.x=x; p.z=z
            minetest.env:add_node(p, n)
        end
        end
    end
end)

minetest.register_node("bedrock:bedrock", {
    description = "Bedrock",
    tile_images = {"bedrock.png"},
    material = bedrock.digprop
})
--]]
local bedrock = {}

bedrock.layer = -1000 -- determined as appropriate by experiment
bedrock.node = {name = "bedrock:bedrock"}

minetest.register_on_generated(function(minp, maxp)
    if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then
        local p = {y = bedrock.layer}
        local n = bedrock.node
        for x = minp.x,maxp.x do
        for z = minp.z,maxp.z do
            p.x=x; p.z=z
            minetest.env:set_node(p, n)
        end
        end
    end
end)

minetest.register_node("bedrock:bedrock", {
    description = "Bedrock",
    tiles = {"bedrock.png"},
    groups = {immortal=1, stone=1, not_in_creative_inventory=1},
    on_blast = function() end,
})
is there anything wrong in here that might be stopping me
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 23:14

Element wrote:is there anything wrong in here that might be stopping me


No, the code should work like this (I tested it).
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 23:18

You have bedrock at -1000.

- Did you go under it using fly/freemove (K) and noclip (j)?
- What was your Y coordinate under it?
- How do the blocks look under the bedrock (like bedrock, big grey area, normal stone?)


- Are you playing creative?

Suggestion: try a new world with only bedrock enabled to see if the mod works well

Edit: more questions.
Last edited by Topywo on Wed Oct 23, 2013 23:20, edited 1 time in total.
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Wed Oct 23, 2013 23:26

wait...did you say "..i cant build or destroy anything at or below the bedrock layer,"

lol i guess bedrock is now really bedrock - no you cannot build or destroy anything below or at the bedrock layer - bedrock cannot be dug - follws the mc pattern, but idk about the texture...too um...idk, just isn't recognizable as bedrock - i wonder what bedrock look like irl... edit:woot -> http://geology.er.usgs.gov/eespteam/Greatfalls/web_site/bedrock.htm
Last edited by leetelate on Wed Oct 23, 2013 23:28, edited 1 time in total.
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 23:29

well, i have some tnt mods that blow up bedrock and when i first used the bedrock mod i was able to did and build under the layer but now i cant
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Wed Oct 23, 2013 23:33

yeah, that's what the mod fix was about - not being able to blast it or anything down where the bedrock is

interesting...mc's bedrock is sorta like the irl bedrock, just paralell lines
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 23:34

leetelate wrote:wait...did you say "..i cant build or destroy anything at or below the bedrock layer,"

lol i guess bedrock is now really bedrock - no you cannot build or destroy anything below or at the bedrock layer - bedrock cannot be dug - follws the mc pattern, but idk about the texture...too um...idk, just isn't recognizable as bedrock - i wonder what bedrock look like irl...



Using the bedrock mod it looks like this:

Image


Edit: n.i.
Last edited by Topywo on Wed Oct 23, 2013 23:40, edited 1 time in total.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 23:34

true...i still miss being able to build down there
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 23:45

my iron, mese, and uranium tnt can still blow the bedrock up
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 23:50

Element wrote:my iron, mese, and uranium tnt can still blow the bedrock up


Wuzzy wrote:Note that the unuke mod and the TNT mod both do not respect on_blast yet. So these mods have to be changed, too, so that bedrock does not get destroyed by explosions. I should start complaining in their respective threads soon. ;-)
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Oct 23, 2013 23:52

how do i make it so i can build under the layer again
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Wed Oct 23, 2013 23:55

Element wrote:how do i make it so i can build under the layer again


You have bedrock at -1000.
- Did you go under it using fly/freemove (K) and noclip (j)?
- What was your Y coordinate under it?
- How do the blocks look under the bedrock (like bedrock, big grey area, normal stone?)

- Are you playing creative?
Suggestion: try a new world with only bedrock enabled to see if the mod works well
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Thu Oct 24, 2013 00:08

ok...yes i did use fly and noclip and then i used a tnt to make a cave...i can put stuff on the layer at -999 nodes but not at -1000 nodes and below...the blocks under the layer are normal stone, minerals, lava...i am in creative...and this is the second world i have had this problem
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Thu Oct 24, 2013 09:42

Element wrote:ok...yes i did use fly and noclip and then i used a tnt to make a cave...i can put stuff on the layer at -999 nodes but not at -1000 nodes and below...the blocks under the layer are normal stone, minerals, lava...i am in creative...and this is the second world i have had this problem


I just tested in a new world the old bedrock mod (but then at -1000), then the new bedrock in the same world. I still can build under the bedrock layer. Maybe this isn't a bedrock mod problem, so we must look somewhere else. New questions:

1. What operating system do you use (Windows, Mac, Linux)
2. Who's build did you download or did you compile it yourself?
3. What minetest version are you using (latest github built, 0.4.7 stable, 0.4.4)
4. Which mods have you enabled in your (bedrock-)world?


Edit: Just to not overlook it. Do you have something in your hand while trying to dig/build under bedrock (pick, apple, or...)?
Last edited by Topywo on Thu Oct 24, 2013 09:45, edited 1 time in total.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Thu Oct 24, 2013 19:11

1. Windows
2. what do you mean buy build
3. 0.4.7
4. umm i have many and how would i insert a folder so i can show you
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Oct 24, 2013 19:39

Element wrote:2. what do you mean buy build

How did you get Minetest? (e.g. the official release from the homepage, or one of my builds, or one of BlockMens builds...)
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Thu Oct 24, 2013 19:44

oh...i got it from Downloads on the Minetest home page
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 34 guests

cron