mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Fixed the Rod of the Unstable Reservoir not dealing player damage.
This commit is contained in:
1 parent
081e6e243f
commit
7d93993a94
3 files changed
+11
-1
No files matched your search
@@ -13,10 +13,12 @@ package vazkii.botania.common.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.mana.IManaCollisionGhost;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
@@ -39,6 +41,11 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
super(world);
|
||||
setSize(0F, 0F);
|
||||
}
|
||||
|
||||
public EntityMagicMissile(EntityPlayer player) {
|
||||
this(player.worldObj);
|
||||
ReflectionHelper.setPrivateValue(EntityThrowable.class, this, player, LibObfuscation.THROWER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ItemMissileRod extends ItemMod implements IManaUsingItem {
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
if(count != getMaxItemUseDuration(stack) && count % 2 == 0 && !player.worldObj.isRemote && ManaItemHandler.requestManaExact(stack, player, COST_PER, false)) {
|
||||
EntityMagicMissile missile = new EntityMagicMissile(player.worldObj);
|
||||
EntityMagicMissile missile = new EntityMagicMissile(player);
|
||||
missile.setPosition(player.posX + (Math.random() - 0.5 * 0.1), player.posY + 2.4 + (Math.random() - 0.5 * 0.1), player.posZ + (Math.random() - 0.5 * 0.1));
|
||||
if(missile.getTarget()) {
|
||||
player.worldObj.playSoundAtEntity(player, "botania:missile", 0.6F, 0.8F + (float) Math.random() * 0.2F);
|
||||
|
||||
@@ -66,5 +66,8 @@ public final class LibObfuscation {
|
||||
|
||||
// GuiIngame
|
||||
public static final String[] REMAINING_HIGHLIGHT_TICKS = new String[] { "remainingHighlightTicks", "field_92017_k", "r" };
|
||||
|
||||
// EntityThrowable
|
||||
public static final String[] THROWER = new String[] { "thrower", "field_70192_c", "g" };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user