mirror of
https://github.com/Theta-Dev/ConstructionWand.git
synced 2024-11-26 16:10:55 +01:00
Compare commits
2 commits
2acd74b12c
...
ae1e7a404f
Author | SHA1 | Date | |
---|---|---|---|
ae1e7a404f | |||
83a9b9fdaf |
2 changed files with 3 additions and 3 deletions
|
@ -15,4 +15,4 @@ botania=1.18.2-430-SNAPSHOT
|
||||||
jei_version=jei-1.18.2:9.5.0.132
|
jei_version=jei-1.18.2:9.5.0.132
|
||||||
|
|
||||||
version_major=2
|
version_major=2
|
||||||
version_minor=7
|
version_minor=9
|
|
@ -1,8 +1,8 @@
|
||||||
package thetadev.constructionwand.wand;
|
package thetadev.constructionwand.wand;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
|
||||||
import net.minecraft.sounds.SoundSource;
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
|
@ -99,7 +99,7 @@ public class WandJob
|
||||||
// If the item cant be taken, undo the placement
|
// If the item cant be taken, undo the placement
|
||||||
if(wandSupplier.takeItemStack(snapshot.getRequiredItems()) == 0) {
|
if(wandSupplier.takeItemStack(snapshot.getRequiredItems()) == 0) {
|
||||||
executed.add(snapshot);
|
executed.add(snapshot);
|
||||||
wand.hurt(1, player.getRandom(), (ServerPlayer) player);
|
wand.hurtAndBreak(1, player, e -> e.broadcastBreakEvent(InteractionHand.MAIN_HAND));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ConstructionWand.LOGGER.info("Item could not be taken. Remove block: " +
|
ConstructionWand.LOGGER.info("Item could not be taken. Remove block: " +
|
||||||
|
|
Loading…
Reference in a new issue