@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockRedstoneOre.java
|
||||
+++ b/net/minecraft/world/level/block/BlockRedstoneOre.java
|
||||
@@ -22,6 +22,11 @@
|
||||
@@ -21,6 +21,11 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class BlockRedstoneOre extends Block {
|
||||
|
||||
public static final MapCodec<BlockRedstoneOre> CODEC = simpleCodec(BlockRedstoneOre::new);
|
||||
@@ -39,14 +44,27 @@
|
||||
@@ -38,14 +43,27 @@
|
||||
|
||||
@Override
|
||||
protected void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
super.stepOn(world, blockposition, iblockdata, entity);
|
||||
@@ -57,15 +75,20 @@
|
||||
@@ -56,15 +74,20 @@
|
||||
if (world.isClientSide) {
|
||||
spawnParticles(world, blockposition);
|
||||
} else {
|
||||
@@ -65,7 +65,7 @@
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneOre.LIT, true), 3);
|
||||
}
|
||||
|
||||
@@ -79,6 +102,11 @@
|
||||
@@ -78,6 +101,11 @@
|
||||
@Override
|
||||
protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
|
||||
if ((Boolean) iblockdata.getValue(BlockRedstoneOre.LIT)) {
|
||||
@@ -77,7 +77,7 @@
|
||||
worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneOre.LIT, false), 3);
|
||||
}
|
||||
|
||||
@@ -87,12 +115,20 @@
|
||||
@@ -86,10 +114,17 @@
|
||||
@Override
|
||||
protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
|
||||
super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
|
||||
@@ -86,12 +86,9 @@
|
||||
+
|
||||
+ @Override
|
||||
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
|
||||
if (flag && EnchantmentManager.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
||||
int i = 1 + worldserver.random.nextInt(5);
|
||||
|
||||
- this.popExperience(worldserver, blockposition, i);
|
||||
+ // this.popExperience(worldserver, blockposition, i);
|
||||
+ return i;
|
||||
if (flag) {
|
||||
- this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
|
||||
+ return this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
|
||||
}
|
||||
|
||||
+ return 0;
|
||||
|
||||
Reference in New Issue
Block a user