Posted June 12, 20205 yr I havent been able to find a good resource for this and all the vanilla code here is obfuscated. I want to create a generic projectile entity i can use for my mod. most likely one that i will make sub classes of for more specific things. what I need to know about the entity is where its coming from (who or what shot it) and what direction its going, and when it hits something. Im not asking for someone to do the work for me, im just having trouble wrapping my mind around how it works and am looking for any good resources/tutorials/tips.
June 12, 20205 yr I would look at the vanilla SnowballEntity code. If there are lots of srg names in there, update your mappings, and you should be able to get something halfway readable. I see this in the SnowballEntity in mine from 20200604: Quote /** * Called when this EntityThrowable hits a block or entity. */ protected void onImpact(RayTraceResult result) { Which looks promising for what you're describing. Also of course look at the parent class.
June 12, 20205 yr 1 hour ago, Mekelaina said: what do you mean by update mappings? in your build.gradle, find the mappings line like so: Quote mappings channel: 'snapshot', version: '20200604-1.15.1' And change the date part to today. They don't often break, so using the current should be fine. Then refresh your project in your IDE, and it should update the mappings used.
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.