-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Novârch
-
How to make the player invincible for a set number of ticks?
Novârch replied to squidlex's topic in Modder Support
Entity#setInvulnerable -
I have no idea why it's better, but I've seen people recommend it a lot on these forums, maybe someone else could clarify why.
-
That's fine, all I would change is use ClientTickEvent instead of InputEvent.
-
https://plugins.jetbrains.com/plugin/8327-minecraft-development One of the 20+ options that apear when you right click a field/method/etc. is "Get SRG name". Edit: I should also note that IntelliJ will most likely recommend you the plugin if you use Forge (yay data collection), DO NOT INSTALL IT DIRECTLY FROM INTELLIJ, you will get a super outdated version, report some stupid issues on their GitHub, get told to update and regret your decisions, install it from the link.
-
Maybe you could use ProjectileHelper#rayTraceEntities, otherwise, most of the logic for Minecraft#objectMouseOver is in Minecraft#getMouseOver.
-
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
It doesn't exist anymore, you have to make the methods manually, it looks a bit like this: public class MyMessage { int value; public MyMessage(int value) { this.value = value; } public static void encode(MyMessage msg, PacketBuffer buffer) { buffer.writeInt(msg.value); } public static MyMessage decode(PacketBuffer buffer) { return new MyMessage(buffer.readInt()); //Remember to read in the same oreder you wrote! } public static void handle(MyMessage msg, Supplier<NetworkEvent.Context> ctx) { if (ctx.get().getDirection() == NetworkDirection.PLAY_TO_SERVER) { //Checks if the packet's direction is to the server ctx.get().enqueueWork(() -> { //Your code goes here }); } ctx.get().setPacketHandled(true); } } I'm 99% sure that's correct, kinda freestyled it though. To send it use SimpleChannel#sendToServer, don't forget to register it with SimpleChannel#registerMessage, and don't worry if you don't understand it right away, it took me a while to fully understand packets in 1.15.
-
Still need help as of jul 16 [1.15.2]Dimension Travel via Item
Novârch replied to Willatendo's topic in Modder Support
You're correct on that one, forgot to mention that. The custom Teleporter class has to override placeEntity and return repositionEntity.apply(false) to prevent spawning a Nether portal. -
Still need help as of jul 16 [1.15.2]Dimension Travel via Item
Novârch replied to Willatendo's topic in Modder Support
Entity#changeDimension. -
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.16.1] How create a new slab block with Eclipse?
Novârch replied to beestrug's topic in Modder Support
That is not a modding problem, it's a basic Java problem, please learn basic Java before modding. If you do know basic Java and are just a bit confused, look through DeferredRegister, everything you need is there. -
[1.16.1] How create a new slab block with Eclipse?
Novârch replied to beestrug's topic in Modder Support
Use DeferredRegister#create, the constructor is deprecated with a comment next to it saying what to use instead, doesn't get much more obvious than that. -
I'm not saying it's impossible to make a mod while learning Java, I just think it's much easier to mod after you've polished your Java fundementals. For instance, if you already knew Java, you would have never posted this. You would have looked at SlimeBlock and seen what makes it bouncy, and copied it, or instantiated your block as a SlimeBlock, etc. You'll have a much better time modding if you learn Java first.
-
...How is that relevant to what I said...? As I said take a look at the TYPE HIERARCHY of ITextComponent to understand the sendMessage method. Edit: Just looked at the first post, you literally just have to rearange the words in TextComponentString.
-
Please take a look at the type hierarchy of ITextComponent, every IDE has it. As for the method being empty, I'm pretty sure you're looking at the method in Entity instead of PlayerEntity.
-
Learn basic Java, then come back. Don't learn Java as you mod, even if you succeed in what you're doing that way (you probably won't) if you plan to work on the mod a more than a week you're most likely going to rewrite the entire mod after seeing your older code. As diesieben stated take a look at SlimeBlock, everything you need is there.
-
The best we have currently are the docs, although they're a bit outdated.
-
[SOLVED][1.15.2] Problems with PlayerEntity#changeDimension
Novârch replied to Novârch's topic in Modder Support
Don't. -
How can you customize the hitbox and bounding box in Minecraft 1.15.2?
Novârch replied to Help!'s topic in Modder Support
He's obviously not, Block.Properties is not in 1.12. -
Have you ever run 1.15.2 from the normal launcher?
-
Upload your entire mod, preferably as a git repository.