Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Novârch

Members
  • Posts

    422
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Novârch

  1. Remove ModMusicDiscItem and instantiate MusicDiscItem directly, your issue most likely comes from the fact you are using the deprecated method that takes in a SoundEvent, use the one that uses a Supplier<SoundEvent>.
  2. Versions 1.12 and below are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  3. 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.
  4. 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.
  5. That's fine, all I would change is use ClientTickEvent instead of InputEvent.
  6. 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.
  7. 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.
  8. PlayerEntity#world#isRemote returns false if you're on the server, use it, also read this.
  9. Maybe you could use ProjectileHelper#rayTraceEntities, otherwise, most of the logic for Minecraft#objectMouseOver is in Minecraft#getMouseOver.
  10. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  11. 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.
  12. 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.
  13. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  14. 1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  15. 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.
  16. 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.
  17. 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.
  18. ...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.
  19. 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.
  20. 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.
  21. Extend Event, then call MinecraftForge#EVENT_BUS#register to register it, remember you have to fire your event manually using MinecraftForge#EVENT_BUS#post.
  22. The best we have currently are the docs, although they're a bit outdated.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.