Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by DavidM

  1. Oh hey you are making a JoJo mod!

     

    21 minutes ago, Novârch said:

    In a tick event.

    So the effect is global? In that case just send a packet to all clients that is in the same dimension (or else, depending on the coverage of the effect), and cancel all velocity of entities. The same works with continuing the time (except you will need to also include the initial velocity of all entities).

  2. 13 hours ago, Novârch said:

    In my mod I've made a "timestop" effect where all entities are supposed to stop moving and keep their velocity after the effect is undone. Everything currently works perfectly except the rendering of certain entities(arrows, item entities, etc.), they appear to continue moving and continuously snap back to their original position, but when I disable the effect their position and velocity are correct. Is there a way to fix this rendering issue, if so how? The mod's code can be found here, on GitHub, the event fires each tick from a custom entity.

    You will have to cancel the velocity on the client side too.

    Where are you doing this? If it is in a tile entity or a tickable object then you could get away with canceling the velocity of nearby objects on the client side in tick, otherwise you can create a stop time packet containing the range (coverage of the effect in the world) of the stop time effect, and send that to the client (as sending individual update velocity packets is both inefficient and considered a bad practice).

  3. 7 hours ago, Mine215 said:

    Ok thanks but how can I render something like that. I mean how can I define text above someones head. Any suggestions? Name display code does not seem to help. Thanks for the reply!

    Post what you’ve tried. The procedure should be very similar to the name tag displaying code.

     

    11 hours ago, poopoodice said:

    not sure in pre or post tho

    Post would be better in my opinion. Most people would expect stuff that changes the vanilla model to be in pre (scaling, rotating, etc) and additions to the rendering in post (health bars, rune circles, texts, etc). Following this allows other modders to cancel the event/modify stuff during the event without unexpected behaviors happening.

  4. 2 hours ago, jakethesnake123 said:

    I haven't found how to fix it in IntelliJ.

    Note that IDEs don't matter in the actual programming part.

     

    Either override Block#isOpaqueCube to return false call Properties#notSolid when constructing the block or make the block's voxel shape not fill up the entire 1*1*1 space.

  5. 14 hours ago, [NoOneButNo] said:

    I don't know about that

    
    public class FireworkRocketEntity extends Entity implements IRendersAsItem, IProjectile

     

    The class CLEARLY implements IProjectile.

    It doesn't act similarly to other projectiles.

     

    6 hours ago, Novârch said:

    What about when they're fired from a crossbow?

    Whoa when did that get added?

  6. 43 minutes ago, dredhorse said:

    Switch to the native launcher, you are lucky as you are on Windows, MacOS users are stuck on the jar version.

    The current Windows launcher and Mac launcher are the same; they are all updated to use the newer launcher. 

     

    43 minutes ago, dredhorse said:

    The jar launcher doesn't work with newer Minecraft Versions anymore as mojang moved away from S3.

    Newer versions of the legacy launcher do support Minecraft versions above 1.13. Maybe Twitch screwed ups and didn't update or something.

  7. 5 hours ago, Stanlyhalo said:

    I'm just gonna remake it in 1.15.2, and update it from there when new versions come out, also I hate how they have moved a lot more things over to JSON, I know how JSON works, but I would have more flexibility if it was in Java because I can then do events, or some special action.

    The whole system is moving towards data packs, so what can be done in json should be done in json.

    You can still do anything you can do with Java with json.

  8. 1 hour ago, Cyanideee said:

    I mean if you're done monologuing... I wasn't exactly asking to stamp on your first born, just for a little help. I'll look into what you've suggested, thanks for the help?

    I wouldn't call that monologuing. Draco18s is teaching you the correct/most effective way in solving similar problems (by searching in vanilla code and on the forums).

  9. 42 minutes ago, IdiomCoder said:

    Well not really, there are certain actions I want to happen given a certain event. I want the player to move from one end of the house to the other when he clicks the furnace but not through teleportation but from walking being simulated. And for mining I want to add another curse affect where it takes over the players mouse and aims it down to the floor essentially mining straight down, this would usually trigger if there is lava under him. And the only way to break its control is if the player times a jump according to the block break animation. I don't know how feasible this is really.

    If you are implementing a curse effect then you should do all this server side.

    You can then send a packet to the client to rotate the camera or play certain animation.

  10. 17 minutes ago, BadBichShaquonda said:

    Vectors vectors vectors. I tried using the entity's travel method by supplying a vector I created out of the blue, but that just made my entity go in random directions

    You will need a basic understanding of math/linear algebra to make mods that involved entity movement and custom rendering. I would suggest learning that first.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.