first 1.21.5 version
This commit is contained in:
@ -17,6 +17,8 @@ import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -45,4 +47,9 @@ public class BlockDirtSalpeter extends FallingBlock {
|
||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(BlockState state, BlockView world, BlockPos pos) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@ -122,4 +123,9 @@ public class BlockDrill extends FallingBlock implements BlockEntityProvider {
|
||||
}
|
||||
return ActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(BlockState state, BlockView world, BlockPos pos) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.explosion.Explosion;
|
||||
|
||||
/**
|
||||
@ -44,4 +46,10 @@ public class BlockPowder extends FallingBlock {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(BlockState state, BlockView world, BlockPos pos) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,9 @@ import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -40,4 +42,10 @@ public class BlockSandSalpeter extends FallingBlock {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(BlockState state, BlockView world, BlockPos pos) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.ItemScatterer;
|
||||
@ -93,15 +94,15 @@ public class BlockStacker extends BlockWithEntity implements BlockEntityProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||
if (state.getBlock() != newState.getBlock()) {
|
||||
protected void onStateReplaced(BlockState state, ServerWorld world, BlockPos pos, boolean moved) {
|
||||
if (state.getBlock() != world.getBlockState(pos).getBlock()) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof BlockStackerEntity) {
|
||||
ItemScatterer.spawn(world, pos, (BlockStackerEntity) blockEntity);
|
||||
// update comparators
|
||||
world.updateComparators(pos, this);
|
||||
}
|
||||
super.onStateReplaced(state, world, pos, newState, moved);
|
||||
super.onStateReplaced(state, world, pos, moved);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
@ -21,13 +20,13 @@ import net.minecraft.util.Identifier;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolQuickiepowderPickaxe extends PickaxeItem implements ToolRangeable {
|
||||
public class ToolQuickiepowderPickaxe extends Item implements ToolRangeable {
|
||||
|
||||
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 6, 6, 6 };
|
||||
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2400, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||
|
||||
public ToolQuickiepowderPickaxe(Identifier identifier) {
|
||||
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||
super(new Item.Settings().pickaxe(MATERIAL, 7F, -3.1F).useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,7 +8,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
@ -21,13 +20,13 @@ import net.minecraft.util.Identifier;
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable {
|
||||
public class ToolSpeedpowderPickaxe extends Item implements ToolRangeable {
|
||||
|
||||
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 3, 3, 3 };
|
||||
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 800, 7.0F, 1.0F, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||
|
||||
public ToolSpeedpowderPickaxe(Identifier identifier) {
|
||||
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||
super(new Item.Settings().pickaxe(MATERIAL, 7F, -3.1F).useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,8 +28,8 @@
|
||||
"mixins": [
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": "~1.21.4",
|
||||
"fabricloader": ">=0.16.10",
|
||||
"minecraft": "~1.21.5",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
|
Reference in New Issue
Block a user