Giter Club home page Giter Club logo

Comments (169)

 avatar commented on July 29, 2024 2

@Hacker1254 @GuineaPigBridge Just a personal suggestion, you both seem like you could benefit from a faster means of communication, which GitHub isn't ideal for. You might be better off using a site like Replit.com for testing your updates,
a) they provide a console that might allow you to see JavaScript runtime exceptions (helpful considering how you're on a school device),
b) you could both just directly work on the code

from minekhan.

 avatar commented on July 29, 2024 1

I have a feeling I'm going to end up bombarding the issue, so I'll stop

from minekhan.

Willard21 avatar Willard21 commented on July 29, 2024 1

There's also an edit button on messages 😉

from minekhan.

 avatar commented on July 29, 2024 1

i wish, but repl.co is blocked

Ah, my apologies, if that's the case then just disregard my comment.

from minekhan.

 avatar commented on July 29, 2024

https://www.khanacademy.org/computer-programming/geekypeoplecraft/4805420559319040

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Oo this does bioms a bit better
if you made this, can you tell me how?

from minekhan.

SnehasishCodez avatar SnehasishCodez commented on July 29, 2024

@willard should use world chunks to his favor by using chunks he could then either use random values or use Perlin noise to edit specific chunks through the world and by copypasting he can change the assets At least that's probably how j,s coder did it in this project https://www.khanacademy.org/computer-programming/fall-damage/5522736472080384

if thats not the case at least he should get started.

from minekhan.

 avatar commented on July 29, 2024

Oo this does bioms a bit better
if you made this, can you tell me how?

I just mashed together some gen code and I don't even know how it works!

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

can i get Just the gen code?
as if i can get this into my modded, it will make it better

from minekhan.

 avatar commented on July 29, 2024

Ok. This is it.

```

let generator = {
height: 200, // Height of the hills
smooth: 0.01, // Smoothness of the terrain
extra: 30, // Extra height added to the world.
caveSize: 0.00, // Redefined right above where it's used
biomeSmooth: 0.007
}

genChunk(chunk) {
		let x = chunk.x >> 4
		let z = chunk.z >> 4
		let trueX = chunk.x
		let trueZ = chunk.z

		if (chunk.generated) {
			return false
		}
		let hide = !loadString
		let smoothness = generator.smooth
		let hilliness = generator.height
		let biomeSmooth = generator.biomeSmooth;
		let gen = 0;
		let biome = 0;
		for (let i = 0; i < 16; i++) {
			for (let k = 0; k < 16; k++) {
				if(gen<120 && !superflat) {
			    gen = 100;
			    chunk.setBlock(i, gen, k, blockIds.Water);

			}
				biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));
				gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
				chunk.tops[k * 16 + i] = gen

		    if(biome > 0.25 && !superflat){
			
			chunk.tops[k * 16 + i] = gen;

			chunk.setBlock(i, gen, k, blockIds.sand);
			chunk.setBlock(i, gen - 1, k, blockIds.sand);
			chunk.setBlock(i, gen - 2, k, blockIds.sand);
			chunk.setBlock(i, gen - 3, k, blockIds.sand);
			if(gen>120){
			    chunk.setBlock(i, gen, k, blockIds.stone);
			}
			if(gen>140){
			    chunk.setBlock(i, gen, k, blockIds.whiteWool);
			}
		}

			if(biome < 0.25){
			chunk.tops[k * 16 + i] = gen;


			chunk.setBlock(i, gen, k, blockIds.grass);
			chunk.setBlock(i, gen - 1, k, blockIds.dirt);
			chunk.setBlock(i, gen - 2, k, blockIds.dirt);
			chunk.setBlock(i, gen - 3, k, blockIds.dirt);

		    }

				for (let j = 1; j < gen - 3; j++) {
					chunk.setBlock(i, j, k, blockIds.stone)
				}
				chunk.setBlock(i, 0, k, blockIds.bedrock)
			}
		}
		chunk.generated = true
	}

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Thank you, you are a god👍

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Altho can you fix the formating?

from minekhan.

 avatar commented on July 29, 2024

Uhhhh, hw do I do that?

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

just put all of the code in between a ``

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Like this

from minekhan.

 avatar commented on July 29, 2024

Ok.
`let generator = {
height: 200, // Height of the hills
smooth: 0.01, // Smoothness of the terrain
extra: 30, // Extra height added to the world.
caveSize: 0.00, // Redefined right above where it's used
biomeSmooth: 0.007
}

