This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
So I've been working on an "in-world changer" thingy script in which the world changes around u as you walk through it
here's the code so you'd get an idea of what it is ...
function newLevel(){
var range = 8; var pX = Player.getX(); var pY = (Player.getY()-2);//-2 so it's under my feet for testing var pZ = Player.getZ();
for(i=(-range);i<(range+1);i++){
if(Level.getTile(pX+i,pY,pZ-range)==2){ Level.setTile(pX+i,pY,pZ-range,243,0); }
//switches to the next z line and resets x if(i==range){ pZ++; i=(-range); }
//cuts the loop if(pZ==range){ i=(range+1) }
} }
it worked perfectly changing grass into podzol when i only had x changing.
but after introducing z wolrds dont open/generate and stay stuck on the "building terrain" loading sign ...
for now im hooking it with a newLevel(); so in theory it should work on a modTick(); so grass changes to podzol as i walk around the world.
and as for the range it could be whatever number u want i put 8 for testing so the for loop goes all the way from -8 to 8 which is 16 units (a chunk)
i'd really appreciate any sort of help with this and maybe explain why it is stuck at that loading sign
Thanks in advance
So I've been working on an "in-world changer" thingy script in which the world changes around u as you walk through it
here's the code so you'd get an idea of what it is ...
function newLevel(){
var range = 8;
var pX = Player.getX();
var pY = (Player.getY()-2);//-2 so it's under my feet for testing
var pZ = Player.getZ();
for(i=(-range);i<(range+1);i++){
if(Level.getTile(pX+i,pY,pZ-range)==2){
Level.setTile(pX+i,pY,pZ-range,243,0); }
//switches to the next z line and resets x
if(i==range){ pZ++; i=(-range); }
//cuts the loop
if(pZ==range){ i=(range+1) }
}
}
it worked perfectly changing grass into podzol when i only had x changing.
but after introducing z wolrds dont open/generate and stay stuck on the "building terrain" loading sign ...
for now im hooking it with a newLevel(); so in theory it should work on a modTick(); so grass changes to podzol as i walk around the world.
and as for the range it could be whatever number u want i put 8 for testing so the for loop goes all the way from -8 to 8 which is 16 units (a chunk)
i'd really appreciate any sort of help with this and maybe explain why it is stuck at that loading sign
Thanks in advance