mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 03:26:44 +01:00
Fixed frosted obsidian turning into water when mined
This commit is contained in:
parent
9723bfd104
commit
d84a607046
1 changed files with 14 additions and 0 deletions
|
@ -1,9 +1,16 @@
|
|||
package com.minelittlepony.unicopia.block;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FrostedIceBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.piston.PistonBehavior;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stat.Stats;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -12,6 +19,13 @@ public class FrostedObsidianBlock extends FrostedIceBlock {
|
|||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
||||
player.incrementStat(Stats.MINED.getOrCreateStat(this));
|
||||
player.addExhaustion(0.005f);
|
||||
Block.dropStacks(state, world, pos, blockEntity, player, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void melt(BlockState state, World world, BlockPos pos) {
|
||||
if (world.getDimension().isUltrawarm()) {
|
||||
|
|
Loading…
Reference in a new issue