genChunk(chunk) {
let x = chunk.x >> 4
let z = chunk.z >> 4
let trueX = chunk.x
let trueZ = chunk.z

	if (chunk.generated) {
		return false
	}
	let hide = !loadString
	let smoothness = generator.smooth
	let hilliness = generator.height
	let biomeSmooth = generator.biomeSmooth;
	let gen = 0;
	let biome = 0;
	for (let i = 0; i < 16; i++) {
		for (let k = 0; k < 16; k++) {
			if(gen<120 && !superflat) {
		    gen = 100;
		    chunk.setBlock(i, gen, k, blockIds.Water);

		}
			biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));
			gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
			chunk.tops[k * 16 + i] = gen

	    if(biome > 0.25 && !superflat){
		
		chunk.tops[k * 16 + i] = gen;

		chunk.setBlock(i, gen, k, blockIds.sand);
		chunk.setBlock(i, gen - 1, k, blockIds.sand);
		chunk.setBlock(i, gen - 2, k, blockIds.sand);
		chunk.setBlock(i, gen - 3, k, blockIds.sand);
		if(gen>120){
		    chunk.setBlock(i, gen, k, blockIds.stone);
		}
		if(gen>140){
		    chunk.setBlock(i, gen, k, blockIds.whiteWool);
		}
	}

		if(biome < 0.25){
		chunk.tops[k * 16 + i] = gen;


		chunk.setBlock(i, gen, k, blockIds.grass);
		chunk.setBlock(i, gen - 1, k, blockIds.dirt);
		chunk.setBlock(i, gen - 2, k, blockIds.dirt);
		chunk.setBlock(i, gen - 3, k, blockIds.dirt);

	    }

			for (let j = 1; j < gen - 3; j++) {
				chunk.setBlock(i, j, k, blockIds.stone)
			}
			chunk.setBlock(i, 0, k, blockIds.bedrock)
		}
	}
	chunk.generated = true
}`

from minekhan.

 avatar commented on July 29, 2024

Some parts don't work

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Strange, but ok testing it now 👍

from minekhan.

 avatar commented on July 29, 2024

I might break it up...
let generator = { height: 200, // Height of the hills smooth: 0.01, // Smoothness of the terrain extra: 30, // Extra height added to the world. caveSize: 0.00, // Redefined right above where it's used biomeSmooth: 0.007 }

from minekhan.

 avatar commented on July 29, 2024

The rest
`

genChunk(chunk) {
let x = chunk.x >> 4
let z = chunk.z >> 4
let trueX = chunk.x
let trueZ = chunk.z

	if (chunk.generated) {
		return false
	}
	let hide = !loadString
	let smoothness = generator.smooth
	let hilliness = generator.height
	let biomeSmooth = generator.biomeSmooth;
	let gen = 0;
	let biome = 0;
	for (let i = 0; i < 16; i++) {
		for (let k = 0; k < 16; k++) {
			if(gen<120 && !superflat) {
		    gen = 100;
		    chunk.setBlock(i, gen, k, blockIds.Water);

		}
			biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));
			gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
			chunk.tops[k * 16 + i] = gen

	    if(biome > 0.25 && !superflat){
		
		chunk.tops[k * 16 + i] = gen;

		chunk.setBlock(i, gen, k, blockIds.sand);
		chunk.setBlock(i, gen - 1, k, blockIds.sand);
		chunk.setBlock(i, gen - 2, k, blockIds.sand);
		chunk.setBlock(i, gen - 3, k, blockIds.sand);
		if(gen>120){
		    chunk.setBlock(i, gen, k, blockIds.stone);
		}
		if(gen>140){
		    chunk.setBlock(i, gen, k, blockIds.whiteWool);
		}
	}

		if(biome < 0.25){
		chunk.tops[k * 16 + i] = gen;


		chunk.setBlock(i, gen, k, blockIds.grass);
		chunk.setBlock(i, gen - 1, k, blockIds.dirt);
		chunk.setBlock(i, gen - 2, k, blockIds.dirt);
		chunk.setBlock(i, gen - 3, k, blockIds.dirt);

	    }

			for (let j = 1; j < gen - 3; j++) {
				chunk.setBlock(i, j, k, blockIds.stone)
			}
			chunk.setBlock(i, 0, k, blockIds.bedrock)
		}
	}
	chunk.generated = true
}

