Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: launchProjectile (because of SpawnCause update) #1135

Closed
Lucurious opened this issue Mar 11, 2016 · 4 comments
Closed

Bug: launchProjectile (because of SpawnCause update) #1135

Lucurious opened this issue Mar 11, 2016 · 4 comments
Assignees

Comments

@Lucurious
Copy link

The launchProjectile method from ProjectileSource is most definitely bugged after the update of the SpawnCause from the new API, because when I try to use it I get this:

[15:18:35] [Server thread/ERROR] [Sponge]: Could not pass InteractBlockEvent$Secondary$Impl to Plugin{id=test, name=Test, version=0.01, source=mods\test-0.01.jar}
java.lang.IllegalArgumentException: The cause does not have a SpawnCause! It has instead: {} [EntityPlayerMP['Lucurious'/262, l='world', x=-89.61, y=70.00, z=257.36]]
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148) ~[minecraft_server.1.8.9.jar:?]
    at org.spongepowered.common.event.SpongeCommonEventFactory.checkSpawnEvent(SpongeCommonEventFactory.java:696) ~[SpongeCommonEventFactory.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher.doLaunch(ProjectileLauncher.java:237) ~[ProjectileLauncher.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher.access$200(ProjectileLauncher.java:88) ~[ProjectileLauncher.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher$4.createProjectile(ProjectileLauncher.java:321) ~[ProjectileLauncher$4.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher$SimpleEntityLaunchLogic.launch(ProjectileLauncher.java:121) ~[ProjectileLauncher$SimpleEntityLaunchLogic.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher$SimpleItemLaunchLogic.launch(ProjectileLauncher.java:166) ~[ProjectileLauncher$SimpleItemLaunchLogic.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.entity.projectile.ProjectileLauncher.launch(ProjectileLauncher.java:178) ~[ProjectileLauncher.class:1.8.9-4.1.0-BETA-263]
    at net.minecraft.entity.player.EntityPlayerMP.launchProjectile(SourceFile:54) ~[lf.class:?]
    at nu.apiary.Main.Events.CheckTItemUse.onRightClick(CheckTItemUse.java:48) ~[CheckTItemUse.class:?]
    at org.spongepowered.common.event.listener.InteractEventListener_CheckTItemUse_onRightClick5.handle(Unknown Source) ~[?:?]
    at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:86) ~[RegisteredListener.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:258) [SpongeEventManager.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:269) [SpongeEventManager.class:1.8.9-4.1.0-BETA-263]
    at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:130) [SpongeImpl.class:1.8.9-4.1.0-BETA-263]
    at net.minecraft.network.NetHandlerPlayServer.redirect$tryUseItem$0(SourceFile:144) [lm.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147346_a(SourceFile:503) [lm.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:59) [ja.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:10) [ja.class:?]
    at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:106) [PacketUtil.class:1.8.9-4.1.0-BETA-263]
    at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$0(SourceFile:51) [fh$1.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fh$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_74]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_74]
    at net.minecraft.util.Util.func_181617_a(SourceFile:44) [g.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:143) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299) [ko.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(SourceFile:451) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_74]
@Lucurious Lucurious changed the title Bug: launchProjectile Bug: launchProjectile (because of SpawnCause update) Mar 11, 2016
@gabizou gabizou self-assigned this Apr 2, 2016
@simon816
Copy link
Contributor

This was fixed by SpongePowered/Sponge@8964280

@simon816
Copy link
Contributor

Actually, not completely. I'll fix the rest of the causes soon

@ryantheleach
Copy link
Contributor

Open then as a reminder?

simon816 added a commit to SpongePowered/Sponge that referenced this issue Apr 15, 2016
…, fixes SpongePowered/SpongeAPI#1135

* Fix cause source not being a SpawnCause
* Fix SmallFireball default angle incorrect
* Fix Firework having lifetime of 0
* Fix some projectiles spawning from entity foot instead of head
@simon816
Copy link
Contributor

Fixed in SpongePowered/Sponge@bc26fde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants