Skip to content

Commit

Permalink
Fix 1.20.5 compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Natan822 authored and nad2040 committed May 23, 2024
1 parent 44ea942 commit 8e969fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onInitialize() {
}

public static BlockPos VEC_3D_TO_POS(Vec3d vec3d) {
return new BlockPos(vec3d.x, vec3d.y, vec3d.z);
return new BlockPos((int)Math.round(vec3d.x), (int)Math.round(vec3d.y), (int)Math.round(vec3d.z));
}

public static void log(Hand hand, Hand other_hand, ItemStack usedItemStack, ItemStack otherItemStack, Vec3d position, Vec3d velocity) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/nad2040/elytrabombing/mixin/ItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.block.AnvilBlock;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.entity.TntEntity;
import net.minecraft.entity.player.PlayerEntity;
Expand Down Expand Up @@ -40,7 +41,7 @@ public void use(World world, PlayerEntity user, Hand hand, CallbackInfoReturnabl
world.playSound(null, tntEntity.getX(), tntEntity.getY(), tntEntity.getZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0f, 1.0f);
world.emitGameEvent(user, GameEvent.PRIME_FUSE, position);
if (!user.getAbilities().creativeMode) {
usedItemStack.damage(1, user, p -> p.sendToolBreakStatus(hand));
usedItemStack.damage(1, user, EquipmentSlot.MAINHAND);
otherItemStack.decrement(1);
}
user.incrementStat(Stats.USED.getOrCreateStat((FlintAndSteelItem) (Object) this));
Expand Down

0 comments on commit 8e969fc

Please sign in to comment.