diff --git a/src/main/java/org/violetmoon/quark/content/tools/entity/rang/Echorang.java b/src/main/java/org/violetmoon/quark/content/tools/entity/rang/Echorang.java index ce95a00ba5..c44edfffeb 100644 --- a/src/main/java/org/violetmoon/quark/content/tools/entity/rang/Echorang.java +++ b/src/main/java/org/violetmoon/quark/content/tools/entity/rang/Echorang.java @@ -12,15 +12,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.gameevent.DynamicGameEventListener; -import net.minecraft.world.level.gameevent.EntityPositionSource; -import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.level.gameevent.*; import net.minecraft.world.level.gameevent.GameEvent.Context; -import net.minecraft.world.level.gameevent.GameEventListener; -import net.minecraft.world.level.gameevent.vibrations.VibrationListener; -import net.minecraft.world.level.gameevent.vibrations.VibrationListener.VibrationListenerConfig; +import net.minecraft.world.level.gameevent.vibrations.VibrationSystem; import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.violetmoon.quark.base.Quark; import org.violetmoon.quark.content.tools.config.PickarangType; @@ -30,22 +27,24 @@ import java.util.function.BiConsumer; -public class Echorang extends AbstractPickarang implements VibrationListenerConfig { +public class Echorang extends AbstractPickarang implements VibrationSystem { + private final EchorangVibrationUser user = new EchorangVibrationUser(); + private Data data = new Data(); - private final DynamicGameEventListener dynamicGameEventListener; + private final DynamicGameEventListener vibrationListener; public Echorang(EntityType type, Level worldIn) { super(type, worldIn); - dynamicGameEventListener = makeListener(); + vibrationListener = makeListener(); } public Echorang(EntityType type, Level worldIn, Player thrower) { super(type, worldIn, thrower); - dynamicGameEventListener = makeListener(); + vibrationListener = makeListener(); } - private DynamicGameEventListener makeListener() { - return new DynamicGameEventListener<>(new VibrationListener(new EntityPositionSource(this, this.getEyeHeight()), 16, this, (VibrationListener.ReceivingEvent) null, 0.0F, 0)); + private DynamicGameEventListener makeListener() { + return new DynamicGameEventListener<>(new VibrationSystem.Listener(this)); } @Override @@ -70,26 +69,6 @@ public boolean hasDrag() { return false; } - @Override - public TagKey getListenableEvents() { - return PickarangModule.echorangCanListenTag; - } - - @Override - public boolean isValidVibration(GameEvent p_223878_, Context p_223879_) { - return p_223878_.is(getListenableEvents()) && p_223879_.sourceEntity() == getOwner(); - } - - @Override - public boolean shouldListen(ServerLevel level, GameEventListener listener, BlockPos pos, GameEvent event, Context context) { - return !isReturning() && level.getWorldBorder().isWithinBounds(pos) && !isRemoved() && this.level() == level; - } - - @Override - public void onSignalReceive(ServerLevel level, GameEventListener listener, BlockPos pos, GameEvent event, @Nullable Entity receiving, @Nullable Entity projectileOwner, float distance) { - liveTime = 0; - } - @Override public void tick() { super.tick(); @@ -97,7 +76,7 @@ public void tick() { gameEvent(GameEvent.PROJECTILE_SHOOT); if (level() instanceof ServerLevel serverlevel) - this.dynamicGameEventListener.getListener().tick(serverlevel); + VibrationSystem.Ticker.tick(serverlevel, getVibrationData(), getVibrationUser()); } @Override @@ -106,28 +85,65 @@ public PickarangType getPickarangType() { } @Override - public void addAdditionalSaveData(CompoundTag compound) { + public void addAdditionalSaveData(@NotNull CompoundTag compound) { super.addAdditionalSaveData(compound); - VibrationListener.codec(this).encodeStart(NbtOps.INSTANCE, dynamicGameEventListener.getListener()).resultOrPartial(Quark.LOG::error).ifPresent((nbt) -> { - compound.put("listener", nbt); - }); + Data.CODEC.encodeStart(NbtOps.INSTANCE, data).resultOrPartial(Quark.LOG::error).ifPresent((nbt) -> compound.put("listener", nbt)); } @Override - public void readAdditionalSaveData(CompoundTag compound) { + public void readAdditionalSaveData(@NotNull CompoundTag compound) { super.readAdditionalSaveData(compound); if(compound.contains("listener", 10)) - VibrationListener.codec(this).parse(new Dynamic<>(NbtOps.INSTANCE, compound.getCompound("listener"))).resultOrPartial(Quark.LOG::error).ifPresent((nbt) -> { - dynamicGameEventListener.updateListener(nbt, level()); - }); + Data.CODEC.parse(new Dynamic<>(NbtOps.INSTANCE, compound.getCompound("listener"))).resultOrPartial(Quark.LOG::error).ifPresent((nbt) -> data = nbt); } @Override - public void updateDynamicGameEventListener(BiConsumer, ServerLevel> consumer) { + public void updateDynamicGameEventListener(@NotNull BiConsumer, ServerLevel> consumer) { if (level() instanceof ServerLevel serverlevel) - consumer.accept(this.dynamicGameEventListener, serverlevel); + consumer.accept(this.vibrationListener, serverlevel); + } + + @Override + public @NotNull Data getVibrationData() { + return data; } + @Override + public @NotNull User getVibrationUser() { + return user; + } + + public class EchorangVibrationUser implements VibrationSystem.User { + @Override + public int getListenerRadius() { + return 16; + } + + @Override + public @NotNull PositionSource getPositionSource() { + return new EntityPositionSource(Echorang.this, Echorang.this.getEyeHeight()); + } + + @Override + public boolean canReceiveVibration(ServerLevel level, BlockPos pos, GameEvent event, Context context) { + return !isReturning() && level.getWorldBorder().isWithinBounds(pos) && !isRemoved() && Echorang.this.level() == level; + } + + @Override + public void onReceiveVibration(ServerLevel level, BlockPos pos, GameEvent event, @Nullable Entity receiving, @Nullable Entity projectileOwner, float distance) { + liveTime = 0; + } + + @Override + public TagKey getListenableEvents() { + return PickarangModule.echorangCanListenTag; + } + + @Override + public boolean isValidVibration(GameEvent gameEvent, Context context) { + return gameEvent.is(getListenableEvents()) && context.sourceEntity() == getOwner(); + } + } } diff --git a/src/main/java/org/violetmoon/quark/mixin/BannerDuplicateRecipeMixin.java b/src/main/java/org/violetmoon/quark/mixin/BannerDuplicateRecipeMixin.java index dedfa536c0..fe237a0161 100644 --- a/src/main/java/org/violetmoon/quark/mixin/BannerDuplicateRecipeMixin.java +++ b/src/main/java/org/violetmoon/quark/mixin/BannerDuplicateRecipeMixin.java @@ -15,7 +15,7 @@ public int getLimitMatches(int curr) { return MoreBannerLayersModule.getLimit(curr); } - @ModifyConstant(method = "assemble(Lnet/minecraft/world/inventory/CraftingContainer;)Lnet/minecraft/world/item/ItemStack;", constant = @Constant(intValue = 6)) + @ModifyConstant(method = "assemble(Lnet/minecraft/world/inventory/CraftingContainer;Lnet/minecraft/core/RegistryAccess;)Lnet/minecraft/world/item/ItemStack;", constant = @Constant(intValue = 6)) public int getLimitAssemble(int curr) { return MoreBannerLayersModule.getLimit(curr); } diff --git a/src/main/java/org/violetmoon/quark/mixin/ItemsMixin.java b/src/main/java/org/violetmoon/quark/mixin/ItemsMixin.java deleted file mode 100644 index 836c4a5050..0000000000 --- a/src/main/java/org/violetmoon/quark/mixin/ItemsMixin.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.violetmoon.quark.mixin; - -import net.minecraft.world.item.Items; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.Optional; - -@Mixin(Items.class) -public class ItemsMixin { - - @Inject(method = "ifPart2", at = @At("HEAD"), cancellable = true) - private static void overrideStackedOnOther(T val, CallbackInfoReturnable> callbackInfoReturnable) { - callbackInfoReturnable.setReturnValue(Optional.of(val)); - } - -} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index cc8c3c354d..05c6549811 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -73,4 +73,4 @@ public net.minecraft.client.gui.Gui f_279580_ # GUI_ICONS_LOCATION public net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase f_283893_ # mapColor protected net.minecraft.world.level.block.CropBlock m_7959_()Lnet/minecraft/world/level/block/state/properties/IntegerProperty; # getAgeProperty TODO fix me beautiful public net.minecraft.data.worldgen.biome.OverworldBiomes m_264144_(ZFFLnet/minecraft/world/level/biome/MobSpawnSettings$Builder;Lnet/minecraft/world/level/biome/BiomeGenerationSettings$Builder;Lnet/minecraft/sounds/Music;)Lnet/minecraft/world/level/biome/Biome; # biome -public net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger$TriggerInstance f_285570_ # location \ No newline at end of file +public-f net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger$TriggerInstance f_285570_ # location diff --git a/src/main/resources/data/quark/worldgen/configured_feature/blue_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/blue_blossom.json new file mode 100644 index 0000000000..431b1918f5 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/blue_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blue_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/configured_feature/lavender_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/lavender_blossom.json new file mode 100644 index 0000000000..75fd15e64b --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/lavender_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:lavender_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/configured_feature/orange_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/orange_blossom.json new file mode 100644 index 0000000000..841ba12d80 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/orange_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:orange_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/configured_feature/pink_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/pink_blossom.json new file mode 100644 index 0000000000..366a661b1a --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/pink_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:pink_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/configured_feature/red_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/red_blossom.json new file mode 100644 index 0000000000..3d0bc48f40 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/red_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:red_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/configured_feature/yellow_blossom.json b/src/main/resources/data/quark/worldgen/configured_feature/yellow_blossom.json new file mode 100644 index 0000000000..0f9fb8c29c --- /dev/null +++ b/src/main/resources/data/quark/worldgen/configured_feature/yellow_blossom.json @@ -0,0 +1,53 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:fancy_foliage_placer", + "height": 4, + "offset": 1, + "radius": 3 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:yellow_blossom_leaves", + "Properties": { + "distance": "7", + "persistent": "false", + "waterlogged": "false" + } + } + }, + "force_dirt": false, + "ignore_vines": true, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 0, + "lower_size": 0, + "min_clipped_height": 4, + "upper_size": 0 + }, + "trunk_placer": { + "type": "minecraft:fancy_trunk_placer", + "base_height": 8, + "height_rand_a": 10, + "height_rand_b": 10 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "quark:blossom_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/blue_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/blue_blossom_placed.json new file mode 100644 index 0000000000..76c7b95406 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/blue_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:blue_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:blue_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/lavender_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/lavender_blossom_placed.json new file mode 100644 index 0000000000..1bcb7847db --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/lavender_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:lavender_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:lavender_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/orange_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/orange_blossom_placed.json new file mode 100644 index 0000000000..10c246b440 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/orange_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:orange_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:orange_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/pink_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/pink_blossom_placed.json new file mode 100644 index 0000000000..b23279730e --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/pink_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:pink_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:pink_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/red_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/red_blossom_placed.json new file mode 100644 index 0000000000..6abbf74865 --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/red_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:red_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:red_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/quark/worldgen/placed_feature/yellow_blossom_placed.json b/src/main/resources/data/quark/worldgen/placed_feature/yellow_blossom_placed.json new file mode 100644 index 0000000000..386f20a0fc --- /dev/null +++ b/src/main/resources/data/quark/worldgen/placed_feature/yellow_blossom_placed.json @@ -0,0 +1,47 @@ +{ + "feature": "quark:yellow_blossom", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:weighted_list", + "distribution": [ + { + "data": 1, + "weight": 9 + }, + { + "data": 3, + "weight": 1 + } + ] + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 0 + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:biome" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:would_survive", + "state": { + "Name": "quark:yellow_blossom_sapling", + "Properties": { + "stage": "0" + } + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/quark.mixins.json b/src/main/resources/quark.mixins.json index 36970d5262..71e278b82e 100644 --- a/src/main/resources/quark.mixins.json +++ b/src/main/resources/quark.mixins.json @@ -36,7 +36,6 @@ "IForgeItemMixin", "IronBarsBlockMixin", "ItemMixin", - "ItemsMixin", "ItemStackMixin", "LadderBlockMixin", "LanternBlockMixin",