From 4938b5675eefd0e40add79d5f5177810b4c043f8 Mon Sep 17 00:00:00 2001 From: Vos Date: Mon, 10 Nov 2025 23:11:58 -0600 Subject: [PATCH] Some small fixes --- .../acesbs/block/custom/EntropyBlock.java | 4 ++++ .../block/custom/StableEntropyBlock.java | 21 ++++++++++++++++--- .../resources/assets/acesbs/lang/en_us.json | 4 ++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropyBlock.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropyBlock.java index c15fa1b..12493ed 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropyBlock.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropyBlock.java @@ -62,6 +62,10 @@ public class EntropyBlock extends Block { // 1d is roughly 4.5 blocks worth of upward velocity entity.addVelocity(randomVelocityX, randomVelocityY, randomVelocityZ); + if(entity instanceof PlayerEntity){ + world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_HURT, SoundCategory.BLOCKS, 10f, 0.4f); + } + super.onSteppedOn(world, pos, state, entity); } diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/StableEntropyBlock.java b/src/main/java/com/acethewildfire/acesbs/block/custom/StableEntropyBlock.java index 157f66b..4ced6f8 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/StableEntropyBlock.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/StableEntropyBlock.java @@ -7,11 +7,14 @@ import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.tooltip.TooltipType; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction.AxisDirection; import net.minecraft.util.math.Vec3d; +import net.minecraft.world.BlockView; import net.minecraft.world.World; import java.util.List; @@ -30,10 +33,22 @@ public class StableEntropyBlock extends Block { @Override public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) { - // 1d is roughly 4.5 blocks worth of upward velocity - entity.addVelocity(0d, 1d, 0d); + if (!entity.isInSneakingPose()){ + // 1d is roughly 4.5 blocks worth of upward velocity + entity.addVelocity(0d, 1d, 0d); + world.playSound(entity, pos, SoundEvents.ENTITY_ENDERMAN_AMBIENT, SoundCategory.BLOCKS, 10f, 0.4f); + super.onSteppedOn(world, pos, state, entity); + } + } - super.onSteppedOn(world, pos, state, entity); + @Override + public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { + // Never take fall damage + if (entity.bypassesLandingEffects()) { + super.onLandedUpon(world, state, pos, entity, 0); + } else { + entity.handleFallDamage(fallDistance, 0.0F, world.getDamageSources().fall()); + } } @Override diff --git a/src/main/resources/assets/acesbs/lang/en_us.json b/src/main/resources/assets/acesbs/lang/en_us.json index 8b89bcb..fc6c4ba 100644 --- a/src/main/resources/assets/acesbs/lang/en_us.json +++ b/src/main/resources/assets/acesbs/lang/en_us.json @@ -26,7 +26,7 @@ "item.acesbs.prisma_steel_boots": "Prisma Steel Boots", "item.acesbs.prisma_armor_trim_smithing_template": "Prisma Smithing Template", - "block.acesbs.entropy_block": "Block of Entropy", + "block.acesbs.entropy_block": "Block of Raw Entropy", "block.acesbs.prisma_steel_block": "Block of Prisma Steel", "block.acesbs.entropy_ore": "Entropic Ore", "block.acesbs.stable_entropy_block": "Block of Stabilized Entropy", @@ -52,7 +52,7 @@ "itemgroup.acesbs.tools": "Ace's BS Tools", "tooltip.acesbs.entropy_block.tooltip": "Exerts an §o§4uncertain force§r when stepped on.", - "tooltip.acesbs.stable_entropy_block.tooltip": "Exerts an §o§2upward force§r when stepped on.", + "tooltip.acesbs.stable_entropy_block.tooltip": "Exerts an §o§2upward force§r of 4.5 blocks when stepped on.", "tooltip.acesbs.green_bricks.shift_down": "§o§7Useless Item§r", "tooltip.acesbs.green_bricks": "Hold §eShift§r for item description.", "tooltip.acesbs.entropy_block.tooltip2": "Has a 1/20 chance of turning an apple into a lemon.",