Some small fixes
This commit is contained in:
@@ -62,6 +62,10 @@ public class EntropyBlock extends Block {
|
|||||||
// 1d is roughly 4.5 blocks worth of upward velocity
|
// 1d is roughly 4.5 blocks worth of upward velocity
|
||||||
entity.addVelocity(randomVelocityX, randomVelocityY, randomVelocityZ);
|
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);
|
super.onSteppedOn(world, pos, state, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ import net.minecraft.entity.Entity;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.tooltip.TooltipType;
|
import net.minecraft.item.tooltip.TooltipType;
|
||||||
|
import net.minecraft.sound.SoundCategory;
|
||||||
|
import net.minecraft.sound.SoundEvents;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.Direction.AxisDirection;
|
import net.minecraft.util.math.Direction.AxisDirection;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.world.BlockView;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -30,11 +33,23 @@ public class StableEntropyBlock extends Block {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) {
|
public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) {
|
||||||
|
if (!entity.isInSneakingPose()){
|
||||||
// 1d is roughly 4.5 blocks worth of upward velocity
|
// 1d is roughly 4.5 blocks worth of upward velocity
|
||||||
entity.addVelocity(0d, 1d, 0d);
|
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
|
@Override
|
||||||
public void appendTooltip(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) {
|
public void appendTooltip(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"item.acesbs.prisma_steel_boots": "Prisma Steel Boots",
|
"item.acesbs.prisma_steel_boots": "Prisma Steel Boots",
|
||||||
"item.acesbs.prisma_armor_trim_smithing_template": "Prisma Smithing Template",
|
"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.prisma_steel_block": "Block of Prisma Steel",
|
||||||
"block.acesbs.entropy_ore": "Entropic Ore",
|
"block.acesbs.entropy_ore": "Entropic Ore",
|
||||||
"block.acesbs.stable_entropy_block": "Block of Stabilized Entropy",
|
"block.acesbs.stable_entropy_block": "Block of Stabilized Entropy",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"itemgroup.acesbs.tools": "Ace's BS Tools",
|
"itemgroup.acesbs.tools": "Ace's BS Tools",
|
||||||
|
|
||||||
"tooltip.acesbs.entropy_block.tooltip": "Exerts an §o§4uncertain force§r when stepped on.",
|
"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.shift_down": "§o§7Useless Item§r",
|
||||||
"tooltip.acesbs.green_bricks": "Hold §eShift§r for item description.",
|
"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.",
|
"tooltip.acesbs.entropy_block.tooltip2": "Has a 1/20 chance of turning an apple into a lemon.",
|
||||||
|
|||||||
Reference in New Issue
Block a user