Jump to content

Problem using getActivePotionEffect


BonusPlay3

Recommended Posts

I was trying to get effects level, but when i use:

 

if (par3EntityPlayer.isPotionActive(Potion.moveSpeed.id))
	{
		int i = (par3EntityPlayer.getActivePotionEffect(Potion.moveSpeed.id).getAmplifier());
		wantedVelocity += (1 + i) * (0.35);
	}

 

it crashes my game. Eclipse says:'The method getActivePotionEffect(Potion) in the type EntityLivingBase is not applicable for the arguments (int)'.

 

crash-2014-08-13_16.29.54-server.txt

 

 

---- Minecraft Crash Report ----

// You should try our sister game, Minceraft!

 

Time: 13.08.14 16:29

Description: Exception in server tick loop

 

java.lang.Error: Unresolved compilation problem:

The method getActivePotionEffect(Potion) in the type EntityLivingBase is not applicable for the arguments (int)

 

at com.bonusplay3.bonuscraft.item.ItemNitroBoots.onItemRightClick(ItemNitroBoots.java:39)

at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:166)

at net.minecraft.server.management.ItemInWorldManager.tryUseItem(ItemInWorldManager.java:345)

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:575)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247)

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:624)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:495)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:762)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_11, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 866706304 bytes (826 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.25.1199 Minecraft Forge 10.13.0.1199 5 mods loaded, 5 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{7.10.25.1199} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1199.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.13.0.1199} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1199.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BonusCraft{1.7.10-1.0} [bonusCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Baubles{1.0.1.3} [baubles] (Baubles-deobf-1.7.10-1.0.1.3.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Player Count: 1 / 8; [EntityPlayerMP['ForgeDevName'/0, l='New World', x=-1115,73, y=0,50, z=-749,06]]

Type: Integrated Server (map_client.txt)

Is Modded: Definitely; Client brand changed to 'fml,forge'

 

 

crash-2014-08-13_16.29.55-client.txt

 

 

---- Minecraft Crash Report ----

// I let you down. Sorry :(

 

Time: 13.08.14 16:29

Description: Unexpected error

 

java.lang.Error: Unresolved compilation problem:

The method getActivePotionEffect(Potion) in the type EntityLivingBase is not applicable for the arguments (int)

 

at com.bonusplay3.bonuscraft.item.ItemNitroBoots.onItemRightClick(ItemNitroBoots.java:39)

at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:166)

at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:434)

at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1556)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:2043)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038)

at net.minecraft.client.Minecraft.run(Minecraft.java:961)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:108)

at GradleStart.startClient(GradleStart.java:101)

at GradleStart.main(GradleStart.java:66)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at com.bonusplay3.bonuscraft.item.ItemNitroBoots.onItemRightClick(ItemNitroBoots.java:39)

at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:166)

at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:434)

at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1556)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['ForgeDevName'/0, l='MpServer', x=-1115,73, y=2,12, z=-749,06]]

Chunk stats: MultiplayerChunkCache: 435, 435

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: World: (-1099,4,-741), Chunk: (at 5,0,11 in -69,-47; contains blocks -1104,0,-752 to -1089,255,-737), Region: (-3,-2; contains chunks -96,-64 to -65,-33, blocks -1536,0,-1024 to -1025,255,-513)

Level time: 17416 game time, 1454 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false

Forced entities: 1 total; [EntityClientPlayerMP['ForgeDevName'/0, l='MpServer', x=-1115,73, y=2,12, z=-749,06]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567)

at net.minecraft.client.Minecraft.run(Minecraft.java:990)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at GradleStart.bounce(GradleStart.java:108)

at GradleStart.startClient(GradleStart.java:101)

