Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.7.2][API] Player API


  • Please log in to reply
1607 replies to this topic

#1

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 24 October 2011 - 05:16 PM

*
POPULAR

Player API gives third party mods managed access to the main player class

Player API is an API which provides access to
  • the client class "EntityPlayerSP" aka "blc" or
  • the server class "EntityPlayerMP" aka "mm" or
  • the bukkit class "EntityPlayer"
while minimizing conflicts between mods.



Current Versions:

Vanilla
Will be created on demand.

Core 1.2 (for Minecraft Forge 1.7.2 and MCPC+ 1.7.2)
Added source package: Download from Mediafire or Dropbox

Bukkit
Previous versions of Player API bukkit can be found below.




Installation:

For installation instructions:
  • make sure you download the right file:
    • Vanilla for mods on a vanilla (non Minecraft Forge) client/server.
    • Forge for mods on a Minecraft Forge client/server.
    • Bukkit for bukkit plugins.
    • MCPC+ for mods on a MCPC+ server.
  • read the "installation" section of your download's readme files
Incompatibilities
  • Player API is compatible with Minecraft Forge, just install Player API after Minecraft Forge.
    WARNING this does only work before Minecraft 1.6.1.
    For Minecraft 1.6.1 and later use Player API forge.


FAQs:

Spoiler:

Developing:

If you require more hooks or access methods to make your mod work with Player API, you can either send me a private message or post here.

The additional code should then be in the next release.

Step by Step: Mod Adaption

Spoiler:

Step by Step: Mod Creation

Spoiler:

Example: Mod Structure

Spoiler:




Usage:

This API is currently used by the following mods:


Previous Versions:

Previous Versions (for Minecraft 1.7.2)

Core 1.1
Added server hook "canBreatheUnderwater": Download from Mediafire or Dropbox

Core 1.0
Created Player API core for Minecraft 1.7.2: Download from Mediafire or Dropbox



Previous Versions (for Minecraft 1.6.4)

Spoiler:


Previous Versions (for Minecraft 1.6.2)

Spoiler:


Previous Versions (for Minecraft 1.6.1)

Spoiler:


Previous Versions (for Minecraft 1.5.2)

Spoiler:


Previous Versions (for Minecraft 1.5.1)

Spoiler:


Previous Versions (for Minecraft 1.5)

Spoiler:


Previous Versions (for Minecraft 1.4.7)

Spoiler:


Previous Versions (for Minecraft 1.4.6)

Spoiler:


Previous Versions (for Minecraft 1.4.5)

Spoiler:


Previous Versions (for Minecraft 1.4.4)

Spoiler:


Previous Versions (for Minecraft 1.4.2)

Spoiler:


Previous Versions (for Minecraft 1.3.2)

Spoiler:


Previous Versions (for Minecraft 1.3.1)

Spoiler:


Previous Versions (for Minecraft 1.2.5)

Spoiler:


Previous Versions (for Minecraft 1.2.4)

Spoiler:


Previous Versions (for Minecraft 1.2.3)

Spoiler:


Previous Versions (for Minecraft 1.1)

Spoiler:


Previous Versions (for Minecraft 1.0.0)

Spoiler:


Previous Versions (for Minecraft Beta 1.8.1)

Spoiler:


Previous Versions (for Minecraft Beta 1.7.3)

Spoiler:

Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

Register or log in to remove.

#2

Delta565
    Delta565

    Nether Resident

  • Members
  • 2077 posts
  • Location: Trapped with AZilla2498 in a world that does not exist.
  • Minecraft: delta565

Posted 24 October 2011 - 05:18 PM

Yey!
Thank you for that :)
Here  :Diamond:
Posted Image

#3

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 24 October 2011 - 06:45 PM

Released client version 1.3 - Improved null handling of hook "rayTrace".
Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

#4

kaimarohero
  • Minecraft: kaimarohero

Posted 24 October 2011 - 06:52 PM

So, with this.. it's possible to control a connected client with the mod class installed, if you have the plugin installed on the server? :P
Posted Image

#5

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 24 October 2011 - 08:58 PM

View Postkaimarohero, on 24 October 2011 - 06:52 PM, said:

