This commit is contained in:
parent
14e11bd458
commit
bcdb41d6ac
@ -5,7 +5,10 @@ import java.util.List;
|
|||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@ -31,4 +34,10 @@ public class DamageBlock extends Block {
|
|||||||
super.appendTooltip(stack, context, tooltip, type);
|
super.appendTooltip(stack, context, tooltip, type);
|
||||||
tooltip.add(Text.translatable("toolTip.learning.damage_block"));
|
tooltip.add(Text.translatable("toolTip.learning.damage_block"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||||
|
player.sendMessage(Text.translatable("block.learning.damage_block.on_use"), false);
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"item.learning.overcooked_toast": "Overcooked Toast",
|
"item.learning.overcooked_toast": "Overcooked Toast",
|
||||||
|
|
||||||
"block.learning.damage_block": "Damage Block",
|
"block.learning.damage_block": "Damage Block",
|
||||||
|
"block.learning.damage_block.on_use": "Make 5 damage per hurt.",
|
||||||
"block.learning.transform_block": "Transform Block",
|
"block.learning.transform_block": "Transform Block",
|
||||||
|
|
||||||
"itemGroup.learning.custom_itemgroup": "My Dear...",
|
"itemGroup.learning.custom_itemgroup": "My Dear...",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user