Posted July 29, 20178 yr I have a cat, that I can shear for cat hair. (don't question my sanity). But I want a custom death message for the cat when it dies due to over-shearing. How could I override the original message? Also, as a bonus question: how can I disable the cat from sitting/standing. Any method from getAISit doesn't seem to work. resetTask partially works, but not on the first two clicks after summoning the tamed ocelot. Edited August 1, 20178 yr by _Bedrockbreaker_ Added [Solved] Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 29, 20178 yr Author Wouldn't overriding isSitting to false always make the cat stand? Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 29, 20178 yr Author No, I want the ocelot to stay in its sitting/standing position when clicked. So, just removing that line would make the cat stay? Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 29, 20178 yr Author wait wait wait wait........ I only want to disable it from sitting/standing when I right-click on it. And behave normally all other times. Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 29, 20178 yr Author How would I override that? If i try to set it to null, it gives a must be variable error. Putting the @Override annotation also gives an error. Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 31, 20178 yr Author ok, got it. But I can't exactly override a method inside a different method. (subscribed to interact(EntityInteract), and trying to handle everything in there. And I can't exactly get a reference to the entity before the player even clicks on it ) *Currently in eclipse at this point forward* So, it seems just putting entityCat.processInteract(player, event.getHand()); { } doesn't give me any errors, but I am going to assume it does somehow because of the ; before the two {}... And I am also going to assume if that is the way to do it, that I need to put something in the braces? Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
July 31, 20178 yr You create a subclass of EntityOcelot with an overridden processInteract and replace all ocelots in the world with your ones.
July 31, 20178 yr Author No, I don't have a custom entity, and I don't think creating a new one and replacing all the old ones with mine is the the solution I generally want to do (more like compatibility, than "force to use my cat"). But yes, for any ocelot that I can click on with shears, (which should be every ocelot) I want to disable it from standing/sitting in that right click only. If the player can't harvest more hair, or is not holding shears, the player can normally interact with the ocelot. Is that clear enough? or is more information needed? I just created a github here if you still are confused -> https://github.com/Bedrockbreaker/rtap Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
August 1, 20178 yr Author Am I really such an idiot? I completely forgot that I had subscribed to the interaction event I could cancel it. Anyways, thanks for enduring through stupidity, I got it working. Professional Hot Garbage Programmer. https://github.com/Bedrockbreaker/
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.