Everything posted by Novârch
-
How to make the player invincible for a set number of ticks?
Entity#setInvulnerable
-
Prevent FULL AUTO item use
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.
-
Prevent FULL AUTO item use
That's fine, all I would change is use ClientTickEvent instead of InputEvent.
-
How can I view all Minecraft Server 1.14 class/method/field/param names in such format: Obfuscated Name -> Deobfuscated Name?
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.
-
How can I view all Minecraft Server 1.14 class/method/field/param names in such format: Obfuscated Name -> Deobfuscated Name?
To add on to this, if you're using IntelliJ there is a Minecraft development plugin that gives you the option to get the SRG name of something on right click.
-
Entity trace with custom vector
Maybe you could use ProjectileHelper#rayTraceEntities, otherwise, most of the logic for Minecraft#objectMouseOver is in Minecraft#getMouseOver.
-
[1.12.2] Get biomes id from getBiomes
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
Prevent FULL AUTO item use
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
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
Entity#changeDimension.
-
error using shaders + mods
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.8.9] How to check if an item can be placed?
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?
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?
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.
-
How can I make a block a slime block?
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.
-
Forge 1.15.2, is there no such method?
...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.
-
Forge 1.15.2, is there no such method?
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.
-
How can I make a block a slime block?
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.
-
[1.16.1] The Book of Minecraft Modding - complete guide for beginners
Extend Event, then call MinecraftForge#EVENT_BUS#register to register it, remember you have to fire your event manually using MinecraftForge#EVENT_BUS#post.
-
Does Forge have an api manual?
The best we have currently are the docs, although they're a bit outdated.
-
[SOLVED][1.15.2] Problems with PlayerEntity#changeDimension
Don't.
-
[1.16.1] Teleportation Logic always leaving behind a nether portal. How to change this?
Return a use of repositionEntity.apply with false as the parameter, in placeEntity, like this:
-
How can you customize the hitbox and bounding box in Minecraft 1.15.2?
He's obviously not, Block.Properties is not in 1.12.
-
Could not find client-extra.jar
Have you ever run 1.15.2 from the normal launcher?
-
Entity fails to summon
Upload your entire mod, preferably as a git repository.
IPS spam blocked by CleanTalk.