diff --git a/elements/GolfClubRangedBulletHitsBlock.mod.json b/elements/GolfClubRangedBulletHitsBlock.mod.json
index 5e726b6..d18d43c 100644
--- a/elements/GolfClubRangedBulletHitsBlock.mod.json
+++ b/elements/GolfClubRangedBulletHitsBlock.mod.json
@@ -2,6 +2,6 @@
"_fv": 10,
"_type": "procedure",
"definition": {
- "procedurexml": "no_ext_triggerglobal:XSets number variable for the X coordinates.-1global:isHolesets a variable to false before the system starts the test.FALSE2global:YSets number variable for the Y coordinates.-12global:ZSets number variable for the Z coordinates.-12Checks for a block at the current variable location.ADDglobal:XADDglobal:YADDglobal:ZCUSTOM:GolfHoleglobal:isHoleIf the block is found, the variable that was set to false will be set to true.TRUEglobal:ZIf no block is found, it will increase the variable Z coordinate by 1.ADDglobal:Z1global:YIf no block is found, it will increase the variable Y coordinate by 1.ADDglobal:Y1global:XIf no block is found, it will increase the variable X coordinate by 1.ADDglobal:X1EQTests if the variable is true.global:isHoleTRUEglobal:movementFALSE/title @s actionbar {\"text\":\"Congratulations!\", \"bold\":true, \"color\":\"red\"}Blocks.WATER/title @s actionbar {\"text\":\"Try again\", \"bold\":true, \"color\":\"blue\"}MINUS1Blocks.SAND#0CUSTOM:GolfBallBlock1CUSTOM:GolfClubSandADD1blockXblockYblockZglobal:movementTRUECUSTOM:GolfBallBlockADD1blockXblockYblockZglobal:movementTRUE"
+ "procedurexml": "no_ext_triggerglobal:XSets number variable for the X coordinates.-1global:isHolesets a variable to false before the system starts the test.FALSE2global:YSets number variable for the Y coordinates.-12global:ZSets number variable for the Z coordinates.-12Checks for a block at the current variable location.ADDglobal:XADDglobal:YADDglobal:ZCUSTOM:GolfHoleglobal:isHoleIf the block is found, the variable that was set to false will be set to true.TRUEglobal:ZIf no block is found, it will increase the variable Z coordinate by 1.ADDglobal:Z1global:YIf no block is found, it will increase the variable Y coordinate by 1.ADDglobal:Y1global:XIf no block is found, it will increase the variable X coordinate by 1.ADDglobal:X1EQTests if the variable is true.global:isHoleTRUEglobal:movementFALSEtitle @s actionbar {\"text\":\"Congratulations!\", \"bold\":true, \"color\":\"red\"}Blocks.FLOWING_WATERtitle @s actionbar {\"text\":\"Try again\", \"bold\":true, \"color\":\"blue\"}MINUS1Blocks.SAND#0CUSTOM:GolfBallBlock1CUSTOM:GolfClubSandADD1blockXblockYblockZglobal:movementTRUEBlocks.FLOWING_LAVAtitle @s actionbar {\"text\":\"You got burned\", \"bold\":true, \"color\":\"orange\"}scoreboard players add @s Score 1CUSTOM:GolfBallBlockADD1blockXblockYblockZglobal:movementTRUE"
}
}
\ No newline at end of file
diff --git a/src/main/java/net/mcreator/golfit/procedures/GolfClubRangedBulletHitsBlockProcedure.java b/src/main/java/net/mcreator/golfit/procedures/GolfClubRangedBulletHitsBlockProcedure.java
index 95683c3..ec10636 100644
--- a/src/main/java/net/mcreator/golfit/procedures/GolfClubRangedBulletHitsBlockProcedure.java
+++ b/src/main/java/net/mcreator/golfit/procedures/GolfClubRangedBulletHitsBlockProcedure.java
@@ -82,7 +82,7 @@ public static void executeProcedure(Map dependencies) {
Entity _ent = entity;
if (!_ent.world.isRemote && _ent.world.getServer() != null) {
_ent.world.getServer().getCommandManager().handleCommand(_ent.getCommandSource().withFeedbackDisabled().withPermissionLevel(4),
- "/title @s actionbar {\"text\":\"Congratulations!\", \"bold\":true, \"color\":\"red\"}");
+ "title @s actionbar {\"text\":\"Congratulations!\", \"bold\":true, \"color\":\"red\"}");
}
}
} else {
@@ -92,7 +92,7 @@ public static void executeProcedure(Map dependencies) {
if (!_ent.world.isRemote && _ent.world.getServer() != null) {
_ent.world.getServer().getCommandManager().handleCommand(
_ent.getCommandSource().withFeedbackDisabled().withPermissionLevel(4),
- "/title @s actionbar {\"text\":\"Try again\", \"bold\":true, \"color\":\"blue\"}");
+ "title @s actionbar {\"text\":\"Try again\", \"bold\":true, \"color\":\"blue\"}");
}
}
} else {
@@ -118,19 +118,37 @@ public static void executeProcedure(Map dependencies) {
entity.getPersistentData().putDouble("blockZ", z);
GolfItModVariables.movement = (boolean) (true);
} else {
- world.setBlockState(new BlockPos((int) x, (int) y, (int) z), GolfBallBlockBlock.block.getDefaultState(), 3);
- {
- Entity _ent = entity;
- _ent.setPositionAndUpdate(x, (y + 1), z);
- if (_ent instanceof ServerPlayerEntity) {
- ((ServerPlayerEntity) _ent).connection.setPlayerLocation(x, (y + 1), z, _ent.rotationYaw, _ent.rotationPitch,
- Collections.emptySet());
+ if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.LAVA.getDefaultState().getBlock())) {
+ {
+ Entity _ent = entity;
+ if (!_ent.world.isRemote && _ent.world.getServer() != null) {
+ _ent.world.getServer().getCommandManager().handleCommand(
+ _ent.getCommandSource().withFeedbackDisabled().withPermissionLevel(4),
+ "title @s actionbar {\"text\":\"You got burned\", \"bold\":true, \"color\":\"orange\"}");
+ }
}
+ {
+ Entity _ent = entity;
+ if (!_ent.world.isRemote && _ent.world.getServer() != null) {
+ _ent.world.getServer().getCommandManager().handleCommand(
+ _ent.getCommandSource().withFeedbackDisabled().withPermissionLevel(4), "scoreboard players add @s Score 1");
+ }
+ }
+ } else {
+ world.setBlockState(new BlockPos((int) x, (int) y, (int) z), GolfBallBlockBlock.block.getDefaultState(), 3);
+ {
+ Entity _ent = entity;
+ _ent.setPositionAndUpdate(x, (y + 1), z);
+ if (_ent instanceof ServerPlayerEntity) {
+ ((ServerPlayerEntity) _ent).connection.setPlayerLocation(x, (y + 1), z, _ent.rotationYaw, _ent.rotationPitch,
+ Collections.emptySet());
+ }
+ }
+ entity.getPersistentData().putDouble("blockX", x);
+ entity.getPersistentData().putDouble("blockY", y);
+ entity.getPersistentData().putDouble("blockZ", z);
+ GolfItModVariables.movement = (boolean) (true);
}
- entity.getPersistentData().putDouble("blockX", x);
- entity.getPersistentData().putDouble("blockY", y);
- entity.getPersistentData().putDouble("blockZ", z);
- GolfItModVariables.movement = (boolean) (true);
}
}
}