mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Remove handed-bias from mana bursts to match vanilla bows, fixes #2983
This commit is contained in:
1 parent
2b21223981
commit
72711501d7
3 files changed
+3
-10
No files matched your search
@@ -148,16 +148,12 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
|
||||
setBurstMotion(mx, my, mz);
|
||||
}
|
||||
|
||||
public EntityManaBurst(PlayerEntity player, Hand hand) {
|
||||
public EntityManaBurst(PlayerEntity player) {
|
||||
super(TYPE, player, player.world);
|
||||
|
||||
setBurstSourceCoords(new BlockPos(0, -1, 0));
|
||||
setRotation(player.rotationYaw + 180, -player.rotationPitch);
|
||||
|
||||
double dX = (hand == Hand.OFF_HAND ? -1 : 1) * MathHelper.cos((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F;
|
||||
double dZ = (hand == Hand.OFF_HAND ? -1 : 1) * MathHelper.sin((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F;
|
||||
|
||||
setPosition(posX - dX, posY, posZ - dZ);
|
||||
float f = 0.4F;
|
||||
double mx = MathHelper.sin(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI) * f / 2D;
|
||||
double mz = -(MathHelper.cos(rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float) Math.PI) * f) / 2D;
|
||||
|
||||
@@ -150,7 +150,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
|
||||
}
|
||||
|
||||
private EntityManaBurst getBurst(PlayerEntity player, ItemStack stack, boolean request, Hand hand) {
|
||||
EntityManaBurst burst = new EntityManaBurst(player, hand);
|
||||
EntityManaBurst burst = new EntityManaBurst(player);
|
||||
BurstProperties props = getBurstProps(player, stack, request, hand);
|
||||
|
||||
burst.setSourceLens(getLens(stack));
|
||||
|
||||
+1
-4
@@ -15,7 +15,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.projectile.ThrowableEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
@@ -28,7 +27,6 @@ import vazkii.botania.api.internal.IManaBurst;
|
||||
import vazkii.botania.api.mana.BurstProperties;
|
||||
import vazkii.botania.api.mana.ILensEffect;
|
||||
import vazkii.botania.common.core.handler.ModSounds;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.entity.EntityManaBurst;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
|
||||
@@ -36,7 +34,6 @@ import vazkii.botania.common.network.PacketHandler;
|
||||
import vazkii.botania.common.network.PacketLeftClick;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ItemTerraSword extends ItemManasteelSword implements ILensEffect {
|
||||
|
||||
@@ -78,7 +75,7 @@ public class ItemTerraSword extends ItemManasteelSword implements ILensEffect {
|
||||
}
|
||||
|
||||
public EntityManaBurst getBurst(PlayerEntity player, ItemStack stack) {
|
||||
EntityManaBurst burst = new EntityManaBurst(player, Hand.MAIN_HAND);
|
||||
EntityManaBurst burst = new EntityManaBurst(player);
|
||||
|
||||
float motionModifier = 7F;
|
||||
|
||||
|
||||
Reference in new issue
Block a user