mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-16 19:05:10 +01:00
ThisRocks 1.8.0 - Update to 1.21
- Fixed #15 - Allow blocks to replace rocks and sticks (closes #43) - Added unifiedPublishing for a better workflow
This commit is contained in:
@@ -1,14 +1,26 @@
|
||||
package eu.midnightdust.motschen.rocks;
|
||||
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.minecraft.client.item.ModelPredicateProviderRegistry;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static eu.midnightdust.motschen.rocks.RocksMain.STARFISH_VARIATION;
|
||||
|
||||
public class RocksClient implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0);
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), Identifier.of("red"), (stack, world, entity, seed) -> matchesVariation(stack, StarfishVariation.RED));
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), Identifier.of("pink"), (stack, world, entity, seed) -> matchesVariation(stack, StarfishVariation.PINK));
|
||||
ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), Identifier.of("orange"), (stack, world, entity, seed) -> matchesVariation(stack, StarfishVariation.ORANGE));
|
||||
}
|
||||
private static Integer matchesVariation(ItemStack stack, StarfishVariation variation) {
|
||||
var blockStateData = stack.getComponents().get(DataComponentTypes.BLOCK_STATE);
|
||||
if (blockStateData == null || blockStateData.isEmpty() || blockStateData.getValue(STARFISH_VARIATION) == null) return 0;
|
||||
return Objects.equals(blockStateData.getValue(STARFISH_VARIATION), variation) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package eu.midnightdust.motschen.rocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import eu.midnightdust.motschen.rocks.block.*;
|
||||
import eu.midnightdust.motschen.rocks.block.blockentity.BlockEntityInit;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.RockVariation;
|
||||
@@ -11,14 +10,18 @@ import eu.midnightdust.motschen.rocks.config.RocksConfig;
|
||||
import eu.midnightdust.motschen.rocks.world.*;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.registerBlockWithItem;
|
||||
@@ -71,58 +74,58 @@ public class RocksMain implements ModInitializer {
|
||||
public static Item NetherrackSplitter = new Item(new Item.Settings());
|
||||
public static Item SoulSoilSplitter = new Item(new Item.Settings());
|
||||
public static List<ItemStack> groupItems = new ArrayList<>();
|
||||
public static ItemStack cherryStack;
|
||||
public static ItemGroup RocksGroup;
|
||||
public static final RegistryKey<ItemGroup> ROCKS_GROUP = RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of(MOD_ID, "rocks"));
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
RocksConfig.init("rocks", RocksConfig.class);
|
||||
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"rock"), Rock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"granite_rock"), GraniteRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"diorite_rock"), DioriteRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"andesite_rock"), AndesiteRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"sand_rock"), SandRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"red_sand_rock"), RedSandRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"gravel_rock"), GravelRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"end_stone_rock"), EndstoneRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"netherrack_rock"), NetherrackRock);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"soul_soil_rock"), SoulSoilRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"rock"), Rock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"granite_rock"), GraniteRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"diorite_rock"), DioriteRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"andesite_rock"), AndesiteRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"sand_rock"), SandRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"red_sand_rock"), RedSandRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"gravel_rock"), GravelRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"end_stone_rock"), EndstoneRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"netherrack_rock"), NetherrackRock);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"soul_soil_rock"), SoulSoilRock);
|
||||
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"oak_stick"), OakStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"spruce_stick"), SpruceStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"birch_stick"), BirchStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"acacia_stick"), AcaciaStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"jungle_stick"), JungleStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"dark_oak_stick"), DarkOakStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"mangrove_stick"), MangroveStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"cherry_stick"), CherryStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"bamboo_stick"), BambooStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"crimson_stick"), CrimsonStick);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"warped_stick"), WarpedStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"oak_stick"), OakStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"spruce_stick"), SpruceStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"birch_stick"), BirchStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"acacia_stick"), AcaciaStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"jungle_stick"), JungleStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"dark_oak_stick"), DarkOakStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"mangrove_stick"), MangroveStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"cherry_stick"), CherryStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"bamboo_stick"), BambooStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"crimson_stick"), CrimsonStick);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"warped_stick"), WarpedStick);
|
||||
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"geyser"), Geyser);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"nether_geyser"), NetherGeyser);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"geyser"), Geyser);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"nether_geyser"), NetherGeyser);
|
||||
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"pinecone"), Pinecone);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"seashell"), Seashell);
|
||||
registerBlockWithItem(new Identifier(MOD_ID,"starfish"), Starfish);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"pinecone"), Pinecone);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"seashell"), Seashell);
|
||||
registerBlockWithItem(Identifier.of(MOD_ID,"starfish"), Starfish);
|
||||
|
||||
registerItem(new Identifier(MOD_ID,"cobblestone_splitter"), CobblestoneSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"granite_splitter"), GraniteSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"diorite_splitter"), DioriteSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"andesite_splitter"), AndesiteSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"sandstone_splitter"), SandStoneSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"red_sandstone_splitter"), RedSandStoneSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"end_stone_splitter"), EndStoneSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
|
||||
registerItem(new Identifier(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"cobblestone_splitter"), CobblestoneSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"granite_splitter"), GraniteSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"diorite_splitter"), DioriteSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"andesite_splitter"), AndesiteSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"sandstone_splitter"), SandStoneSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"red_sandstone_splitter"), RedSandStoneSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"end_stone_splitter"), EndStoneSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
|
||||
registerItem(Identifier.of(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
|
||||
|
||||
RocksGroup = FabricItemGroup.builder(new Identifier(MOD_ID, "rocks")).icon(() -> new ItemStack(RocksMain.Rock)).entries(((displayContext, entries) -> {
|
||||
RocksGroup = FabricItemGroup.builder().displayName(Text.translatable("itemGroup.rocks.rocks")).icon(() -> new ItemStack(RocksMain.Rock)).entries(((displayContext, entries) -> {
|
||||
List<ItemStack> visibleGroupItems = new ArrayList<>(groupItems);
|
||||
if (!displayContext.enabledFeatures().contains(FeatureFlags.UPDATE_1_20)) visibleGroupItems.remove(cherryStack);
|
||||
entries.addAll(visibleGroupItems);
|
||||
})).build();
|
||||
Registry.register(Registries.ITEM_GROUP, ROCKS_GROUP, RocksGroup);
|
||||
new FeatureRegistry<>();
|
||||
FeatureInjector.init();
|
||||
BlockEntityInit.init();
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package eu.midnightdust.motschen.rocks;
|
||||
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.component.ComponentMap;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.BlockStateComponent;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -9,6 +13,8 @@ import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
|
||||
import static eu.midnightdust.motschen.rocks.RocksMain.STARFISH_VARIATION;
|
||||
|
||||
public class RocksRegistryUtils {
|
||||
public static void registerBlockWithItem(Identifier id, Block block) {
|
||||
Registry.register(Registries.BLOCK, id, block);
|
||||
@@ -16,28 +22,27 @@ public class RocksRegistryUtils {
|
||||
}
|
||||
public static void registerItem(Identifier id, Item item) {
|
||||
Registry.register(Registries.ITEM, id, item);
|
||||
if (id.equals(new Identifier(RocksMain.MOD_ID, "starfish"))) putStarfishItems(item);
|
||||
if (id.equals(Identifier.of(RocksMain.MOD_ID, "starfish"))) putStarfishItems(item);
|
||||
else {
|
||||
ItemStack itemStack = new ItemStack(item);
|
||||
RocksMain.groupItems.add(itemStack);
|
||||
if (id.equals(new Identifier(RocksMain.MOD_ID, "cherry_stick"))) RocksMain.cherryStack = itemStack;
|
||||
}
|
||||
}
|
||||
private static void putStarfishItems(Item starfish) {
|
||||
ItemStack redStarfish = new ItemStack(starfish);
|
||||
redStarfish.getOrCreateNbt().putString("variation", "red");
|
||||
redStarfish.applyComponentsFrom(ComponentMap.builder().add(DataComponentTypes.BLOCK_STATE, BlockStateComponent.DEFAULT.with(STARFISH_VARIATION, StarfishVariation.RED)).build());
|
||||
RocksMain.groupItems.add(redStarfish);
|
||||
ItemStack orangeStarfish = new ItemStack(starfish);
|
||||
orangeStarfish.getOrCreateNbt().putString("variation", "orange");
|
||||
orangeStarfish.applyComponentsFrom(ComponentMap.builder().add(DataComponentTypes.BLOCK_STATE, BlockStateComponent.DEFAULT.with(STARFISH_VARIATION, StarfishVariation.ORANGE)).build());
|
||||
RocksMain.groupItems.add(orangeStarfish);
|
||||
ItemStack pinkStarfish = new ItemStack(starfish);
|
||||
pinkStarfish.getOrCreateNbt().putString("variation", "pink");
|
||||
pinkStarfish.applyComponentsFrom(ComponentMap.builder().add(DataComponentTypes.BLOCK_STATE, BlockStateComponent.DEFAULT.with(STARFISH_VARIATION, StarfishVariation.PINK)).build());
|
||||
RocksMain.groupItems.add(pinkStarfish);
|
||||
}
|
||||
public static void register(Registerable<ConfiguredFeature<?, ?>> context, String name, ConfiguredFeature<?, ?> feature) {
|
||||
context.register(RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(RocksMain.MOD_ID, name)), feature);
|
||||
context.register(RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(RocksMain.MOD_ID, name)), feature);
|
||||
}
|
||||
public static void register(Registerable<PlacedFeature> context, String name, PlacedFeature feature) {
|
||||
context.register(RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(RocksMain.MOD_ID, name)), feature);
|
||||
context.register(RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(RocksMain.MOD_ID, name)), feature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.midnightdust.motschen.rocks.block;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import eu.midnightdust.motschen.rocks.block.blockentity.BlockEntityInit;
|
||||
import eu.midnightdust.motschen.rocks.block.blockentity.NetherGeyserBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
@@ -27,9 +28,15 @@ public class NetherGeyser extends BlockWithEntity implements BlockEntityProvider
|
||||
public static final BooleanProperty ACTIVE = BooleanProperty.of("active");
|
||||
|
||||
public NetherGeyser() {
|
||||
super(FabricBlockSettings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(ACTIVE, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.MODEL;
|
||||
@@ -40,7 +47,7 @@ public class NetherGeyser extends BlockWithEntity implements BlockEntityProvider
|
||||
}
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
|
||||
return checkType(type, BlockEntityInit.NETHER_GEYSER_BE, NetherGeyserBlockEntity::tick);
|
||||
return validateTicker(type, BlockEntityInit.NETHER_GEYSER_BE, NetherGeyserBlockEntity::tick);
|
||||
}
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.midnightdust.motschen.rocks.block;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import eu.midnightdust.motschen.rocks.block.blockentity.BlockEntityInit;
|
||||
import eu.midnightdust.motschen.rocks.block.blockentity.OverworldGeyserBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
@@ -31,9 +32,15 @@ public class OverworldGeyser extends BlockWithEntity implements BlockEntityProvi
|
||||
public static final BooleanProperty SNOWY = Properties.SNOWY;
|
||||
|
||||
public OverworldGeyser() {
|
||||
super(FabricBlockSettings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
super(AbstractBlock.Settings.copy(Blocks.STONE).strength(10).noCollision().nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(ACTIVE, false).with(SNOWY, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.MODEL;
|
||||
@@ -44,7 +51,7 @@ public class OverworldGeyser extends BlockWithEntity implements BlockEntityProvi
|
||||
}
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) {
|
||||
return checkType(type, BlockEntityInit.OVERWORLD_GEYSER_BE, OverworldGeyserBlockEntity::tick);
|
||||
return validateTicker(type, BlockEntityInit.OVERWORLD_GEYSER_BE, OverworldGeyserBlockEntity::tick);
|
||||
}
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package eu.midnightdust.motschen.rocks.block;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
@@ -15,7 +16,7 @@ public class Pinecone extends Block {
|
||||
private static final VoxelShape SHAPE;
|
||||
|
||||
public Pinecone() {
|
||||
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState());
|
||||
}
|
||||
|
||||
@@ -33,4 +34,6 @@ public class Pinecone extends Block {
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
|
||||
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
|
||||
}
|
||||
protected boolean isTransparent(BlockState state, BlockView world, BlockPos pos) {return true;}
|
||||
protected boolean canReplace(BlockState state, ItemPlacementContext context) {return true;}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package eu.midnightdust.motschen.rocks.block;
|
||||
|
||||
import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.RockVariation;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
@@ -25,10 +24,11 @@ import java.util.Objects;
|
||||
public class Rock extends Block {
|
||||
|
||||
private static final VoxelShape SHAPE;
|
||||
private static final VoxelShape SHAPE_LARGE;
|
||||
private static final EnumProperty<RockVariation> ROCK_VARIATION = RocksMain.ROCK_VARIATION;
|
||||
|
||||
public Rock() {
|
||||
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(ROCK_VARIATION, RockVariation.TINY));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ public class Rock extends Block {
|
||||
return Objects.requireNonNull(super.getPlacementState(itemPlacementContext))
|
||||
.with(ROCK_VARIATION, RockVariation.TINY);
|
||||
}
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (player.isCreative()) {
|
||||
if (state.get(ROCK_VARIATION) == RockVariation.TINY) {
|
||||
world.setBlockState(pos, state.with(ROCK_VARIATION, RockVariation.SMALL));
|
||||
@@ -62,10 +63,11 @@ public class Rock extends Block {
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
|
||||
return SHAPE;
|
||||
return state.get(ROCK_VARIATION).equals(RockVariation.LARGE) ? SHAPE_LARGE : SHAPE;
|
||||
}
|
||||
static {
|
||||
SHAPE = createCuboidShape(0, 0, 0, 16, 3, 16);
|
||||
SHAPE = createCuboidShape(0, 0, 0, 16, 2, 16);
|
||||
SHAPE_LARGE = createCuboidShape(0, 0, 0, 16, 3, 16);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
@@ -74,4 +76,6 @@ public class Rock extends Block {
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
|
||||
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
|
||||
}
|
||||
protected boolean isTransparent(BlockState state, BlockView world, BlockPos pos) {return true;}
|
||||
protected boolean canReplace(BlockState state, ItemPlacementContext context) {return true;}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Seashell extends Block implements Waterloggable {
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public Seashell() {
|
||||
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(SEASHELL_VARIATION, SeashellVariation.PINK).with(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
@@ -49,7 +49,8 @@ public class Seashell extends Block implements Waterloggable {
|
||||
.with(SEASHELL_VARIATION, SeashellVariation.PINK).with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER);
|
||||
}
|
||||
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (player.isCreative()) {
|
||||
if (state.get(SEASHELL_VARIATION) == SeashellVariation.YELLOW) {
|
||||
world.setBlockState(pos, state.with(SEASHELL_VARIATION, SeashellVariation.WHITE));
|
||||
@@ -83,4 +84,5 @@ public class Seashell extends Block implements Waterloggable {
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
|
||||
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
|
||||
}
|
||||
protected boolean canReplace(BlockState state, ItemPlacementContext context) {return true;}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import eu.midnightdust.motschen.rocks.RocksMain;
|
||||
import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.component.ComponentMap;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.BlockStateComponent;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
@@ -27,6 +30,8 @@ import net.minecraft.world.WorldView;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static eu.midnightdust.motschen.rocks.RocksMain.STARFISH_VARIATION;
|
||||
|
||||
public class Starfish extends Block implements Waterloggable {
|
||||
|
||||
private static final VoxelShape SHAPE;
|
||||
@@ -34,7 +39,7 @@ public class Starfish extends Block implements Waterloggable {
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public Starfish() {
|
||||
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.CORAL));
|
||||
super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.CORAL));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(STARFISH_VARIATION, StarfishVariation.RED).with(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
@@ -45,24 +50,18 @@ public class Starfish extends Block implements Waterloggable {
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
ItemStack stack = itemPlacementContext.getStack();
|
||||
StarfishVariation variation = StarfishVariation.RED;
|
||||
if (stack.getNbt() != null) {
|
||||
var optionalVariation = STARFISH_VARIATION.parse(stack.getNbt().getString("variation"));
|
||||
if (optionalVariation.isPresent()) variation = optionalVariation.get();
|
||||
}
|
||||
FluidState fluidState = itemPlacementContext.getWorld().getFluidState(itemPlacementContext.getBlockPos());
|
||||
return Objects.requireNonNull(super.getPlacementState(itemPlacementContext))
|
||||
.with(STARFISH_VARIATION, variation).with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER);
|
||||
.with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER);
|
||||
}
|
||||
@Override
|
||||
public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) {
|
||||
public ItemStack getPickStack(WorldView world, BlockPos pos, BlockState state) {
|
||||
ItemStack stack = new ItemStack(this);
|
||||
stack.getOrCreateNbt().putString("variation", state.get(STARFISH_VARIATION).asString());
|
||||
stack.applyComponentsFrom(ComponentMap.builder().add(DataComponentTypes.BLOCK_STATE, BlockStateComponent.DEFAULT.with(STARFISH_VARIATION, state.get(STARFISH_VARIATION))).build());
|
||||
return stack;
|
||||
}
|
||||
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (player.isCreative()) {
|
||||
if (state.get(STARFISH_VARIATION) == StarfishVariation.RED) {
|
||||
world.setBlockState(pos, state.with(STARFISH_VARIATION, StarfishVariation.PINK));
|
||||
@@ -96,4 +95,5 @@ public class Starfish extends Block implements Waterloggable {
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
|
||||
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
|
||||
}
|
||||
protected boolean canReplace(BlockState state, ItemPlacementContext context) {return true;}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Stick extends Block {
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public Stick() {
|
||||
super(FabricBlockSettings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
super(AbstractBlock.Settings.copy(Blocks.POPPY).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(STICK_VARIATION, StickVariation.SMALL).with(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Stick extends Block {
|
||||
return Objects.requireNonNull(super.getPlacementState(itemPlacementContext))
|
||||
.with(STICK_VARIATION, StickVariation.SMALL).with(WATERLOGGED, false);
|
||||
}
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||
if (player.isCreative()) {
|
||||
if (state.get(STICK_VARIATION) == StickVariation.SMALL) {
|
||||
world.setBlockState(pos, state.with(STICK_VARIATION, StickVariation.MEDIUM));
|
||||
@@ -74,4 +74,6 @@ public class Stick extends Block {
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
|
||||
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
|
||||
}
|
||||
protected boolean isTransparent(BlockState state, BlockView world, BlockPos pos) {return true;}
|
||||
protected boolean canReplace(BlockState state, ItemPlacementContext context) {return true;}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class BlockEntityInit {
|
||||
public static BlockEntityType<NetherGeyserBlockEntity> NETHER_GEYSER_BE;
|
||||
|
||||
public static void init() {
|
||||
OVERWORLD_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"overworld_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(OverworldGeyserBlockEntity::new, RocksMain.Geyser).build(null));
|
||||
NETHER_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"nether_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(NetherGeyserBlockEntity::new, RocksMain.NetherGeyser).build(null));
|
||||
OVERWORLD_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(RocksMain.MOD_ID,"overworld_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(OverworldGeyserBlockEntity::new, RocksMain.Geyser).build(null));
|
||||
NETHER_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(RocksMain.MOD_ID,"nether_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(NetherGeyserBlockEntity::new, RocksMain.NetherGeyser).build(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public enum StarfishVariation implements StringIdentifiable {
|
||||
PINK("pink"),
|
||||
ORANGE("orange");
|
||||
|
||||
private final String name;
|
||||
public final String name;
|
||||
|
||||
StarfishVariation(String name) {
|
||||
this.name = name;
|
||||
|
||||
@@ -94,6 +94,6 @@ public class FeatureInjector {
|
||||
if (RocksConfig.geyser) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("snowy_geyser"));
|
||||
}
|
||||
public static RegistryKey<PlacedFeature> getKey(String name) {
|
||||
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(RocksMain.MOD_ID, name));
|
||||
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(RocksMain.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:acacia_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:acacia_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:acacia_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:andesite_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:andesite_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:andesite_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:andesite_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:bamboo_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:bamboo_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:bamboo_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:bamboo"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:birch_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:birch_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:birch_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:cherry_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:cherry_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:cherry_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:crimson_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:crimson_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:crimson_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:dark_oak_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:dark_oak_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:dark_oak_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:diorite_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:diorite_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:diorite_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:diorite_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:end_stone_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:end_stone_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:end_stone_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:end_stone_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:granite_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:granite_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:granite_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:granite_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:gravel_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:gravel_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:gravel_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:flint"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:jungle_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:jungle_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:jungle_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:mangrove_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:mangrove_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:mangrove_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:netherrack_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:netherrack_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:netherrack_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:netherrack_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:oak_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:oak_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:oak_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,37 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:pinecone",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:pinecone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:spruce_sapling"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:red_sand_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:red_sand_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:red_sand_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:red_sandstone_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:cobblestone_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:sand_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:sand_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:sand_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:sandstone_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:soul_soil_rock",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:soul_soil_rock",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:soul_soil_rock"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:soul_soil_splitter"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:spruce_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:spruce_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:spruce_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
23
src/main/resources/data/rocks/loot_table/blocks/starfish.json
Executable file
23
src/main/resources/data/rocks/loot_table/blocks/starfish.json
Executable file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:starfish",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:starfish",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,40 +4,46 @@
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "rocks:spruce_stick",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:copy_state",
|
||||
"block": "rocks:spruce_stick",
|
||||
"properties": [
|
||||
"variation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
"components": {
|
||||
"minecraft:enchantments": {
|
||||
"minecraft:silk_touch": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "rocks:warped_stick"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:block_state_property",
|
||||
"block": "rocks:starfish",
|
||||
"properties": {
|
||||
"variation": "red"
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag": "{variation:red}"
|
||||
}
|
||||
],
|
||||
"name": "rocks:starfish"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:block_state_property",
|
||||
"block": "rocks:starfish",
|
||||
"properties": {
|
||||
"variation": "pink"
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag": "{variation:pink}"
|
||||
}
|
||||
],
|
||||
"name": "rocks:starfish"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:block_state_property",
|
||||
"block": "rocks:starfish",
|
||||
"properties": {
|
||||
"variation": "orange"
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_nbt",
|
||||
"tag": "{variation:orange}"
|
||||
}
|
||||
],
|
||||
"name": "rocks:starfish"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user