Jump to content

[1.7.2] Making time of potion effect highter that 15 minutes.


Recommended Posts

I would suggest creating an IExtendEntityProperties for the player.

Create some custom effects, store them somewhere, and add them to a list in the extended properties when a player drinks a potion for example.

Create a method in your extended properties to be called onUpdate or something.

Use a tick event to call the method.

Check in the method for effects.

Do whatever you want to happen.



public class PlayerProperties implements IExtendedEntityProperties{

private EntityPlayer thePlayer;

private List<Effect> effects = new ArrayList();

public PlayerProperties(EntityPlayer player){
	thePlayer = player;

public void onUpdate(){

	for(int i = 0; i < effects.size(); i++){
		Effect effect = effects.get(i);

		if(effect.time == 0)

public void addEffect(int id, int time){
	effects.add(new Effect(id, time));


if you want more info on how to create IExtendedEntityProperties check out the tutorial from CoolAlias on the minecraft forum.

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.

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.

  • Create New...

Important Information

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