Posted November 4, 201311 yr I am under the impression that I can change the qualities of the airBlock. The problem is that I cannot find where the airblock is defined so that I can look into it. It is not in the Block class but you can find the isAirBlock Method in many different places. At first I tried to make the block null and replace it with a custom block of my own. This doesn't even let you load into minecraft. My goal is to make is fo that under certain conditions you will get a poison effect from just "breathing" the air. If you have some helpfull suggestions I would be glad to hear them. Thanks.
November 4, 201311 yr Well, this would depend greatly on what you want to trigger the poison effect. You could use player ticks, Forge Events, and custom potion effects that check if the player is in air. Could you give some more insight on how you want to activate the effect?
November 4, 201311 yr Author The end goal is if(player is above lvl 30 && player is on surface) { ((EntityPlayer)Entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 20, 2)); } This could be activated if the player is walking I guess, that would probably be the easiest, but I want to make it that the player gets the effect even if they are standing still. I know how to attatch an effect to a block that the player walks on but I thought that is would be easier this way if its possible.
November 4, 201311 yr Well, I don't know much about tick handlers but it seems that you could either use a player tick handler or the EntityLiving event. You can check the Tutorials tab on the forum's main page for a link to getting started with events. Other than that, you seem like you know how to add a potioneffect, so you should be fine.
November 5, 201311 yr Yeah a tick handler would DEFINITELY be the best option IMO, this is more or less what they're made to do, so I suggest you give them a look. Creator of Metroid Cubed! Power Suits, Beams, Hypermode and more! http://i.imgur.com/ghgWmA3.jpg[/img]
November 5, 201311 yr Author Yes I know how to add the potion effect, the problem that I am running into is finding where I can alter the aspects of the air block. Example: I can make my own block by extending block then replace a vanilla block with my own thus giving sand, for example, the ability to drop something other than it's self. Where can I replace the air block. It is not listed in Block.blocklist[]. If someone could help me find it, and find what I need to extend to make my class work, then I think that I can take it from there.
November 5, 201311 yr Author Ok, I guess then is there away that I can alter the player to do what I want until things change?
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.