#Infinite generating mine with infinite mine reseting
1 messages · Page 1 of 1 (latest)
just added layer 2 you can see the transition, with different ores spawning at different rates
made layer 3 etc etc
here u can see the smooth mining and transition into more layers. as well as the mine reset
also anti x-ray^^^
This is smart
Ty
what would happen perchance if i were to nuke the whole mine
would it just regenerate
or is it only when player breaks a block
player break only
rip
not rip
big rip
u cant nuke anyway
okay?
when block permutation is set to air you can in theory just run the generation script right then and there no?
nop
why not bruh
the generation replaces structure voids
therefore stopping it from replacing already broken blocks
i see.
wouldn’t you temporarily store broken block locations in the item used to break it with dynamic properties and then completely get rid of the structure blocks?
i would say that’s more efficient
i want to recreate this now
i prefer my way.
plus im already using this for a realm idea.
its based of rarity miner on roblox
new game
with infinite mining room
like mine
that’s sick
nice work again tho. have you tried with multiple people to see how it handles?
on my like 8gb ram laptop its meh, but even with multiple people mining it doesnt affect my laptop at all
damn that’s nice
even with it looking like this.
block permutations will solve your problem!
it’s really bum but better than command
lol
idek what that is
less stress on your game
what i do then
i can just send them all if u want
... i gotta do this for every layer 😭
so each block placed is a random one from the layer1 function
if (block && block.typeId === "minecraft:structure_void") {
const randomBlockType = layerOneBlocks();
block.setPermutation(BlockPermutation.resolve(randomBlockType));
that could work
that’s simple way
heh
yea
i’ll try recreate what you have with block permutation and then send you it
cuz commands is not the way 😭
alrighty
i need to make the block radius bigger and the detection for already broken blocks better but i pretty much got it lol
cool
do you want the script?
can I send you a good script?
breh
LOL
because its hurting xD
say less
function layer1() {
let random = Math.ceil(Math.random(1) * 200)
if (random >= 1 && random <= 130) return "minecraft:stone"
if (random >= 131 && random <= 170) return "minecraft:coal_ore"
if (random >= 171 && random <= 189) return "minecraft:copper_ore"
if (random >= 190 && random <= 198) return "minecraft:iron_ore"
if (random >= 199 && random <= 200) return "minecraft:coal_block"
}
world.beforeEvents.playerBreakBlock.subscribe((data) => {
let { block, player, dimension, itemStack: item } = data;
let { x, y, z } = block.location;
if (!item?.typeId.endsWith("pickaxe")) return;
system.run(() => {
let positions = [
{ x: x, y: y - 1, z: z },
{ x: x, y: y + 1, z: z },
{ x: x, y: y, z: z + 1 },
{ x: x, y: y, z: z - 1 },
{ x: x - 1, y: y, z: z },
{ x: x + 1, y: y, z: z }
];
let oreDistribution;
if (y > -54) {
oreDistribution = [
{ typeId: "minecraft:stone", probability: 0.60 },
{ typeId: "minecraft:iron_ore", probability: 0.15 },
{ typeId: "minecraft:copper_ore", probability: 0.10 },
{ typeId: "minecraft:gold_ore", probability: 0.10 }
];
} else {
oreDistribution = [
{ typeId: "minecraft:cobbled_deepslate", probability: 0.70 },
{ typeId: "minecraft:deepslate_iron_ore", probability: 0.12 },
{ typeId: "minecraft:deepslate_copper_ore", probability: 0.08 },
{ typeId: "minecraft:deepslate_gold_ore", probability: 0.07 },
{ typeId: "minecraft:deepslate_diamond_ore", probability: 0.03 }
];
}
positions.forEach(pos => {
if (dimension.getBlock(pos).typeId === "minecraft:structure_void") {
let randomValue = Math.random();
let cumulativeProbability = 0;
for (let ore of oreDistribution) {
cumulativeProbability += ore.probability;
if (randomValue < cumulativeProbability) {
dimension.setBlockType(pos, ore.typeId);
break;
}
}
}
});
});
});
here how I made it
its simple
i dont feel like remaking my system
but its better bc runCommand has a limit
I think 128
?
and it does lags
the probability doesnt even add up to 100
doesn't need to be
wait I send you a video
well my way goes like this
you need to wait bc I need to install a recorder app xD
ive looked thru ur code to understand it but i need some help understanding
what exactly does this do?
also i do have like a request kindaof
ill use ur system but could u add a way to where it will only run if the block that was broken is in an array
const allBlocks = [
"minecraft:stone",
"minecraft:coal_ore",
"minecraft:copper_ore",
"minecraft:iron_ore",
"minecraft:coal_block",
"minecraft:diorite",
"minecraft:iron_block",
"minecraft:andesite",
"minecraft:gold_ore",
"minecraft:emerald_ore",
"minecraft:diamond_ore"
]
i use this for mine
so i can still build at that height
actually nvm
i can add that ignore me
its generate a random nummer 0-1
for loop get the ore propability and typeId from the list than
its add the ore propability to a empty variable than it looks if the ore.propability is under the generated number if yes its set a block/ore
so the probability
is like percentage?
0.1 = 10%?
then 0.0025 = 0.25%?
in the probability?
oh no 1 = 100% 0.9 = 90% etc
how woul i get smaller percentages then
no way you still exist bro
i just came back
forgor who u r tho ngl
thats crazy
if you want 25 than its need to be 0.25
no
i need 0.25%
which from everything im seeing, would be 0.0025
probability
yes
yea i said that already 😭
its not double layered btw
its just adding here some coords
let positions = [
{ x: x, y: y - 1, z: z },
{ x: x, y: y + 1, z: z },
{ x: x, y: y, z: z + 1 },
{ x: x, y: y, z: z - 1 },
{ x: x - 1, y: y, z: z },
{ x: x + 1, y: y, z: z }
];
yea my brain hurts
🙏
It actually uses the same method of generation aswell
