Posted May 16, 20178 yr I am having a problem that I do not know how to get time of of an entity (breeding time, dropping items time...)? I would greatly appreciated your help!
May 16, 20178 yr Here are a couple of "time" variables from the Entity class along with a few sub-classes Entity::ticksExisted (public) The age of the Entity EntityLivingBase::hurtTime (public) The amount of time an entity should render as hurt (red tint after being attacked) EntityLivingBase::deathTime (public) The amount of time remaining this entity should act 'dead', i.e. have a corpse in the world EntityAnimal::inLove (private & Getter-less) The amount of time that an animal will be able to mate after being given breeding items For the inLove variable in EntityAnimal, you will need to use Reflection to "unlock" it, and store that reference somewhere (as Reflection is relatively costly to do over and over again) "dropping items time", is an unfamiliar term. A few mods out there, like Botania, adds Shedding, but that functionality does not exist in Vanilla Minecraft, nor base Forge. Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
May 16, 20178 yr Author 4 hours ago, Matryoshika said: Here are a couple of "time" variables from the Entity class along with a few sub-classes Entity::ticksExisted (public) The age of the Entity EntityLivingBase::hurtTime (public) The amount of time an entity should render as hurt (red tint after being attacked) EntityLivingBase::deathTime (public) The amount of time remaining this entity should act 'dead', i.e. have a corpse in the world EntityAnimal::inLove (private & Getter-less) The amount of time that an animal will be able to mate after being given breeding items For the inLove variable in EntityAnimal, you will need to use Reflection to "unlock" it, and store that reference somewhere (as Reflection is relatively costly to do over and over again) "dropping items time", is an unfamiliar term. A few mods out there, like Botania, adds Shedding, but that functionality does not exist in Vanilla Minecraft, nor base Forge. Thanks!
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.