Skip to content

Commit

Permalink
3.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Aug 24, 2024
1 parent fd47cbc commit 2c9e0ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ neogradle.subsystems.parchment.mappingsVersion=2024.07.07

# Irons Mod
mod_id=irons_spellbooks
mod_version=1.21-3.4.4
mod_version=1.21-3.4.5
mod_group_id=io.redspace

# Irons mods.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import top.theillusivec4.curios.api.CuriosApi;
Expand Down Expand Up @@ -71,7 +72,9 @@ private boolean canUse(LivingEntity livingEntity) {
}

private void createItemEntity(Level level, ItemStack stack, Vec3 center) {
Vec3 placement = Utils.moveToRelativeGroundLevel(level, center.add(new Vec3(Utils.random.nextIntBetweenInclusive(4, 8) + Utils.random.nextFloat(), 0, 0).yRot(Utils.random.nextFloat() * Mth.TWO_PI)), 5).add(0, 0.75, 0);
Vec3 target = center.add(new Vec3(Utils.random.nextIntBetweenInclusive(4, 8) + Utils.random.nextFloat(), 0, 0).yRot(Utils.random.nextFloat() * Mth.TWO_PI));
Vec3 clipped = Utils.raycastForBlock(level,center.add(0,0.5,0),target.add(0,0.5,0), ClipContext.Fluid.NONE).getLocation();
Vec3 placement = Utils.moveToRelativeGroundLevel(level, clipped, 5).add(0, 0.75, 0);
var item = new ItemEntity(level, placement.x, placement.y, placement.z, stack);
level.addFreshEntity(item);
MagicManager.spawnParticles(level, ParticleHelper.UNSTABLE_ENDER, placement.x, placement.y, placement.z, 20, 0.2, 0.2, 0.2, 0.2, false);
Expand Down

0 comments on commit 2c9e0ab

Please sign in to comment.