block detection fix

This commit is contained in:
ZHAY10086
2024-10-23 12:11:29 +08:00
parent 7ba8411a5e
commit 2fa922b190
+16 -16
View File
@@ -2890,7 +2890,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos1.z = pos1.z + 1;
var blockPos1 = pos1.asBlockPos();
var blockState1 = world.getBlock(blockPos1).definition.displayName as string;
if(blockState1 != "Magenta Tallow Candle") {
if(blockState1 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2900,7 +2900,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos2.z = pos2.z - 1;
var blockPos2 = pos2.asBlockPos();
var blockState2 = world.getBlock(blockPos2).definition.displayName as string;
if(blockState2 != "Magenta Tallow Candle") {
if(blockState2 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2910,7 +2910,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos3.z = pos3.z - 1;
var blockPos3 = pos3.asBlockPos();
var blockState3 = world.getBlock(blockPos3).definition.displayName as string;
if(blockState3 != "Magenta Tallow Candle") {
if(blockState3 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2920,7 +2920,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos4.z = pos4.z + 1;
var blockPos4 = pos4.asBlockPos();
var blockState4 = world.getBlock(blockPos4).definition.displayName as string;
if(blockState4 != "Magenta Tallow Candle") {
if(blockState4 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2930,7 +2930,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos5.z = pos5.z + 3;
var blockPos5 = pos5.asBlockPos();
var blockState5 = world.getBlock(blockPos5).definition.displayName as string;
if(blockState5 != "Magenta Tallow Candle") {
if(blockState5 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2940,7 +2940,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos6.z = pos6.z + 3;
var blockPos6 = pos6.asBlockPos();
var blockState6 = world.getBlock(blockPos6).definition.displayName as string;
if(blockState6 != "Magenta Tallow Candle") {
if(blockState6 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2950,7 +2950,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos7.z = pos7.z - 3;
var blockPos7 = pos7.asBlockPos();
var blockState7 = world.getBlock(blockPos7).definition.displayName as string;
if(blockState7 != "Magenta Tallow Candle") {
if(blockState7 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2960,7 +2960,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
pos8.z = pos8.z - 3;
var blockPos8 = pos8.asBlockPos();
var blockState8 = world.getBlock(blockPos8).definition.displayName as string;
if(blockState8 != "Magenta Tallow Candle") {
if(blockState8 != "tile.candle_magenta.name") {
player.sendChat("A Magenta Candle is incorrect or missing");
return "FAIL";
}
@@ -2969,7 +2969,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posW.z = posW.z - 3;
var blockPosW = posW.asBlockPos();
var blockStateW = world.getBlock(blockPosW).definition.displayName as string;
if(blockStateW != "Orange Tallow Candle") {
if(blockStateW != "tile.candle_orange.name") {
player.sendChat("An Orange Candle is incorrect or missing");
return "FAIL";
}
@@ -2978,7 +2978,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posX.z = posX.z + 3;
var blockPosX = posX.asBlockPos();
var blockStateX = world.getBlock(blockPosX).definition.displayName as string;
if(blockStateX != "Orange Tallow Candle") {
if(blockStateX != "tile.candle_orange.name") {
player.sendChat("An Orange Candle is incorrect or missing");
return "FAIL";
}
@@ -2987,7 +2987,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posY.x = posY.x + 3;
var blockPosY = posY.asBlockPos();
var blockStateY = world.getBlock(blockPosY).definition.displayName as string;
if(blockStateY != "Orange Tallow Candle") {
if(blockStateY != "tile.candle_orange.name") {
player.sendChat("An Orange Candle is incorrect or missing");
return "FAIL";
}
@@ -2996,7 +2996,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posZ.x = posZ.x - 3;
var blockPosZ = posZ.asBlockPos();
var blockStateZ = world.getBlock(blockPosZ).definition.displayName as string;
if(blockStateZ != "Orange Tallow Candle") {
if(blockStateZ != "tile.candle_orange.name") {
player.sendChat("An Orange Candle is incorrect or missing");
return "FAIL";
}
@@ -3006,7 +3006,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posL.z = posL.z - 2;
var blockPosL = posL.asBlockPos();
var blockStateL = world.getBlock(blockPosL).definition.displayName as string;
if(blockStateL != "Blue Tallow Candle") {
if(blockStateL != "tile.candle_blue.name") {
player.sendChat("A Blue Candle 1 is incorrect or missing");
return "FAIL";
}
@@ -3016,7 +3016,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posM.z = posM.z - 2;
var blockPosM = posM.asBlockPos();
var blockStateM = world.getBlock(blockPosM).definition.displayName as string;
if(blockStateM != "Blue Tallow Candle") {
if(blockStateM != "tile.candle_blue.name") {
player.sendChat("A Blue Candle 2 is incorrect or missing");
return "FAIL";
}
@@ -3026,7 +3026,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posN.z = posN.z + 2;
var blockPosN = posN.asBlockPos();
var blockStateN = world.getBlock(blockPosN).definition.displayName as string;
if(blockStateN != "Blue Tallow Candle") {
if(blockStateN != "tile.candle_blue.name") {
player.sendChat("A Blue Candle 3 is incorrect or missing");
return "FAIL";
}
@@ -3036,7 +3036,7 @@ oblivioncandle.itemRightClick = function(stack, world, player, hand) {
posO.z = posO.z + 2;
var blockPosO = posO.asBlockPos();
var blockStateO = world.getBlock(blockPosO).definition.displayName as string;
if(blockStateO != "Blue Tallow Candle") {
if(blockStateO != "tile.candle_blue.name") {
player.sendChat("A Blue Candle 4 is incorrect or missing");
return "FAIL";
}