`

from minekhan.

 avatar commented on July 29, 2024

Take 2: `
genChunk(chunk) {
let x = chunk.x >> 4
let z = chunk.z >> 4
let trueX = chunk.x
let trueZ = chunk.z

	if (chunk.generated) {
		return false
	}
	let hide = !loadString
	let smoothness = generator.smooth
	let hilliness = generator.height
	let biomeSmooth = generator.biomeSmooth;
	let gen = 0;
	let biome = 0;
	for (let i = 0; i < 16; i++) {
		for (let k = 0; k < 16; k++) {
			if(gen<120 && !superflat) {
		    gen = 100;
		    chunk.setBlock(i, gen, k, blockIds.Water);

		}
			biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));
			gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
			chunk.tops[k * 16 + i] = gen

	    if(biome > 0.25 && !superflat){
		
		chunk.tops[k * 16 + i] = gen;

		chunk.setBlock(i, gen, k, blockIds.sand);
		chunk.setBlock(i, gen - 1, k, blockIds.sand);
		chunk.setBlock(i, gen - 2, k, blockIds.sand);
		chunk.setBlock(i, gen - 3, k, blockIds.sand);
		if(gen>120){
		    chunk.setBlock(i, gen, k, blockIds.stone);
		}
		if(gen>140){
		    chunk.setBlock(i, gen, k, blockIds.whiteWool);
		}
	}

		if(biome < 0.25){
		chunk.tops[k * 16 + i] = gen;


		chunk.setBlock(i, gen, k, blockIds.grass);
		chunk.setBlock(i, gen - 1, k, blockIds.dirt);
		chunk.setBlock(i, gen - 2, k, blockIds.dirt);
		chunk.setBlock(i, gen - 3, k, blockIds.dirt);

	    }

			for (let j = 1; j < gen - 3; j++) {
				chunk.setBlock(i, j, k, blockIds.stone)
			}
			chunk.setBlock(i, 0, k, blockIds.bedrock)
		}
	}
	chunk.generated = true
}`

from minekhan.

Willard21 avatar Willard21 commented on July 29, 2024

Between 3 ticks is better for formatting. Basically the same as Khan Academy markdown.
image
But put the ticks on their own lines. And you can add syntax highlighting like
```js
if (42 === 13) {
return;
}
```

from minekhan.

 avatar commented on July 29, 2024

Thanks! I'll try it out....
I feel so dumb...

from minekhan.

 avatar commented on July 29, 2024
genChunk(chunk) {
		let x = chunk.x >> 4
		let z = chunk.z >> 4
		let trueX = chunk.x
		let trueZ = chunk.z

		if (chunk.generated) {
			return false
		}
		let hide = !loadString
		let smoothness = generator.smooth
		let hilliness = generator.height
		let biomeSmooth = generator.biomeSmooth;
		let gen = 0;
		let biome = 0;
		for (let i = 0; i < 16; i++) {
			for (let k = 0; k < 16; k++) {
				if(gen<120 && !superflat) {
			    gen = 100;
			    chunk.setBlock(i, gen, k, blockIds.Water);

			}
				biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));
				gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
				chunk.tops[k * 16 + i] = gen

		    if(biome > 0.25 && !superflat){
			
			chunk.tops[k * 16 + i] = gen;

			chunk.setBlock(i, gen, k, blockIds.sand);
			chunk.setBlock(i, gen - 1, k, blockIds.sand);
			chunk.setBlock(i, gen - 2, k, blockIds.sand);
			chunk.setBlock(i, gen - 3, k, blockIds.sand);
			if(gen>120){
			    chunk.setBlock(i, gen, k, blockIds.stone);
			}
			if(gen>140){
			    chunk.setBlock(i, gen, k, blockIds.whiteWool);
			}
		}

			if(biome < 0.25){
			chunk.tops[k * 16 + i] = gen;


			chunk.setBlock(i, gen, k, blockIds.grass);
			chunk.setBlock(i, gen - 1, k, blockIds.dirt);
			chunk.setBlock(i, gen - 2, k, blockIds.dirt);
			chunk.setBlock(i, gen - 3, k, blockIds.dirt);

		    }

				for (let j = 1; j < gen - 3; j++) {
					chunk.setBlock(i, j, k, blockIds.stone)
				}
				chunk.setBlock(i, 0, k, blockIds.bedrock)
			}
		}
		chunk.generated = true
	}```

