Jump to content

Novârch

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Novârch

  1. Forge 1.16 is still in Beta, you should expect bugs and crashes until a recommended release comes out. As for your issue, try without Storage Drawers. Please don't whine if you don't get help immediately, people have more important things to do than answer forum questions.
  2. 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.
  3. That's fine, all I would change is use ClientTickEvent instead of InputEvent.
  4. 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.
  5. 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.
  6. Maybe you could use ProjectileHelper#rayTraceEntities, otherwise, most of the logic for Minecraft#objectMouseOver is in Minecraft#getMouseOver.
  7. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  8. 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.
  9. 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.
  10. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  11. 1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  12. 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.
  13. 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.
  14. 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.
  15. ...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.
  16. 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.
  17. 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.
  18. Extend Event, then call MinecraftForge#EVENT_BUS#register to register it, remember you have to fire your event manually using MinecraftForge#EVENT_BUS#post.
  19. The best we have currently are the docs, although they're a bit outdated.
  20. Return a use of repositionEntity.apply with false as the parameter, in placeEntity, like this:
  21. Have you ever run 1.15.2 from the normal launcher?
×
×
  • Create New...

Important Information

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