50ap5ud5 / BoatItemView

Minecraft Mod that lets you view your held items whilst sitting in a moving boat. Client-side only.
GNU Lesser General Public License v3.0
10 stars 7 forks source link

Port to 1.21 #18

Open VladAndreiMorariu opened 2 months ago

VladAndreiMorariu commented 2 months ago

Hi, I've updated the mod to 1.21, and it seems like everything is working smoothly. I hope it's ok for you and makes your work a bit easier. I created a new branch in the fork, but it forced me to make a pull request to the 1.20.x-fabric.

girshcatt commented 2 months ago

@VladAndreiMorariu Can you please compile your fork into mod for me, because i dont know how to do it myself(i know about gradlew.bat, but where is the compiled mod after im running gradlew.bat)

VladAndreiMorariu commented 2 months ago

@VladAndreiMorariu Can you please compile your fork into mod for me, because i dont know how to do it myself(i know about gradlew.bat, but where is the compiled mod after im running gradlew.bat)

You need to run the "gradle build" command, and once it's finished, go to the [project_name]/build/libs folder, and inside you'll find the jar file

girshcatt commented 2 months ago

@VladAndreiMorariu Can you please compile your fork into mod for me, because i dont know how to do it myself(i know about gradlew.bat, but where is the compiled mod after im running gradlew.bat)

You need to run the "gradle build" command, and once it's finished, go to the [project_name]/build/libs folder, and inside you'll find the jar file

sorry, can you do step by step guide? Because i dont understand where and how do i need to run gradle build command, like if i open cmd and run "gradle build" it does nothing

  1. I need to download your code as zip whats next?
VladAndreiMorariu commented 2 months ago

@girshcatt

Ok, I’m assuming you don’t have an IDE:

  1. You need an IDE like IntelliJ IDEA, the community version will do just fine;
  2. Open the mod project in the IDE and wait for it to finish loading all the files. It might take a while since it's the first time, so be patient (you'll know it's done when there are no loading bars at the bottom of the screen);
  3. (Optional) Try running the program at the top right by clicking the button with a green arrow icon. So, try out the mod and see if the map , for example, is displayed while you're in the boat, etc.;
  4. If everything goes well, close the game and press CTRL twice in the IDE and type the command "gradle build". Wait for the process to complete, and then go to the folder [project_name]/build/libs where you’ll find the jar file.

Hope it helps

girshcatt commented 2 months ago

@VladAndreiMorariu thank you so much, i compiled mod and it works just fine! with your guide im now able to compile mods from their sources, thanks again!

girshcatt commented 1 week ago

1.21.2/1.21.3 crashes

VladAndreiMorariu commented 1 week ago

@girshcatt

1.21.2/1.21.3 crashes

It's meant for 1.21, I can't assure for newer versions

vico93 commented 1 week ago

@VladAndreiMorariu could you do an update to 1.21.2/3 as well?

BlueStaggo commented 6 days ago

Very simple port to 1.21.2. Simply replace lines 37-41 in ClientHandler with this:

Optional<Item> item = BuiltInRegistries.ITEM.getOptional(ResourceLocation.fromNamespaceAndPath(namespace, path));
if (item.isPresent()) {
    showHandsMainHand = showHandItem(itemstack, item.get(), true);
    showHandsOffHand = showHandItem(itemstack1, item.get(), false);
}

And also update the gradle.properties file accordingly of course