0.14.9 update

This commit is contained in:
sainagh
2023-11-04 16:52:08 -07:00
parent 774eebf95c
commit aff46567a7
605 changed files with 78919 additions and 10353 deletions
+56
View File
@@ -260,3 +260,59 @@ biomechecker.itemRightClick = function(stack, world, player, hand) {
return "PASS";
};
biomechecker.register();
var spatialphaser = VanillaFactory.createItem("spatial_phaser");
spatialphaser.maxStackSize = 1;
spatialphaser.itemRightClick = function(stack, world, player, hand) {
if(world.remote) {
return "FAIL";
}
// check if player is in right dimension
if(player.getDimension() != 805) {
player.sendChat("You gotta be in the right dimension, lelyetia will tell you which one");
return "FAIL";
}
// obtain position under player
var playerpos = player.position as crafttweaker.util.Position3f;
// locations to place biomes
val UndergardenBiomeLocations = [[0,0],[1,0],[0,1],[-1,0],[0,-1],[2,0],[-2,0],[0,2],[0,-2],[3,0],[-3,0],[0,3],[0,-3],[4,0],[-4,0],[0,4],[0,-4]] as int[][];
// biome to pattern
val UndergardenBiomeName = "Undergarden" as string;
// get number of matches
val UndergardenMatches = checkBiomesAtPositions(UndergardenBiomeName, playerpos, UndergardenBiomeLocations, world) as int;
player.sendChat("Use the terraformer from extra utilities to change the biome to the correct one, lelyetia will tell you which one.");
player.sendChat("You will have to convert a large area!");
player.sendChat("Stand in the changed biome and use this item!");
player.sendChat(" - - - ");
player.sendChat("Scanning area around you");
if((UndergardenMatches) == 17) {
player.sendChat("Success!");
Commands.call("give @p contenttweaker:phasing_gem", player, world, true, true);
stack.shrink(1);
return "PASS";
}
if((UndergardenMatches) >= 1) {
player.sendChat("Correct, the right biome is the Undergarden!");
val UndergardenMatchesD = UndergardenMatches as double;
player.sendChat("Completion : " ~ UndergardenMatchesD/17*100 ~ "%");
player.sendChat("Convert a bigger area!");
return "FAIL";
}
player.sendChat("The biome is wrong!");
return "FAIL";
};
spatialphaser.register();