Posted November 20, 20159 yr Hi all, For various reasons I want to prevent a player from being knocked off a pig by random mobs. Is there a simple way to do this? I am always running in creative mode for my purposes, but random interactions spoil my intent... ( At least I think that is the problem, I have not as yet caught the condition that causes the player to be off the pig )
November 20, 20159 yr There are only a few cases I know of that causes a player to be dismounted: The player presses shift The player is in a minecart and goes over a powered activator rail The player is mounting and untamed horse and the horse throws the player off The entity the player is riding is killed Another mod causes it for some reason Which of these reasons do you want to prevent? Edit: as diesieben07 pointed out below, you can also get dismounted in water catch(Exception e) { } Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).
November 21, 20159 yr Author Thanks for any and all help. It is great to know that there are a limited number of scenarios to knock a player off, this gives me a clue. When this has occured, there is no player at keyboard so can't be that. Its a derived pig class with removed AI, so it is not the minecart scenario. Its not an untamed horse. The pig is a super pig and invulnerable. No other mods. I have been digging around, is there another scenario that could cause this, due to the ridden pig moving through standing water? By standing water, I mean a pool of water left on a level surface as the whole area that previously supported the water has been removed and it falls down and forms an active pool.
November 21, 20159 yr Ok, this is a thing in vanilla, you get dismounted under water. Dang, I forgot you get dismounted in water, I'll edit above catch(Exception e) { } Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).
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.