-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Posts posted by DavidM
-
-
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).
-
Do you know how to code? If not, please learn Java first, as this forum does not provide copy-pasta code (we prefer you to learn how it works rather than copying and pasting other's work without learning anything).
Show what you have tried.
-
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).
-
In that case you just
Minecraft.getInstance().player
-
You should really just make the mod server side and send whatever information you need from there to the client.
-
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.
-
2 minutes ago, poopoodice said:
Which forge version you are using? Because I can't seem to find it in mine
I'm currently on 31.1.44 (haven't updated yet). It might have been removed in more recent updates.
-
8 minutes ago, poopoodice said:
isOpaqueCube only exist in 1.12 : p
Hmm I can still find isOpaqueCube in the Block class in my 1.15 workspace. Not sure if using it is a good practice though (since the not solid is set in block properties now, as demonstrated by a few vanilla blocks).
-
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 falsecall Properties#notSolid when constructing the block or make the block's voxel shape not fill up the entire 1*1*1 space. -
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?
-
12 minutes ago, ChAoS_UnItY said:
I'm trying to get vanilla server side's identity data from server side world.
That is not possible.
What will the end result of your mod be like? It sounds like you are using a wrong method in approaching your problem.
-
You can’t modify the crafting matrix in that event.
Create a custom IRecipe instead.
-
54 minutes ago, ChAoS_UnItY said:
But is it possible to send a packets from client side only mod and receive from vanilla server ?
No. What are you trying to do from an end-user’s perspective?
-
FireworkRocketEntity is not a projectile; it wouldn’t make sense for it to trigger ProjectileImpactEvent.
-
4 minutes ago, CJDaBomb said:
i really need to know so if u can tell me that would be much appreciated
Please make your own thread.
-
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.
-
You need to do this on the server side. Use World#isRemote to check whether the sides (true for client, false for server).
-
36 minutes ago, Reveriacus said:
"Error: com.electronwill.nightconfig.core.io.ParsingException: Not enough data available"
Delete your config folder.
-
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.
-
-
Post your code.
-
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).
-
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.
-
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.
[1.15.2] No way to avoid coremod?
in Modder Support
Posted · Edited by DavidM
You can subscribe to RenderWorldLastEvent and manually render the player there.
Only do this on the client that has its view entity changed to the camera.