at GradleStart.main(GradleStart.java:66)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_11, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 867930728 bytes (827 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.05 FML v7.10.25.1199 Minecraft Forge 10.13.0.1199 5 mods loaded, 5 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{7.10.25.1199} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1199.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.13.0.1199} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1199.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BonusCraft{1.7.10-1.0} [bonusCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Baubles{1.0.1.3} [baubles] (Baubles-deobf-1.7.10-1.0.1.3.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Launched Version: 1.7.10

LWJGL: 2.9.1

OpenGL: Mobile Intel® 4 Series Express Chipset Family GL version 2.1.0 - Build 8.15.10.2302, Intel

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because EXT_framebuffer_object is supported.

Anisotropic filtering is supported and maximum anisotropy is 2.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

 

 

Thanks for at least looking at my post :)

Link to comment
Share on other sites

That method does not want a potion id. Take off the '.id' and just pass the potion. It still may not work, however. You'll have to try it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • If you are using AMD/ATI, get the latest drivers from their website - do not update via system
    • So I don't have any other mods and I try to install my first mod. At first I tried turning on Forge but it didn't work for me. I entered into these logs and this is what debug I found.   [05maj2024 19:29:16.383] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, kod00, --version, 1.20.1-forge-47.2.30, --gameDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft, --assetsDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft\assets, --assetIndex, 5, --uuid, 0b6cb7d0d9794ea3995565e2c9e6961f, --accessToken, ????????, --clientId, ZmVhZDQ5MDEtODA2ZC00OTZhLTg1NWEtNDAzYzhmZGVhYzAx, --xuid, 2535448611541717, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\Tadeusz\AppData\Roaming\.minecraft\quickPlay\java\1714930153126.json, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.30, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [05maj2024 19:29:16.393] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0. 9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 10 arch amd64 version 10.0 [05maj2024 19:29:16.557] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [05maj2024 19:29:16.668] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6   -------------------------------------------------------------   [05maj2024 19:29:16.383] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, kod00, --version, 1.20.1-forge-47.2.30, --gameDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft, --assetsDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft\assets, --assetIndex, 5, --uuid, 0b6cb7d0d9794ea3995565e2c9e6961f, --accessToken, ????????, --clientId, ZmVhZDQ5MDEtODA2ZC00OTZhLTg1NWEtNDAzYzhmZGVhYzAx, --xuid, 2535448611541717, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\Tadeusz\AppData\Roaming\.minecraft\quickPlay\java\1714930153126.json, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.30, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [05maj2024 19:29:16.393] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 10 arch amd64 version 10.0 [05maj2024 19:29:16.428] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,forgegametestserverdev,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness,forgegametestserveruserdev] [05maj2024 19:29:16.448] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp] [05maj2024 19:29:16.468] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner] [05maj2024 19:29:16.485] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services [05maj2024 19:29:16.495] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path GAMEDIR is C:\Users\Tadeusz\AppData\Roaming\.minecraft [05maj2024 19:29:16.495] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path MODSDIR is C:\Users\Tadeusz\AppData\Roaming\.minecraft\mods [05maj2024 19:29:16.495] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path CONFIGDIR is C:\Users\Tadeusz\AppData\Roaming\.minecraft\config [05maj2024 19:29:16.495] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path FMLCONFIG is C:\Users\Tadeusz\AppData\Roaming\.minecraft\config\fml.toml [05maj2024 19:29:16.550] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services:  [05maj2024 19:29:16.557] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [05maj2024 19:29:16.668] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6   Can you help me with this?
    • So I don't have any other mods and I try to install my first mod. At first I tried turning on Forge but it didn't work for me. I entered into these logs and this is what debug I found.   [05maj2024 19:29:16.383] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, kod00, --version, 1.20.1-forge-47.2.30, --gameDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft, --assetsDir, C:\Users\Tadeusz\AppData\Roaming\.minecraft\assets, --assetIndex, 5, --uuid, 0b6cb7d0d9794ea3995565e2c9e6961f, --accessToken, ????????, --clientId, ZmVhZDQ5MDEtODA2ZC00OTZhLTg1NWEtNDAzYzhmZGVhYzAx, --xuid, 2535448611541717, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\Tadeusz\AppData\Roaming\.minecraft\quickPlay\java\1714930153126.json, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.30, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [05maj2024 19:29:16.393] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0. 9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 10 arch amd64 version 10.0 [05maj2024 19:29:16.557] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [05maj2024 19:29:16.668] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6   Can you help me with this?  
    • Thank you so, so much for your help! I have implemented the code from the example you gave me and it has been excepted, the only downside currently being that the game crashes on launch, saying:  Caused by: java.lang.IllegalStateException: Cannot register new entries to DeferredRegister after RegisterEvent has been fired.  (Three times) and  Caused by: java.lang.ExceptionInInitializerError (Two times) With further scanning I have found this error: 2024-05-05T18:41:24.287+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] I am not exactly sure what to do with these errors but I am sure I can resolve them. Once again, thank you for your help! It is much appreciated. 😁
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.