from minekhan.

 avatar commented on July 29, 2024

Ye that works!

from minekhan.

 avatar commented on July 29, 2024
let generator = {
height: 200, // Height of the hills
smooth: 0.01, // Smoothness of the terrain
extra: 30, // Extra height added to the world.
caveSize: 0.00, // Redefined right above where it's used
biomeSmooth: 0.007
}```

from minekhan.

 avatar commented on July 29, 2024

Thanks Willard!

from minekhan.

 avatar commented on July 29, 2024

ahhh! That thing !!! : "<>"

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Thanks to both of you!
also @GuineaPigBridge
here is my beta, i gotta work on it some more https://www.khanacademy.org/computer-programming/minekhan/6206167318478848
i do need to find out how to make the catus form

@Willard21 how did you get the block data, like greenwool, as im gonna try adding in a few blocks

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024
let generator = {
height: 200, // Height of the hills
smooth: 0.01, // Smoothness of the terrain
extra: 30, // Extra height added to the world.
caveSize: 0.00, // Redefined right above where it's used
biomeSmooth: 0.007
}```

This works a lot Better

let generator = {
	height: 80, // Height of the hills
	smooth: 0.01, // Smoothness of the terrain
	extra: 30, // Extra height added to the world.
	caveSize: 0.00, // Redefined right above where it's used
	biomeSmooth: 0.007 // smooth of biomes

from minekhan.

 avatar commented on July 29, 2024

Ye. The height was just to make it dynamic

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

i have improved your biome code a bit
and atm i will make trees stop spawning in the water and desert

from minekhan.

 avatar commented on July 29, 2024

Ok.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

This Is Looking Great!
Altho, i dont know how to fix the game crashes at death
i think im missing some code

from minekhan.

 avatar commented on July 29, 2024

Check F12 console. Any errors?

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Check F12 console. Any errors?

im on a school chromebook so i cant check, sorry

This is the code that the other mod used for catus

	if (random() < 0.01 && this.getBlock(i, ground, k) && biome > 0.5 && ground > 60) {
					top = ground + Math.floor(2.5 + random(1.5));
					rand = Math.floor(random(4096));
					let tree = blockIds.greenWool;

					//Center
					for (let j = ground + 1; j <= top; j++) {
						this.setBlock(i, j, k, tree);
					}
					this.setBlock(i, ground, k, blockIds.sand);
				} // cactus
				

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

but with that code, the world doesn't gen
do you know why?

from minekhan.

 avatar commented on July 29, 2024

did you define biome in populate()?

from minekhan.

 avatar commented on July 29, 2024

if so, you have to:

populate() {
			randomSeed(hash(this.x, this.z) * 210000000)
			let wx = 0, wz = 0, ground = 0, top = 0, rand = 0, place = false
			let biomeSmooth = generator.biomeSmooth;
			let biome = 0;
			let gen = 0;
			let trueX = this.x;
			let trueZ = this.z;
			let smoothness = generator.smooth
			let hilliness = generator.hilliness
			var items = [blockIds.jungleLog, blockIds.darkOakLog, blockIds.acaciaLog,blockIds.birchLog]
			var randomtree = items[Math.floor(Math.random() * items.length)];
			for (let i = 0; i < 16; i++) {
				for (let k = 0; k < 16; k++) {
					wx = this.x + i
					wz = this.z + k
					ground = this.tops[k * 16 + i]
					gen = superflat ? 4 : Math.round(noise((trueX + i) * smoothness, (trueZ + k) * smoothness) * hilliness) + generator.extra
					biome = superflat ? 0 : Math.round(noise((trueX + i) * biomeSmooth, (trueZ + k) * biomeSmooth));

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

let me see if that works

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

It Worked! kinda
image

from minekhan.

 avatar commented on July 29, 2024

Cool! You just need to change the tree gen so it doesn't overlap:

if (trees && random() < 0.005 && this.getBlock(i, ground, k) && biome < 0.5) {

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

ah thats the code!
thanks

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

image
image

from minekhan.

 avatar commented on July 29, 2024

For that, you just need to change the gen least for sea.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

yeah

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

For that, you just need to change the gen least for sea.

Ah man i got stuck
im still not good at coding, how do i do that?

from minekhan.

 avatar commented on July 29, 2024

A few ways, but you can

this.getBlock(i, ground, k) === blockIds.grass

In the if() for the trees.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Works
Thanks :p

from minekhan.

 avatar commented on July 29, 2024

You see, magic!

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Do you think you can help me with the death sys
when i have dieing on, and you die, the game crashes
i think it cuz the game dosent know what to do, so it just freezes

from minekhan.

 avatar commented on July 29, 2024

just try it so it displays an alert to start with.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

try it out here
https://www.khanacademy.org/computer-programming/minekhan/6206167318478848

from minekhan.

 avatar commented on July 29, 2024

Which line is the death func on?

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

a few
you can search it up by using "dead"
i may have not fully ported it, so keep that in mind

from minekhan.

 avatar commented on July 29, 2024

ok

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

what i think the problem is at 4528

from minekhan.

 avatar commented on July 29, 2024

Ye. So you have to change to screen = "dead", to changeScene("dead")

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Like This?

	Button.add(width / 2 - 220, 195, width / 3, 50, "Respawn",  r => {
		screen = changeScene("dead");
		p.health = 17;
	    p.x = 8;
	    p.z = 8;
	    play();
	    p.y = superflat ? 6 : (Math.round(noise(8 * generator.smooth, 8 * generator.smooth) * generator.height) + 2 + generator.extra);
	}, "dead");

from minekhan.

 avatar commented on July 29, 2024

no,

Button.add(width / 2 - 220, 195, width / 3, 50, "Respawn",  r => {
		 changeScene("dead");
		p.health = 17;
	    p.x = 8;
	    p.z = 8;
	    play();
	    p.y = superflat ? 6 : (Math.round(noise(8 * generator.smooth, 8 * generator.smooth) * generator.height) + 2 + generator.extra);
	}, "dead");

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

ohhh
but it still freezes

from minekhan.

 avatar commented on July 29, 2024

and in the

if(health <= 0){
		 changeScene("dead");
} 

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

oh

from minekhan.

 avatar commented on July 29, 2024

did that work?

from minekhan.

 avatar commented on July 29, 2024

also the button thing has to be "play" not "dead"

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Edit Oh

from minekhan.

 avatar commented on July 29, 2024

Did that do the trick?

from minekhan.

 avatar commented on July 29, 2024

And also, you should prob use a better texture for hearts. e.g.https://lh3.googleusercontent.com/proxy/LcGTgXBUmArJHN0Meu2IZsf25yS8M_puPGGSvqZ9_RVowTKZr-yW0X3YjiTpM44vNf7T-WB4nmBCBSC5txIt6iRg_0cRTIo5B03Mhy9gwdStWB5_GuQnPvsZJy0r9oPl1KFaRvLAtXXP

from minekhan.

 avatar commented on July 29, 2024

alright. I tested it, and it still crashes.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

yeah

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

And also, you should prob use a better texture for hearts. e.g.https://lh3.googleusercontent.com/proxy/LcGTgXBUmArJHN0Meu2IZsf25yS8M_puPGGSvqZ9_RVowTKZr-yW0X3YjiTpM44vNf7T-WB4nmBCBSC5txIt6iRg_0cRTIo5B03Mhy9gwdStWB5_GuQnPvsZJy0r9oPl1KFaRvLAtXXP

Khan dosent let outside img

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

also, do you know why super breaker doesnt work?

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

also how was this done?
image

Edit: Nvm i see it

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

this is the code they used for the dongon

			if(random() < 0.2/256) {
			    let y = 40;
			    let cobvsmoss = random() < 0.2 ? blockIds.cobblestone : blockIds.mossyCobble;
				for(let xxx = 3;xxx<10;xxx++) {
				    for(let zzz = 3;zzz<10;zzz++) {
					        this.setBlock(xxx, y+3, zzz, cobvsmoss); 
					this.setBlock(xxx, y-3, zzz, cobvsmoss);          
					for(let hhh = y-3;hhh<y+3;hhh++) {
					    this.setBlock(xxx,hhh, 3, cobvsmoss);
					    this.setBlock(xxx,hhh, 9, cobvsmoss);
					    this.setBlock(3, hhh,zzz, cobvsmoss);
					    this.setBlock(9, hhh,zzz, cobvsmoss);
					    
					}
					
				    }
				}
				for(let xxx = 4;xxx<9;xxx++) {
				    for(let zzz = 4;zzz<9;zzz++){
				        for(let yyy = y-2;yyy<y+3;yyy++){
				            this.setBlock(xxx,yyy,zzz, blockIds.air, true)
				        }
				    }
				}
				this.setBlock(6, y-2, 6, blockIds.coalBlock);

from minekhan.

 avatar commented on July 29, 2024

Lets concentrate on the respawning first shall we?

		
		Button.add(width / 2 - 220, 195, width / 3, 50, "Respawn", "dead",  r => {
			changeScene("play");
			p.health = 17;
		    p.x = 8;
		    p.z = 8;
		    play();
		    p.y = superflat ? 6 : (Math.round(noise(8 * generator.smooth, 8 * generator.smooth) * generator.height) + 2 + generator.extra);
		});

		```
and also
let drawScreens = {
	"main menu": () => {},
	"options": () => {},
	"play": () => {},
	"pause": () => {},
	"creation menu": () => {},
	"inventory": () => {},
	"multiplayer menu": () => {},
	"comingsoon menu": () => {},
	"loadsave menu": () => {},
	"dead": () => {}
}

from minekhan.

 avatar commented on July 29, 2024

Ye. Good idea.

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

i wish, but repl.co is blocked

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

i mean we can still talk, but i cant see the preview

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Lets concentrate on the respawning first shall we?

		
		Button.add(width / 2 - 220, 195, width / 3, 50, "Respawn", "dead",  r => {
			changeScene("play");
			p.health = 17;
		    p.x = 8;
		    p.z = 8;
		    play();
		    p.y = superflat ? 6 : (Math.round(noise(8 * generator.smooth, 8 * generator.smooth) * generator.height) + 2 + generator.extra);
		});

		```
and also
let drawScreens = {
	"main menu": () => {},
	"options": () => {},
	"play": () => {},
	"pause": () => {},
	"creation menu": () => {},
	"inventory": () => {},
	"multiplayer menu": () => {},
	"comingsoon menu": () => {},
	"loadsave menu": () => {},
	"dead": () => {}
}

yea sorry
it was just a fast and easy thing

from minekhan.

 avatar commented on July 29, 2024

We can use js fiddle....

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

sure, if they have team edit

from minekhan.

 avatar commented on July 29, 2024

I think so....

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

https://jsfiddle.net/#&togetherjs=2taqLf0rAk
yup

from minekhan.

 avatar commented on July 29, 2024

Good!

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

importing the code now

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

oh the lag, i wish theses schools had better laptops

from minekhan.

 avatar commented on July 29, 2024

Sorry, but I don't think I can join....

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

yea, and the preview dosent work

from minekhan.

 avatar commented on July 29, 2024

We should just prob stick with git

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

yea

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Lets concentrate on the respawning first shall we?

		
		Button.add(width / 2 - 220, 195, width / 3, 50, "Respawn", "dead",  r => {
			changeScene("play");
			p.health = 17;
		    p.x = 8;
		    p.z = 8;
		    play();
		    p.y = superflat ? 6 : (Math.round(noise(8 * generator.smooth, 8 * generator.smooth) * generator.height) + 2 + generator.extra);
		});

		```
and also
let drawScreens = {
	"main menu": () => {},
	"options": () => {},
	"play": () => {},
	"pause": () => {},
	"creation menu": () => {},
	"inventory": () => {},
	"multiplayer menu": () => {},
	"comingsoon menu": () => {},
	"loadsave menu": () => {},
	"dead": () => {}
}

dose this fix the problem?

from minekhan.

 avatar commented on July 29, 2024

Yes

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

it kinda does!
all we have to do is center and release the mouse

from minekhan.

 avatar commented on July 29, 2024

Releasing is easy. just do: releasePointer()

from minekhan.

 avatar commented on July 29, 2024

In the dead func.

from minekhan.

 avatar commented on July 29, 2024

so...
if(health <= 0){
releasePointer()
changeScene("dead");
}

from minekhan.

 avatar commented on July 29, 2024

I have to leave now... bye!

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

image
it dosent release mine tho

anyways cya

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

also, do you know why super breaker doesnt work?

i will turn it off for now

from minekhan.

Hacker1254 avatar Hacker1254 commented on July 29, 2024

Damnit
image

from minekhan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.