Fix update stuff
Some checks failed
build / build (17, ubuntu-22.04) (push) Failing after 1m58s
build / build (17, windows-2022) (push) Has been cancelled

This commit is contained in:
Bruno Rybársky 2024-08-18 11:50:01 +02:00
parent da2d60bf72
commit 419a5ab607
4 changed files with 5 additions and 5 deletions

@ -7,7 +7,7 @@ minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.0
# Mod Properties
mod_version=1.1.8+1.21.1
mod_version=1.1.9
maven_group=systems.brn.televator
archives_base_name=televator
# Dependencies

@ -26,17 +26,17 @@ public class Televator implements ModInitializer {
// Check if the player is sneaking
if (player.isSneaking() && player.isOnGround()) {
BlockPos testPos = player.getBlockPos().down();
if(player.getWorld().getBlockState(testPos).getBlock() instanceof TelevatorBlock jumpVaderBlock) {
jumpVaderBlock.handleMovement(testPos, player, false);
if(player.getWorld().getBlockState(testPos).getBlock() instanceof TelevatorBlock televatorBlock) {
televatorBlock.handleMovement(testPos, player, false);
}
}
// Check if the player is jumping
if (player.getVelocity().y > 0 && !player.isOnGround()) {
BlockPos testPos = player.getBlockPos().down();
if(player.getWorld().getBlockState(testPos).getBlock() instanceof TelevatorBlock jumpVaderBlock)
if(player.getWorld().getBlockState(testPos).getBlock() instanceof TelevatorBlock televatorBlock)
{
jumpVaderBlock.handleMovement(testPos, player, true);
televatorBlock.handleMovement(testPos, player, true);
}
}
});