Skip to content

Commit

Permalink
Add invalid altar ritual recipe status message
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Dec 24, 2024
1 parent 85e003c commit 9436e18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/mod/emt/harkenscythe/block/HSBlockAltar.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;

import mod.emt.harkenscythe.init.HSAdvancements;
Expand Down Expand Up @@ -68,6 +69,10 @@ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, En
handleRecipe(world, altar, altarStack, player, altarX, altarY, altarZ);
return true;
}
else
{
player.sendStatusMessage(new TextComponentTranslation("message.harkenscythe.altar.invalid_recipe"), true);
}
}
else if (!heldStack.isEmpty())
{
Expand All @@ -90,9 +95,9 @@ else if (altarStack.getMaxStackSize() > altarStack.getCount() && ItemStack.areIt
ItemStack itemStack = altar.getInputStack();
if (!itemStack.isEmpty())
{
altar.setInputStack(ItemStack.EMPTY);
player.addItemStackToInventory(itemStack);
player.world.playSound(altarX, altarY, altarZ, getSoundEventFail(), SoundCategory.BLOCKS, 1.0F, 1.5F / (altar.getWorld().rand.nextFloat() * 0.4F + 1.2F), false);
altar.setInputStack(ItemStack.EMPTY);
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/harkenscythe/lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ effect.harkenscythe.purifying=Spektrale Reinigung
effect.harkenscythe.water=Spektrales Wasser

# MESSAGES
message.harkenscythe.altar.invalid_recipe=Dies ist kein gültiges Rezept für ein Altarritual!
message.harkenscythe.dimensional_mirror.blacklist=Eine magische Kraft verhindert, dass der Spiegel in dieser Dimension funktioniert!
message.harkenscythe.dimensional_mirror.no_souls=Der Spiegel muss mit Seelen aufgeladen werden, damit er funktioniert!
message.harkenscythe.dimensional_mirror.no_spawn=Es ist kein Spawnpunkt festgelegt, damit der Spiegel funktioniert!
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/harkenscythe/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ effect.harkenscythe.purifying=Spectral Purifying
effect.harkenscythe.water=Spectral Water

# MESSAGES
message.harkenscythe.altar.invalid_recipe=This is not a valid altar ritual recipe!
message.harkenscythe.dimensional_mirror.blacklist=A magical force prevents the mirror from working in this dimension!
message.harkenscythe.dimensional_mirror.no_souls=The mirror needs to be recharged with souls to work!
message.harkenscythe.dimensional_mirror.no_spawn=No spawn point is set for the mirror to work!
Expand Down

0 comments on commit 9436e18

Please sign in to comment.