Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kirjorjos committed Jan 1, 2025
1 parent 39050bc commit 390704c
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 24 deletions.
34 changes: 34 additions & 0 deletions buildAndRunClient.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
gnome-terminal -- bash -c "
while true; do
# Run the build command and capture output
output=\$(./gradlew build 2>&1)
echo \"\$output\"
# Check if the build was successful
if [[ \$? -eq 0 ]]; then
./gradlew runClient
read -p 'Press Enter to close...'
break
fi
# Check for Spotless error
if echo \"\$output\" | grep -q 'spotlessJavaCheck FAILED'; then
echo 'Spotless check failed. Press a to apply spotless fixes and retry, or q to quit.'
read -n 1 -s -r key
if [[ \"\$key\" == \"a\" ]]; then
./gradlew spotlessApply
echo 'Spotless fixes applied. Retrying build...'
elif [[ \"\$key\" == \"q\" ]]; then
echo 'Exiting.'
exit 1
else
echo 'Invalid option. Exiting.'
exit 1
fi
else
echo 'Build failed for other reasons. Press Enter to exit.'
read -p 'Press Enter to close...'
exit 1
fi
done
"
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected void update(Level level, BlockPos pos, BlockState blockState, BlockEnt
ItemStack oldItem = blockEntity.getInventory().getItem(0);
blockEntity.getInventory().setItem(0, ItemStack.EMPTY);
for (RecipeSqueezer.IngredientChance itemStackChance : recipe.assemble(oldItem)) {
if (itemStackChance.getChance() == 1.0F || itemStackChance.getChance() >= level.random.nextFloat()) {
if (itemStackChance.getChance() == 1.0F || itemStackChance.getChance() >= level.random.nextFloat()) {
ItemStack resultStack = itemStackChance.getIngredientFirst().copy();
for (Direction side : Direction.values()) {
if (!resultStack.isEmpty() && side != Direction.UP) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"type": "integrateddynamics:mechanical_squeezer",
"item": "integrateddynamics:facade",
"item": {
"item": "integrateddynamics:facade"
},
"result": {
"items": [
{
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
},
{
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
}
]
"items": [
{
"item": {
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
}
},
{
"item": {
"item": "integrateddynamics:facade",
"chance": 1,
"count": 5
}
}
]
},
"duration": 20
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"type": "integrateddynamics:squeezer",
"item": "integrateddynamics:facade",
"type": "integrateddynamics:mechanical_squeezer",
"item": {
"item": "integrateddynamics:facade"
},
"result": {
"items": [
{
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
"item": {
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
}
},
{
"item": "integrateddynamics:facade",
"chance": 1,
"count": 1
}
]
"item": {
"item": "integrateddynamics:facade",
"chance": 1,
"count": 5
}
}
]
}
}

0 comments on commit 390704c

Please sign in to comment.