diff --git a/gradle.properties b/gradle.properties index 017d3e7d..c313da16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # suppress inspection "UnusedProperty" for whole file org.gradle.jvmargs=-Xmx2G -paradiseLostVersion=2.2.0-beta+1.19.2 +paradiseLostVersion=2.2.1-beta+1.19.2 minecraftVersion=1.19.2 yarnVersion=1.19.2+build.28 diff --git a/src/main/java/net/id/paradiselost/api/FloatingBlockHelper.java b/src/main/java/net/id/paradiselost/api/FloatingBlockHelper.java index 422a003b..b68002b6 100644 --- a/src/main/java/net/id/paradiselost/api/FloatingBlockHelper.java +++ b/src/main/java/net/id/paradiselost/api/FloatingBlockHelper.java @@ -54,7 +54,7 @@ public interface FloatingBlockHelper { World world = entity.world; BlockPos pos = entity.getBlockPos(); int distFromTop = world.getTopY() - pos.getY(); - return !entity.isFastFloater() && distFromTop <= 50; + return !entity.isInTag(ParadiseLostBlockTags.DECAYING_FLOATERS) && distFromTop <= 50; }; /** diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java index 12a2cabe..6b1c3c16 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java @@ -41,7 +41,7 @@ protected static Action coarseTillable() { return (id, block) -> TillableBlockRegistry.register(block, HoeItem::canTillFarmland, ParadiseLostBlocks.DIRT.getDefaultState()); } - protected static Action flattenable() { - return (id, block) -> FlattenableBlockRegistry.register(block, ParadiseLostBlocks.DIRT_PATH.getDefaultState()); + protected static Action flattenable(Block turnInto) { + return (id, block) -> FlattenableBlockRegistry.register(block, turnInto.getDefaultState()); } } diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java index 3752e43a..c6295fcb 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java @@ -41,16 +41,20 @@ protected static Settings unbreakable(AbstractBlock.Settings settings) { private static Settings grassBlock() { return copy(Blocks.GRASS_BLOCK).mapColor(MapColor.LICHEN_GREEN).strength(0.4f); } + private static Settings permafrost() { + return copy(Blocks.DIRT).strength(2f).sounds(BlockSoundGroup.GILDED_BLACKSTONE); + } - public static final ParadiseLostGrassBlock HIGHLANDS_GRASS = add("highlands_grass", new ParadiseLostGrassBlock(grassBlock()), cutoutMippedRenderLayer, tillable(), flattenable()); - public static final ParadiseLostSnowyBlock FROZEN_GRASS = add("frozen_grass", new ParadiseLostSnowyBlock(grassBlock().mapColor(MapColor.WHITE).strength(2F).sounds(BlockSoundGroup.GILDED_BLACKSTONE)), flattenable()); + public static final ParadiseLostDirtPathBlock DIRT_PATH = add("grass_path", new ParadiseLostDirtPathBlock(copy(Blocks.DIRT_PATH), () -> ParadiseLostBlocks.DIRT)); + public static final ParadiseLostDirtPathBlock PERMAFROST_PATH = add("frozen_path", new ParadiseLostDirtPathBlock(permafrost(), () -> ParadiseLostBlocks.PERMAFROST)); + public static final ParadiseLostGrassBlock HIGHLANDS_GRASS = add("highlands_grass", new ParadiseLostGrassBlock(grassBlock()), cutoutMippedRenderLayer, tillable(), flattenable(ParadiseLostBlocks.DIRT_PATH)); + public static final ParadiseLostSnowyBlock FROZEN_GRASS = add("frozen_grass", new ParadiseLostSnowyBlock(grassBlock().mapColor(MapColor.WHITE).strength(2F).sounds(BlockSoundGroup.GILDED_BLACKSTONE)), flattenable(ParadiseLostBlocks.PERMAFROST_PATH)); // Soil Blocks - public static final Block DIRT = add("dirt", new Block(copy(Blocks.DIRT).strength(0.3f)), tillable(), flattenable()); - public static final Block COARSE_DIRT = add("coarse_dirt", new Block(copy(Blocks.DIRT).strength(0.3f)), coarseTillable(), flattenable()); + public static final Block DIRT = add("dirt", new Block(copy(Blocks.DIRT).strength(0.3f)), tillable(), flattenable(ParadiseLostBlocks.DIRT_PATH)); + public static final Block COARSE_DIRT = add("coarse_dirt", new Block(copy(Blocks.DIRT).strength(0.3f)), coarseTillable(), flattenable(ParadiseLostBlocks.DIRT_PATH)); public static final FloatingBlock LEVITA = add("levita", new FloatingBlock(false, copy(Blocks.GRAVEL).strength(0.3f))); - public static final Block PERMAFROST = add("permafrost", new Block(copy(Blocks.DIRT).strength(2f).sounds(BlockSoundGroup.GILDED_BLACKSTONE)), flattenable()); + public static final Block PERMAFROST = add("permafrost", new Block(permafrost()), flattenable(ParadiseLostBlocks.PERMAFROST_PATH)); public static final FarmlandBlock FARMLAND = add("farmland", new ParadiseLostFarmlandBlock(copy(Blocks.FARMLAND))); - public static final ParadiseLostDirtPathBlock DIRT_PATH = add("grass_path", new ParadiseLostDirtPathBlock(copy(Blocks.DIRT_PATH))); public static final Block PACKED_SWEDROOT = add("packed_swedroot", new Block(of(Material.WOOD).strength(2f).sounds(BlockSoundGroup.SHROOMLIGHT))); // Glass Blocks diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java index f886dfa2..3b4476d2 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java @@ -1,8 +1,12 @@ package net.id.paradiselost.blocks.blockentity; +import net.id.paradiselost.blocks.mechanical.TreeTapBlock; import net.id.paradiselost.recipe.ParadiseLostRecipeTypes; import net.id.paradiselost.recipe.TreeTapRecipe; +import net.minecraft.block.BeehiveBlock; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.HopperBlockEntity; import net.minecraft.block.entity.LootableContainerBlockEntity; @@ -28,7 +32,6 @@ import net.minecraft.util.math.Direction; import org.jetbrains.annotations.Nullable; -import java.util.List; import java.util.Optional; public class TreeTapBlockEntity extends LootableContainerBlockEntity implements SidedInventory { @@ -134,12 +137,29 @@ public void tryCraft() { Optional recipe = this.world.getRecipeManager().getFirstMatch(ParadiseLostRecipeTypes.TREE_TAP_RECIPE_TYPE, this, this.world); if (recipe.isPresent() && world.random.nextInt(recipe.get().getChance()) == 0) { ItemStack output = recipe.get().craft(this); - stack.decrement(1); + Block convertBlock = recipe.get().getOutputBlock(); + BlockPos attachedPos = this.pos.offset(world.getBlockState(this.pos).get(TreeTapBlock.FACING).getOpposite()); + BlockState attachedBlock = world.getBlockState(attachedPos); + if (convertBlock != Blocks.BEE_NEST) { + stack.decrement(1); - if (!world.isClient) world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, 0.5f, world.getRandom().nextFloat() * 0.4f + 0.8f); + if (convertBlock != world.getBlockState(this.pos).getBlock()) { + world.setBlockState(attachedPos, convertBlock.getDefaultState(), 0); + } + if (!world.isClient) world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, 0.5f, world.getRandom().nextFloat() * 0.4f + 0.8f); - this.inventory.set(0, output); - inventoryChanged(); + this.inventory.set(0, output); + inventoryChanged(); + } else if (attachedBlock.get(BeehiveBlock.HONEY_LEVEL) == 5) { + stack.decrement(1); + + world.setBlockState(attachedPos, attachedBlock.with(BeehiveBlock.HONEY_LEVEL, 0)); + + if (!world.isClient) world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, 0.5f, world.getRandom().nextFloat() * 0.4f + 0.8f); + + this.inventory.set(0, output); + inventoryChanged(); + } } tryTansferItemsOut(); } diff --git a/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseLostDirtPathBlock.java b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseLostDirtPathBlock.java index 84845a95..a09b9113 100644 --- a/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseLostDirtPathBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/decorative/ParadiseLostDirtPathBlock.java @@ -1,19 +1,26 @@ package net.id.paradiselost.blocks.decorative; -import net.id.paradiselost.blocks.ParadiseLostBlocks; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.DirtPathBlock; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; +import java.util.function.Function; +import java.util.function.Supplier; + public class ParadiseLostDirtPathBlock extends DirtPathBlock { - public ParadiseLostDirtPathBlock(Settings settings) { + + private Supplier returnTo; + + public ParadiseLostDirtPathBlock(Settings settings, Supplier returnTo) { super(settings); + this.returnTo = returnTo; } @Override public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { - world.setBlockState(pos, pushEntitiesUpBeforeBlockChange(state, ParadiseLostBlocks.DIRT.getDefaultState(), world, pos)); + world.setBlockState(pos, pushEntitiesUpBeforeBlockChange(state, this.returnTo.get().getDefaultState(), world, pos)); } } diff --git a/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java b/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java index 637f9230..d0f3d473 100644 --- a/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java @@ -4,19 +4,25 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.SandBlock; import net.minecraft.entity.Entity; +import net.minecraft.entity.FallingBlockEntity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.ProjectileEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; import net.minecraft.world.World; import net.minecraft.world.event.GameEvent; import net.minecraft.world.explosion.Explosion; @@ -31,8 +37,7 @@ public NitraBlock(Settings settings) { public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.isOf(state.getBlock())) { if (world.isReceivingRedstonePower(pos)) { - ignite(world, pos, 2F); - world.removeBlock(pos, false); + world.createAndScheduleBlockTick(pos, this, 1); } } @@ -40,8 +45,7 @@ public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (world.isReceivingRedstonePower(pos)) { - ignite(world, pos, 2F); - world.removeBlock(pos, false); + world.createAndScheduleBlockTick(pos, this, 1); } } @@ -49,17 +53,24 @@ public void neighborUpdate(BlockState state, World world, BlockPos pos, Block so public void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) { float sourcePower = ((ExplosionExtensions) explosion).getPower(); if (!world.isClient && sourcePower > 0.5F) { - System.out.println(sourcePower); ignite(world, pos, sourcePower - 0.5F); } } + public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + ignite(world, pos, 2F, null); + world.setBlockState(pos, Blocks.AIR.getDefaultState(), 11); + world.spawnParticles(ParticleTypes.EXPLOSION_EMITTER, pos.getX(), pos.getY(), pos.getZ(), 1, 0.0, 0.0, 0.0, 0.0); + world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 4.0F, (1.0F + (world.random.nextFloat() - world.random.nextFloat()) * 0.2F) * 0.7F); + } + public static void ignite(World world, BlockPos pos, float power) { ignite(world, pos, power, null); } private static void ignite(World world, BlockPos pos, float power, @Nullable LivingEntity igniter) { Explosion explosion = new Explosion(world, igniter, null, null, pos.getX(), pos.getY() + 0.5D, pos.getZ(), power, false, Explosion.DestructionType.BREAK); + System.out.println(world.isClient); if (!world.isClient) { explosion.collectBlocksAndDamageEntities(); world.emitGameEvent(igniter, GameEvent.PRIME_FUSE, pos); diff --git a/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java b/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java index e9b127e8..4a27a29c 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java +++ b/src/main/java/net/id/paradiselost/client/rendering/entity/ParadiseLostEntityRenderers.java @@ -8,6 +8,8 @@ import net.id.paradiselost.client.rendering.entity.passive.MoaEntityRenderer; import net.id.paradiselost.entities.ParadiseLostEntityTypes; import net.minecraft.client.render.entity.EntityRendererFactory; +import net.minecraft.client.render.entity.EntityRenderers; +import net.minecraft.client.render.entity.FlyingItemEntityRenderer; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; @@ -25,6 +27,8 @@ public static void initClient() { register(ParadiseLostEntityTypes.MOA, MoaEntityRenderer::new); // register(ParadiseLostEntityTypes.AMBYST, AmbystRenderer::new); + // projectile + register(ParadiseLostEntityTypes.THROWN_NITRA, FlyingItemEntityRenderer::new); } @SafeVarargs diff --git a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java index 0a4c8327..5af8684e 100644 --- a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java +++ b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java @@ -11,6 +11,7 @@ import net.id.paradiselost.entities.passive.ParadiseLostAnimalEntity; import net.id.paradiselost.entities.passive.ambyst.FindLogSensor; import net.id.paradiselost.entities.passive.moa.MoaEntity; +import net.id.paradiselost.entities.projectile.ThrownNitraEntity; import net.id.paradiselost.mixin.brain.ActivityInvoker; import net.id.paradiselost.mixin.brain.MemoryModuleTypeInvoker; import net.id.paradiselost.mixin.brain.SensorTypeInvoker; @@ -47,7 +48,7 @@ public class ParadiseLostEntityTypes { ParadiseLostEntityTypes.of(SliderEntity::new, MISC, changing(0.98F, 0.98F), 10).trackedUpdateRate(20)); // Hostile - public static final EntityType ENVOY = add("envoy", of(EnvoyEntity::new, MONSTER, changing(1f, 2f), 7), + public static final EntityType ENVOY = add("envoy", of(EnvoyEntity::new, MONSTER, changing(0.6F, 1.95F), 10), attributes(EnvoyEntity::createEnvoyAttributes), spawnRestrictions(EnvoyEntity::canMobSpawn)); // passive @@ -56,6 +57,9 @@ public class ParadiseLostEntityTypes { // public static final EntityType AMBYST = add("ambyst", of(AmbystEntity::new, CREATURE, changing(0.6F, 0.42F), 5), // attributes(AmbystEntity::createAmbystAttributes), spawnRestrictions(ParadiseLostAnimalEntity::isValidNaturalParadiseLostSpawn)); + // projectile + public static final EntityType THROWN_NITRA = add("thrown_nitra", of(ThrownNitraEntity::new, MISC, changing(0.5F, 0.5F), 5)); + //Brain public static final Activity HIDEINLOG = ActivityInvoker.invokeRegister(ParadiseLost.locate("hideinlog").toString()); diff --git a/src/main/java/net/id/paradiselost/entities/block/FloatingBlockEntity.java b/src/main/java/net/id/paradiselost/entities/block/FloatingBlockEntity.java index f7a322a5..e98b0273 100644 --- a/src/main/java/net/id/paradiselost/entities/block/FloatingBlockEntity.java +++ b/src/main/java/net/id/paradiselost/entities/block/FloatingBlockEntity.java @@ -4,12 +4,14 @@ import net.id.paradiselost.entities.ParadiseLostEntityTypes; import net.id.paradiselost.tag.ParadiseLostBlockTags; import net.id.incubus_core.blocklikeentities.api.BlockLikeEntity; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.FallingBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.MovementType; import net.minecraft.nbt.NbtCompound; +import net.minecraft.tag.TagKey; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3i; import net.minecraft.world.World; @@ -65,7 +67,7 @@ public void postTickMovement() { if (!this.hasNoGravity()) { if (!isDropping() && !shouldBeginDropping()) { - if (isFastFloater()) { + if (isInTag(ParadiseLostBlockTags.FAST_FLOATERS)) { this.setVelocity(this.getVelocity().add(0.0D, 0.05D, 0.0D)); } else { this.setVelocity(this.getVelocity().add(0.0D, 0.03D, 0.0D)); @@ -140,9 +142,9 @@ public void breakApart() { super.breakApart(); this.getOnEndFloating().accept(Math.abs(this.lastYVelocity), false); } - - public boolean isFastFloater() { - return this.getBlockState().isIn(ParadiseLostBlockTags.FAST_FLOATERS) && !this.partOfSet; + + public boolean isInTag(TagKey tag) { + return this.getBlockState().isIn(tag) && !this.partOfSet; } @Override diff --git a/src/main/java/net/id/paradiselost/entities/projectile/ThrownNitraEntity.java b/src/main/java/net/id/paradiselost/entities/projectile/ThrownNitraEntity.java new file mode 100644 index 00000000..c2ec3efa --- /dev/null +++ b/src/main/java/net/id/paradiselost/entities/projectile/ThrownNitraEntity.java @@ -0,0 +1,77 @@ +package net.id.paradiselost.entities.projectile; + +import net.id.paradiselost.ParadiseLost; +import net.id.paradiselost.entities.ParadiseLostEntityTypes; +import net.id.paradiselost.items.ParadiseLostItems; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.mob.BlazeEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.projectile.thrown.SnowballEntity; +import net.minecraft.entity.projectile.thrown.ThrownEntity; +import net.minecraft.entity.projectile.thrown.ThrownItemEntity; +import net.minecraft.item.Item; +import net.minecraft.particle.ParticleEffect; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.util.hit.EntityHitResult; +import net.minecraft.util.hit.HitResult; +import net.minecraft.util.math.Box; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +import net.minecraft.world.explosion.Explosion; + +public class ThrownNitraEntity extends ThrownItemEntity { + + public ThrownNitraEntity(EntityType entityType, World world) { + super(entityType, world); + } + + public ThrownNitraEntity(World world, LivingEntity owner) { + super(ParadiseLostEntityTypes.THROWN_NITRA, owner, world); + } + + protected void onEntityHit(EntityHitResult entityHitResult) { + super.onEntityHit(entityHitResult); + doDamage(); + } + + protected void onCollision(HitResult hitResult) { + super.onCollision(hitResult); + doDamage(); + if (!this.world.isClient) { + this.world.sendEntityStatus(this, (byte)3); + this.discard(); + } + } + + public void handleStatus(byte status) { + if (status == 3) { + for (int i = 0; i < 4; i++) { + this.world.addParticle(ParticleTypes.EXPLOSION, + this.getX() + this.random.nextDouble() - 0.5, this.getY() + this.random.nextDouble() - 0.5, this.getZ() + this.random.nextDouble() - 0.5, + 0.0, 0.0, 0.0 + ); + } + this.world.playSound(this.getX(), this.getY(), this.getZ(), SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.NEUTRAL, 1.0F, 1.1F + this.random.nextFloat() * 0.4F, false); + } + + } + + private void doDamage() { + var hit = this.world.getOtherEntities(this, new Box(this.getX()-1.5, this.getY()-1.5, this.getZ()-1.5, this.getX()+1.5, this.getY()+1.5, this.getZ()+1.5)); + for (Entity e : hit) { + Vec3d diff = this.getPos().subtract(e.getPos()).negate().normalize(); + e.addVelocity(diff.x, diff.y, diff.z); + e.damage(DamageSource.explosion((LivingEntity) null), 2); + } + } + + @Override + protected Item getDefaultItem() { + return ParadiseLostItems.NITRA_BULB; + } +} diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index e1a3df50..e27b49f5 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -158,7 +158,7 @@ private static Settings food(FoodComponent foodComponent, Rarity rarity) { public static final Item ORANGE = add("orange", new Item(food(ParadiseLostFoodComponent.ORANGE)), compostable65); public static final AliasedBlockItem AMADRYS_BUSHEL = add("amadrys_bushel", new AliasedBlockItem(ParadiseLostBlocks.AMADRYS, food(ParadiseLostFoodComponent.GENERIC_WORSE)), compostable30); public static final AliasedBlockItem NITRA_SEED = add("nitra", new AliasedBlockItem(ParadiseLostBlocks.NITRA, food()), compostable15); - public static final Item NITRA_BULB = add("nitra_bulb", new Item(food()), compostable50); + public static final Item NITRA_BULB = add("nitra_bulb", new NitraItem(food()), compostable50); public static final Item AMADRYS_NOODLES = add("amadrys_noodles", new StewItem(food(ParadiseLostFoodComponent.AMADRYS_NOODLES))); public static final Item AMADRYS_BREAD = add("amadrys_bread", new Item(food(ParadiseLostFoodComponent.AMADRYS_BREAD))); public static final Item AMADRYS_BREAD_GLAZED = add("amadrys_bread_glazed", new Item(food(ParadiseLostFoodComponent.AMADRYS_BREAD_GLAZED))); @@ -412,6 +412,7 @@ private static FabricItemSettings decoration() { // path & farmland public static final BlockItem FARMLAND = add("farmland", ParadiseLostBlocks.FARMLAND, decoration); public static final BlockItem DIRT_PATH = add("grass_path", ParadiseLostBlocks.DIRT_PATH, decoration); + public static final BlockItem PERMAFROST_PATH = add("frozen_path", ParadiseLostBlocks.PERMAFROST_PATH, decoration); // signs, wall stuff. public static final SignItem AUREL_SIGN = add("aurel_sign", new SignItem(sign, ParadiseLostBlocks.AUREL_SIGNS.sign(), ParadiseLostBlocks.AUREL_SIGNS.wallSign())); public static final SignItem MOTHER_AUREL_SIGN = add("mother_aurel_sign", new SignItem(sign, ParadiseLostBlocks.MOTHER_AUREL_SIGNS.sign(), ParadiseLostBlocks.MOTHER_AUREL_SIGNS.wallSign())); diff --git a/src/main/java/net/id/paradiselost/items/misc/NitraItem.java b/src/main/java/net/id/paradiselost/items/misc/NitraItem.java new file mode 100644 index 00000000..34de32bf --- /dev/null +++ b/src/main/java/net/id/paradiselost/items/misc/NitraItem.java @@ -0,0 +1,39 @@ +package net.id.paradiselost.items.misc; + +import net.id.paradiselost.entities.projectile.ThrownNitraEntity; +import net.id.paradiselost.util.ParadiseLostSoundEvents; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.projectile.thrown.SnowballEntity; +import net.minecraft.item.EnderPearlItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.sound.SoundCategory; +import net.minecraft.stat.Stats; +import net.minecraft.util.Hand; +import net.minecraft.util.TypedActionResult; +import net.minecraft.world.World; + +public class NitraItem extends Item { + public NitraItem(Settings settings) { + super(settings); + } + + public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + ItemStack itemStack = user.getStackInHand(hand); + world.playSound(null, user.getX(), user.getY(), user.getZ(), ParadiseLostSoundEvents.ENTITY_NITRA_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); + user.getItemCooldownManager().set(this, 10); + if (!world.isClient) { + ThrownNitraEntity nitraEntity = new ThrownNitraEntity(world, user); + nitraEntity.setItem(itemStack); + nitraEntity.setVelocity(user, user.getPitch(), user.getYaw(), 0.0F, 1.5F, 1.0F); + world.spawnEntity(nitraEntity); + } + + user.incrementStat(Stats.USED.getOrCreateStat(this)); + if (!user.getAbilities().creativeMode) { + itemStack.decrement(1); + } + + return TypedActionResult.success(itemStack, world.isClient()); + } +} diff --git a/src/main/java/net/id/paradiselost/mixin/entity/PotionEntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/PotionEntityMixin.java new file mode 100644 index 00000000..9d351988 --- /dev/null +++ b/src/main/java/net/id/paradiselost/mixin/entity/PotionEntityMixin.java @@ -0,0 +1,82 @@ +package net.id.paradiselost.mixin.entity; + +import net.id.paradiselost.util.BloomedCalciteUtil; +import net.minecraft.block.Blocks; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.entity.projectile.thrown.PotionEntity; +import net.minecraft.entity.projectile.thrown.ThrownItemEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionUtil; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.World; +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.CallbackInfo; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +@Mixin(PotionEntity.class) +public class PotionEntityMixin extends ThrownItemEntity { + + public PotionEntityMixin(EntityType entityType, World world) { + super(entityType, world); + } + + @Inject(method = "onBlockHit", at = @At("TAIL"), cancellable = true) + protected void onBlockHit(BlockHitResult blockHitResult, CallbackInfo ci) { + if (!this.world.isClient) { + ItemStack itemStack = this.getStack(); + List list = PotionUtil.getPotionEffects(itemStack); + boolean healingPotion = list.stream().anyMatch((e) -> e.getEffectType() == StatusEffects.INSTANT_HEALTH); + Direction direction = blockHitResult.getSide(); + BlockPos blockPos = blockHitResult.getBlockPos(); + BlockPos landBlock = blockPos.offset(direction); + if (healingPotion) { + List affected = new LinkedList<>(); + if (world.getBlockState(landBlock.up()).isOf(Blocks.CALCITE)) { + affected.add(landBlock.up()); + } + if (world.getBlockState(landBlock.down()).isOf(Blocks.CALCITE)) { + affected.add(landBlock.down()); + } + addIfValid(landBlock, affected); + addIfValid(landBlock.up(), affected); + addIfValid(landBlock.down(), affected); + for (Direction dir : Direction.Type.HORIZONTAL) { + addIfValid(landBlock.up().offset(dir), affected); + addIfValid(landBlock.down().offset(dir), affected); + } + for (BlockPos pos : new BlockPos[] {landBlock, landBlock.north(), landBlock.south()}) { + addIfValid(pos, affected); + addIfValid(pos.east(), affected); + addIfValid(pos.west(), affected); + } + if (!affected.isEmpty()) { + Collections.shuffle(affected); + BloomedCalciteUtil.applyHealing(this.getOwner(), world, affected.get(0), this.world.random, itemStack); + if (affected.size() > 1 && this.world.random.nextBoolean()) BloomedCalciteUtil.applyHealing(this.getOwner(), world, affected.get(1), this.world.random, itemStack); + } + } + + } + } + + private void addIfValid(BlockPos pos, List list) { + if (world.getBlockState(pos).isOf(Blocks.CALCITE)) { + list.add(pos); + } + } + + @Override + public Item getDefaultItem() { + return null; + } +} diff --git a/src/main/java/net/id/paradiselost/mixin/item/PotionItemMixin.java b/src/main/java/net/id/paradiselost/mixin/item/PotionItemMixin.java index db5e5773..1c0683e2 100644 --- a/src/main/java/net/id/paradiselost/mixin/item/PotionItemMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/item/PotionItemMixin.java @@ -1,10 +1,13 @@ package net.id.paradiselost.mixin.item; import net.id.paradiselost.blocks.ParadiseLostBlocks; +import net.id.paradiselost.util.BloomedCalciteUtil; +import net.kyrptonaught.customportalapi.mixin.portalLighters.PotionEntityMixin; import net.minecraft.advancement.criterion.Criteria; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.projectile.thrown.PotionEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUsage; import net.minecraft.item.ItemUsageContext; @@ -36,21 +39,10 @@ public void useOnBlock(ItemUsageContext context, CallbackInfoReturnable { protected final Ingredient ingredient; protected final ItemStack output; protected final Block tappedBlock; + protected final Block resultBlock; protected final int chance; - public TreeTapRecipe(Identifier id, String group, Ingredient ingredient, ItemStack output, Block tappedBlock, int chance) { + public TreeTapRecipe(Identifier id, String group, Ingredient ingredient, ItemStack output, Block tappedBlock, Block resultBlock, int chance) { this.id = id; this.group = group; this.ingredient = ingredient; this.output = output; this.tappedBlock = tappedBlock; + this.resultBlock = resultBlock; this.chance = chance; } @@ -53,6 +55,10 @@ public ItemStack getOutput() { return output; } + public Block getOutputBlock() { + return resultBlock; + } + @Override public String getGroup() { return group; diff --git a/src/main/java/net/id/paradiselost/recipe/TreeTapRecipeSerializer.java b/src/main/java/net/id/paradiselost/recipe/TreeTapRecipeSerializer.java index fac13b65..a652717c 100644 --- a/src/main/java/net/id/paradiselost/recipe/TreeTapRecipeSerializer.java +++ b/src/main/java/net/id/paradiselost/recipe/TreeTapRecipeSerializer.java @@ -14,25 +14,27 @@ public record TreeTapRecipeSerializer(TreeTapRecipeSerializer.RecipeFactory recipeFactory) implements RecipeSerializer { public interface RecipeFactory { - TreeTapRecipe create(Identifier id, String group, Ingredient ingredient, ItemStack output, Block tappedBlock, int chance); + TreeTapRecipe create(Identifier id, String group, Ingredient ingredient, ItemStack output, Block tappedBlock, Block resultBlock, int chance); } @Override public TreeTapRecipe read(Identifier identifier, JsonObject jsonObject) { String group = JsonHelper.getString(jsonObject, "group", ""); Ingredient ingredient = Ingredient.fromJson(JsonHelper.getObject(jsonObject, "ingredient")); - Block tappedBlock = Registry.BLOCK.get(Identifier.tryParse(JsonHelper.getString(jsonObject, "tapped_block"))); + Block tappedBlock = Registry.BLOCK.get(Identifier.tryParse(JsonHelper.getString(jsonObject, "tapped_block"))); + Block resultBlock = Registry.BLOCK.get(Identifier.tryParse(JsonHelper.getString(jsonObject, "result_block"))); ItemStack output = RecipeParser.getItemStackWithNbtFromJson(JsonHelper.getObject(jsonObject, "result")); int chance = JsonHelper.getInt(jsonObject, "chance"); - return this.recipeFactory.create(identifier, group, ingredient, output, tappedBlock, chance); + return this.recipeFactory.create(identifier, group, ingredient, output, tappedBlock, resultBlock, chance); } @Override public void write(PacketByteBuf packetByteBuf, TreeTapRecipe recipe) { packetByteBuf.writeString(recipe.group); recipe.ingredient.write(packetByteBuf); - packetByteBuf.writeIdentifier(Registry.BLOCK.getId(recipe.tappedBlock)); + packetByteBuf.writeIdentifier(Registry.BLOCK.getId(recipe.tappedBlock)); + packetByteBuf.writeIdentifier(Registry.BLOCK.getId(recipe.resultBlock)); packetByteBuf.writeItemStack(recipe.output); packetByteBuf.writeInt(recipe.chance); } @@ -41,11 +43,12 @@ public void write(PacketByteBuf packetByteBuf, TreeTapRecipe recipe) { public TreeTapRecipe read(Identifier identifier, PacketByteBuf packetByteBuf) { String group = packetByteBuf.readString(); Ingredient ingredient = Ingredient.fromPacket(packetByteBuf); - Block tappedBlock = Registry.BLOCK.get(packetByteBuf.readIdentifier()); + Block tappedBlock = Registry.BLOCK.get(packetByteBuf.readIdentifier()); + Block resultBlock = Registry.BLOCK.get(packetByteBuf.readIdentifier()); ItemStack output = packetByteBuf.readItemStack(); int chance = packetByteBuf.readInt(); - return this.recipeFactory.create(identifier, group, ingredient, output, tappedBlock, chance); + return this.recipeFactory.create(identifier, group, ingredient, output, tappedBlock, resultBlock, chance); } } diff --git a/src/main/java/net/id/paradiselost/tag/ParadiseLostBlockTags.java b/src/main/java/net/id/paradiselost/tag/ParadiseLostBlockTags.java index a76083e3..16004906 100644 --- a/src/main/java/net/id/paradiselost/tag/ParadiseLostBlockTags.java +++ b/src/main/java/net/id/paradiselost/tag/ParadiseLostBlockTags.java @@ -14,9 +14,9 @@ public class ParadiseLostBlockTags { public static final TagKey NON_FLOATERS = register("non_floaters"); public static final TagKey PUSH_FLOATERS = register("push_floaters"); public static final TagKey HURTABLE_FLOATERS = register("hurtable_floaters"); + public static final TagKey DECAYING_FLOATERS = register("decaying_floaters"); //Plants - public static final TagKey LICHEN_SPREADABLES = register("plants/lichen_spreadable"); public static final TagKey FUNGI_CLINGABLES = register("plants/fungi_clingable"); public static final TagKey GENERIC_VALID_GROUND = register("plants/generic_valid_ground"); public static final TagKey SWEDROOT_PLANTABLE = register("plants/swedroot_plantable"); diff --git a/src/main/java/net/id/paradiselost/util/BloomedCalciteUtil.java b/src/main/java/net/id/paradiselost/util/BloomedCalciteUtil.java new file mode 100644 index 00000000..7301e61e --- /dev/null +++ b/src/main/java/net/id/paradiselost/util/BloomedCalciteUtil.java @@ -0,0 +1,29 @@ +package net.id.paradiselost.util; + +import net.id.paradiselost.blocks.ParadiseLostBlocks; +import net.minecraft.advancement.criterion.Criteria; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.World; + +public class BloomedCalciteUtil { + + public static void applyHealing(Entity applier, World world, BlockPos blockPos, Random random, ItemStack itemStack) { + if (applier instanceof ServerPlayerEntity) { + Criteria.ITEM_USED_ON_BLOCK.trigger((ServerPlayerEntity)applier, blockPos, itemStack); + } + + world.setBlockState(blockPos, ParadiseLostBlocks.BLOOMED_CALCITE.getDefaultState()); + // particles + for (int i = 0; i < 16; i++) { + double xOffset = random.nextDouble(); + double yOffset = random.nextDouble(); + double zOffset = random.nextDouble(); + world.addParticle(ParticleTypes.ENTITY_EFFECT, blockPos.getX() + xOffset, blockPos.getY() + yOffset, blockPos.getZ() + zOffset, 0.97, 0.15, 0.14); + } + } +} diff --git a/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java b/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java index 8a3cd737..31a2bbd4 100644 --- a/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java +++ b/src/main/java/net/id/paradiselost/util/ParadiseLostSoundEvents.java @@ -66,6 +66,8 @@ private ParadiseLostSoundEvents() { public static final SoundEvent ENTITY_MOA_EGG_HATCH = childEvent("entity.moa.egg_hatch", SoundEvents.ENTITY_TURTLE_EGG_HATCH); public static final SoundEvent ENTITY_MOA_STEP = childEvent("entity.moa.step", SoundEvents.ENTITY_PIG_STEP); + public static final SoundEvent ENTITY_NITRA_THROW = childEvent("entity.nitra.throw", SoundEvents.ENTITY_SNOWBALL_THROW); + public static final SoundEvent ENTITY_NIGHTMARE_HURT = event("entity.nightmare.hurt"); public static final SoundEvent ENTITY_NIGHTMARE_DEATH = event("entity.nightmare.death"); public static final SoundEvent ENTITY_NIGHTMARE_AMBIENT = event("entity.nightmare.ambient"); diff --git a/src/main/resources/assets/paradise_lost/blockstates/frozen_path.json b/src/main/resources/assets/paradise_lost/blockstates/frozen_path.json new file mode 100644 index 00000000..0385b927 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/blockstates/frozen_path.json @@ -0,0 +1,13 @@ +{ + "variants": { + "": [ + { + "model": "paradise_lost:block/frozen_path" + }, + { + "model": "paradise_lost:block/frozen_path", + "y": 180 + } + ] + } +} diff --git a/src/main/resources/assets/paradise_lost/lang/en_us.json b/src/main/resources/assets/paradise_lost/lang/en_us.json index 81c8d6da..a3a8e7cd 100644 --- a/src/main/resources/assets/paradise_lost/lang/en_us.json +++ b/src/main/resources/assets/paradise_lost/lang/en_us.json @@ -32,7 +32,8 @@ "block.paradise_lost.permafrost": "Permafrost", "block.paradise_lost.levita": "Levita", "block.paradise_lost.farmland": "Paradise Farmland", - "block.paradise_lost.grass_path": "Paradise Grass Path", + "block.paradise_lost.grass_path": "Highlands Grass Path", + "block.paradise_lost.frozen_path": "Frozen Path", "block.paradise_lost.packed_swedroot": "Packed Swedroot", "block.paradise_lost.cold_cloud": "Cold Cloud", @@ -178,10 +179,6 @@ "block.paradise_lost.lavender_wisteria_sapling": "Lavender Wisteria Sapling", "block.paradise_lost.lavender_wisteria_hanger": "Lavender Wisteria Hangers", - "block.paradise_lost.boreal_wisteria_leaves": "Boreal Wisteria Leaves", - "block.paradise_lost.boreal_wisteria_sapling": "Boreal Wisteria Sapling", - "block.paradise_lost.boreal_wisteria_hanger": "Boreal Wisteria Hanger", - "block.paradise_lost.grass_plant": "Gale Grass", "block.paradise_lost.grass_flowering": "Flowering Gale Grass", "block.paradise_lost.short_grass": "Stubby Gale Grass", @@ -245,15 +242,11 @@ "entity.paradise_lost.floating_block": "Floating Block", - "entity.paradise_lost.hellenrose": "Hellenrose", "entity.paradise_lost.moa": "Moa", - "entity.paradise_lost.rook": "Rook", - "entity.paradise_lost.poison_dart": "Poison Dart", - "entity.paradise_lost.poison_needle": "Poison Needle", + "entity.paradise_lost.envoy": "Envoy", "item.paradise_lost.golden_amber": "Golden Amber", - "item.paradise_lost.hellenrose_petal": "Hellenrose Petal", "item.paradise_lost.nightmare_fuel": "Nightmare Fuel", "item.paradise_lost.nightmare_fuel.tooltip": "Warm to the touch", "item.paradise_lost.crow_eye": "Crow's Eye", @@ -322,7 +315,6 @@ "item.paradise_lost.amadrys_bread_glazed": "Glazed Amadrys Loaf", "item.paradise_lost.swedroot": "Swedroot", "item.paradise_lost.flaxseed" : "Flaxseed", - "item.paradise_lost.mystery_milk": "Mystery Milk", "item.paradise_lost.gingerbread_man": "Gingerbread Man", "item.paradise_lost.moa_meat": "Moa Chop", "item.paradise_lost.moa_meat_cooked": "Cooked Moa Chop", @@ -336,9 +328,6 @@ "item.paradise_lost.aurel_water_bucket": "Aurel Water Bucket", "item.paradise_lost.aurel_milk_bucket": "Aurel Milk Bucket", - "item.paradise_lost.vial": "Quicksoil Vial", - "item.paradise_lost.cloud_vial": "Cloud Vial", - "item.paradise_lost.hellenrose_spawn_egg": "Hellenrose Spawn Egg", "item.paradise_lost.envoy_spawn_egg": "Envoy Spawn Egg", "item.paradise_lost.moa_spawn_egg": "Moa Spawn Egg", @@ -410,9 +399,6 @@ "commands.paradise_lost.moastat.set": "Set %1$s to %2$s", "commands.paradise_lost.gravitate.failure" : "Couldn't float the block(s)", "commands.paradise_lost.gravitate.success" : "Successfully floated the block(s)", - "commands.paradise_lost.LUV.success.query" : "LUV%1$s", - "commands.paradise_lost.LUV.success.set" : "%1$s's LUV is now %2$s", - "commands.paradise_lost.LUV.failure.set" : "You have no right!", "commands.paradise_lost.lore.get.locked" : "locked", "commands.paradise_lost.lore.get.hidden" : "hidden", "commands.paradise_lost.lore.get.free" : "free", @@ -426,11 +412,6 @@ "info.paradise_lost.bloodstone.abstentine": "Peer into the soul", - "effect.paradise_lost.simmering": "Simmering", - - - "condition.paradise_lost.condition.venom": "Venom", - "subtitles.paradise_lost.block.blackcurrant_bush.pick_blueberries": "Blackcurrants pop", "subtitles.paradise_lost.block.portal.ambient": "Paradise portal whooshes", @@ -444,16 +425,6 @@ "subtitles.paradise_lost.block.orange_leaves.drop_fruit": "Orange leaves drop fruit", "subtitles.paradise_lost.block.orange_leaves.break_differently": "Orange leaves broken", - "subtitles.paradise_lost.block.lichen.spreads": "Lichen spreads", - - "subtitles.paradise_lost.block.spring_water.ambient": "Spring water flows", - "subtitles.paradise_lost.block.spring_water.ambient.2": "Spring water bubbles", - - "subtitles.paradise_lost.effect.simmering.simmer": "Entity simmers", - - "subtitles.paradise_lost.entity.hellenrose.death": "Hellenrose dies", - "subtitles.paradise_lost.entity.hellenrose.shoot": "Hellenrose shoots", - "subtitles.paradise_lost.entity.moa.ambient": "Moa chirps", "subtitles.paradise_lost.entity.moa.gliding": "Moa glides", "subtitles.paradise_lost.entity.moa.death": "Moa dies", @@ -462,12 +433,10 @@ "subtitles.paradise_lost.entity.moa.lay_egg": "Moa lays egg", "subtitles.paradise_lost.entity.moa.egg_hatch": "Moa egg hatches", "subtitles.paradise_lost.entity.moa.step": "Moa walks", - - "subtitles.paradise_lost.entity.nightmare.hurt": "Nightmare hurts", - "subtitles.paradise_lost.entity.nightmare.ambient": "Magpie coos", - "subtitles.paradise_lost.entity.nightmare.death": "Nightmare dissipates", - "subtitles.paradise_lost.entity.envoy.damage": "Envoy Chimes", + "subtitles.paradise_lost.entity.nitra.throw": "Nitra Flies", + + "subtitles.paradise_lost.entity.moa.step": "Moa walks", "subtitles.paradise_lost.item.armor.equip.olvite": "Olvite armor clanks", "subtitles.paradise_lost.item.armor.equip.glazed_gold": "Glazed Gold armor clinks", diff --git a/src/main/resources/assets/paradise_lost/models/block/frozen_path.json b/src/main/resources/assets/paradise_lost/models/block/frozen_path.json new file mode 100644 index 00000000..2fd13c63 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/frozen_path.json @@ -0,0 +1,9 @@ +{ + "parent": "block/dirt_path", + "textures": { + "particle": "paradise_lost:block/permafrost", + "top": "paradise_lost:block/frozen_path_top", + "side": "paradise_lost:block/frozen_path_side", + "bottom": "paradise_lost:block/permafrost" + } +} diff --git a/src/main/resources/assets/paradise_lost/models/item/frozen_path.json b/src/main/resources/assets/paradise_lost/models/item/frozen_path.json new file mode 100644 index 00000000..fcc81e39 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/item/frozen_path.json @@ -0,0 +1,3 @@ +{ + "parent": "paradise_lost:block/frozen_path" +} diff --git a/src/main/resources/assets/paradise_lost/textures/block/frozen_path_side.png b/src/main/resources/assets/paradise_lost/textures/block/frozen_path_side.png new file mode 100644 index 00000000..ed39002a Binary files /dev/null and b/src/main/resources/assets/paradise_lost/textures/block/frozen_path_side.png differ diff --git a/src/main/resources/assets/paradise_lost/textures/block/frozen_path_top.png b/src/main/resources/assets/paradise_lost/textures/block/frozen_path_top.png new file mode 100644 index 00000000..5a4482f1 Binary files /dev/null and b/src/main/resources/assets/paradise_lost/textures/block/frozen_path_top.png differ diff --git a/src/main/resources/assets/paradise_lost/textures/item/halflight_cheesecake.png b/src/main/resources/assets/paradise_lost/textures/item/halflight_cheesecake.png index bf610dc5..1b5aff35 100644 Binary files a/src/main/resources/assets/paradise_lost/textures/item/halflight_cheesecake.png and b/src/main/resources/assets/paradise_lost/textures/item/halflight_cheesecake.png differ diff --git a/src/main/resources/data/paradise_lost/loot_tables/blocks/frozen_path.json b/src/main/resources/data/paradise_lost/loot_tables/blocks/frozen_path.json new file mode 100644 index 00000000..f2fd467e --- /dev/null +++ b/src/main/resources/data/paradise_lost/loot_tables/blocks/frozen_path.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "paradise_lost:permafrost" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/paradise_lost/recipes/tree_tap/honey.json b/src/main/resources/data/paradise_lost/recipes/tree_tap/honey.json index ea7e0140..ade86c6c 100644 --- a/src/main/resources/data/paradise_lost/recipes/tree_tap/honey.json +++ b/src/main/resources/data/paradise_lost/recipes/tree_tap/honey.json @@ -4,6 +4,7 @@ "item": "minecraft:glass_bottle" }, "tapped_block": "minecraft:bee_nest", + "result_block": "minecraft:bee_nest", "result": { "item": "minecraft:honey_bottle" }, diff --git a/src/main/resources/data/paradise_lost/recipes/tree_tap/stew.json b/src/main/resources/data/paradise_lost/recipes/tree_tap/stew.json index 0b346c81..1f971c78 100644 --- a/src/main/resources/data/paradise_lost/recipes/tree_tap/stew.json +++ b/src/main/resources/data/paradise_lost/recipes/tree_tap/stew.json @@ -4,6 +4,7 @@ "item": "minecraft:bowl" }, "tapped_block": "minecraft:mushroom_stem", + "result_block": "minecraft:mushroom_stem", "result": { "item": "minecraft:mushroom_stew" }, diff --git a/src/main/resources/data/paradise_lost/recipes/tree_tap/water.json b/src/main/resources/data/paradise_lost/recipes/tree_tap/water.json index d845b093..07be2420 100644 --- a/src/main/resources/data/paradise_lost/recipes/tree_tap/water.json +++ b/src/main/resources/data/paradise_lost/recipes/tree_tap/water.json @@ -4,6 +4,7 @@ "item": "minecraft:glass_bottle" }, "tapped_block": "paradise_lost:wisteria_log", + "result_block": "paradise_lost:wisteria_log", "result": { "item": "minecraft:potion", "nbt": "{Potion: \"minecraft:water\"}" diff --git a/src/main/resources/data/paradise_lost/recipes/tree_tap/water_aurel_bucket.json b/src/main/resources/data/paradise_lost/recipes/tree_tap/water_aurel_bucket.json new file mode 100644 index 00000000..8e49825c --- /dev/null +++ b/src/main/resources/data/paradise_lost/recipes/tree_tap/water_aurel_bucket.json @@ -0,0 +1,12 @@ +{ + "type": "paradise_lost:tree_tap", + "ingredient": { + "item": "paradise_lost:aurel_bucket" + }, + "tapped_block": "paradise_lost:wisteria_log", + "result_block": "paradise_lost:wisteria_log", + "result": { + "item": "paradise_lost:aurel_water_bucket" + }, + "chance": 2 +} diff --git a/src/main/resources/data/paradise_lost/recipes/tree_tap/water_bucket.json b/src/main/resources/data/paradise_lost/recipes/tree_tap/water_bucket.json new file mode 100644 index 00000000..dcbb1ab8 --- /dev/null +++ b/src/main/resources/data/paradise_lost/recipes/tree_tap/water_bucket.json @@ -0,0 +1,12 @@ +{ + "type": "paradise_lost:tree_tap", + "ingredient": { + "item": "minecraft:bucket" + }, + "tapped_block": "paradise_lost:wisteria_log", + "result_block": "paradise_lost:wisteria_log", + "result": { + "item": "minecraft:water_bucket" + }, + "chance": 2 +} diff --git a/src/main/resources/data/paradise_lost/tags/blocks/decaying_floaters.json b/src/main/resources/data/paradise_lost/tags/blocks/decaying_floaters.json new file mode 100644 index 00000000..dab2ba9f --- /dev/null +++ b/src/main/resources/data/paradise_lost/tags/blocks/decaying_floaters.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "paradise_lost:levita", + "paradise_lost:levita_ore" + ] +} diff --git a/src/main/resources/data/paradise_lost/tags/blocks/mineable_by_shovel.json b/src/main/resources/data/paradise_lost/tags/blocks/mineable_by_shovel.json index aa8e425f..d282f0b4 100644 --- a/src/main/resources/data/paradise_lost/tags/blocks/mineable_by_shovel.json +++ b/src/main/resources/data/paradise_lost/tags/blocks/mineable_by_shovel.json @@ -3,6 +3,7 @@ "values": [ "paradise_lost:levita", "paradise_lost:grass_path", + "paradise_lost:frozen_path", "paradise_lost:farmland", "paradise_lost:levita_brick", "paradise_lost:levita_brick_slab", diff --git a/src/main/resources/paradise_lost.mixins.json b/src/main/resources/paradise_lost.mixins.json index bb870cb5..18dd8c09 100644 --- a/src/main/resources/paradise_lost.mixins.json +++ b/src/main/resources/paradise_lost.mixins.json @@ -17,6 +17,7 @@ "entity.EntityMixin", "entity.LivingEntityMixin", "entity.PiglinBrainMixin", + "entity.PotionEntityMixin", "entity.PlayerEntityMixin", "fluid.FlowableFluidMixin", "item.ArmorMaterialsAccessor",