So, with this.. it's possible to control a connected client with the mod class installed, if you have the plugin installed on the server? :P
No, it's just a class access API.

Client and server part are strictly seperated. They are two different APIs that somehow happen to do the same thing - one at the client, the other one at the server.
Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

#6

leonardo2009

Posted 26 October 2011 - 09:53 AM

It's The Best mod  ;)

#7

BlueCreeper
  • Location: Hanging on TrintaCraft
  • Minecraft: Blueboy2001

Posted 28 October 2011 - 04:09 AM

I get a black screen after Mojang appears.  I have Flan's Planes, Vehicles, and Guns on, and I'm trying to get the Aether mod.  This is my second to last requirement (AudioMod).  :VV:
Posted Image

#8

pwnedgod
    pwnedgod

    Void Walker

  • Members
  • 1843 posts
  • Location: ಠ_ಠ McF ಠ_ಠ
  • Minecraft: pwnedgod

Posted 30 October 2011 - 10:34 AM

View PostBlueCreeper, on 28 October 2011 - 04:09 AM, said:

I get a black screen after Mojang appears.  I have Flan's Planes, Vehicles, and Guns on, and I'm trying to get the Aether mod.  This is my second to last requirement (AudioMod).  :VV:

Use this to get a error report and paste it here.
Too addicted with Counter-Strike: Source for some reason...
Posted Image

#9

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 30 October 2011 - 02:59 PM

View PostBlueCreeper, on 28 October 2011 - 04:09 AM, said:

I get a black screen after Mojang appears.  I have Flan's Planes, Vehicles, and Guns on, and I'm trying to get the Aether mod.  This is my second to last requirement (AudioMod).  :VV:
Can you give me some more information?

Like:
  • your Minecraft version
  • your Player API version
  • the mod versions of all these mods
  • the complete startup output from the client's terminal window
  • the complete error message including it's stack trace

Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

#10

BlueCreeper
  • Location: Hanging on TrintaCraft
  • Minecraft: Blueboy2001

Posted 02 November 2011 - 02:07 AM

View PostDivisor, on 30 October 2011 - 02:59 PM, said:

Can you give me some more information?

Like:
  • your Minecraft version
  • your Player API version
  • the mod versions of all these mods
  • the complete startup output from the client's terminal window
  • the complete error message including it's stack trace

-MineCraft 1.8.1.
-Client 1.3.
-Planes v16, Vehicles v4, WW2 Guns v3.
I'll look at the other ones.  Thanks pwnedgod, now I know what they mean with the error log thing.  Just got to reinstall, lost my .jar file.    :,,,,:
Posted Image

#11

BseagullMC

Posted 02 November 2011 - 02:39 AM

what does it actually do?
Posted Image

#12

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 02 November 2011 - 07:43 AM

View PostBseagullMC, on 02 November 2011 - 02:39 AM, said:

what does it actually do?
It solves parallel file overwriting incompatibility issues between mods for the client file qs.class and the server file ek.class. Of course the corresponding mods need to actively outsource their file overwriting functionality to the Player API and therefore depend on it to make it work.
Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

#13

Binkan Salaryman
  • Location: 〔 文 _ 文 〕
  • Minecraft: runee

Posted 02 November 2011 - 07:52 AM

View PostDivisor, on 24 October 2011 - 08:58 PM, said:

No, it's just a class access API.

Client and server part are strictly seperated. They are two different APIs that somehow happen to do the same thing - one at the client, the other one at the server.

Well... If it is managed to work with Player Model API (click signature)
then it would be sooo awesome :) But - I am not really fit in entity thing :'(

So, can you explain me how to use your api?

Posted Image


#14

pwnedgod
    pwnedgod

    Void Walker

  • Members
  • 1843 posts
  • Location: ಠ_ಠ McF ಠ_ಠ
  • Minecraft: pwnedgod

Posted 02 November 2011 - 08:11 AM

View PostBinkan Salaryman, on 02 November 2011 - 07:52 AM, said:

Well... If it is managed to work with Player Model API (click signature)
then it would be sooo awesome :) But - I am not really fit in entity thing :'(

So, can you explain me how to use your api?

Actually. Player Model API should use Player API instead.
Too addicted with Counter-Strike: Source for some reason...
Posted Image

#15

Binkan Salaryman
  • Location: 〔 文 _ 文 〕
  • Minecraft: runee

Posted 02 November 2011 - 08:18 AM

View Postpwnedgod, on 02 November 2011 - 08:11 AM, said:

Actually. Player Model API should use Player API instead.

See it as you like... My mod has its root in the render files and doesn't modify entity files.
That makes it very compatible. But of course I can't fulfill the wishes of the thread posters
spamming "DON'T MAKE ONLY THE MODEL OMG!!" with that. If you are all in all a good modder we
should really work together and make a mod for switching to all possible mobs...

Posted Image


#16

Divisor
    Divisor

    Void Walker

  • Members
  • 1540 posts

Posted 02 November 2011 - 09:35 PM

View PostBinkan Salaryman, on 02 November 2011 - 07:52 AM, said:

... So, can you explain me how to use your api?
I had a look at your Player Model API mod. It does not override qs.class so it currently has no use for the Player API mod.

If you are planning to continue developing your mod so that it has to overwrite qs.class to function correctly, you might find the Player API mod very useful to outsource this critical code.

To do so:
  • decompile the latest version of the Player API client mod into your programming environment
  • create a new class extending the class PlayerBase
  • put all your code from EntityPlayerSP into this class
  • make sure to register your class using PlayerAPI.RegisterPlayerBase before the first player entity is created (doing this in a ModLoader mod class constructor is normally a good choice)
  • make your class work
    • make sure you are overwriting the right method
    • make sure calling the right methods of the new EntityPlayerSP class
    • if you are missing methods or functionality send me a private message describing the additionaly needs of your mod
  • recompile your code as usual
  • make sure to exclude qs.class and all Player API classes from your own mod package

View PostBinkan Salaryman, on 02 November 2011 - 08:18 AM, said:

See it as you like... My mod has its root in the render files and doesn't modify entity files.
That makes it very compatible. But of course I can't fulfill the wishes of the thread posters
spamming "DON'T MAKE ONLY THE MODEL OMG!!" with that. If you are all in all a good modder we
should really work together and make a mod for switching to all possible mobs...
What specifically do those posters want you to add to your mod?
Posted Image
Not Minecraft-related, I know - but the author wants more readers - and to be honest, he deserves them!

#17

Binkan Salaryman
  • Location: 〔 文 _ 文 〕
  • Minecraft: runee

Posted 04 November 2011 - 03:53 AM

View PostDivisor, on 02 November 2011 - 09:35 PM, said:

What specifically do those posters want you to add to your mod?

Well.. they have MANY ideas... Look here:

Spoiler:


That would require a total change, don't it?
For every player a render, model and entity extended class + a way to put them together...

Posted Image


#18

dirtbikerty99

Posted 07 November 2011 - 12:48 AM

View Postpwnedgod, on 30 October 2011 - 10:34 AM, said:

Use this to get a error report and paste it here.

i am gonna sound like a nube but how do you copy? :P
I'd rahter try and fail than not try at all.
- Travis Pastrana

#19

pwnedgod
    pwnedgod

    Void Walker

  • Members
  • 1843 posts
  • Location: ಠ_ಠ McF ಠ_ಠ
  • Minecraft: pwnedgod

Posted 07 November 2011 - 01:19 PM

Can you make a Better than wolves compatibility patch? After a recent update BTW edits the qs.class.

_______________________________________________________________________________________

View Postdirtbikerty99, on 07 November 2011 - 12:48 AM, said:

i am gonna sound like a nube but how do you copy? :P

Nevermind use this instead and if the error window appears copy and paste it here:
http://www.mediafire...s2t39voa4nala6r
Too addicted with Counter-Strike: Source for some reason...
Posted Image

#20

dirtbikerty99

Posted 07 November 2011 - 05:56 PM

View Postpwnedgod, on 07 November 2011 - 01:19 PM, said:

Can you make a Better than wolves compatibility patch? After a recent update BTW edits the qs.class.

_______________________________________________________________________________________



Nevermind use this instead and if the error window appears copy and paste it here:
http://www.mediafire...s2t39voa4nala6r
how do you copy the error report???
I'd rahter try and fail than not try at all.
- Travis Pastrana