DynamicTreesTeam / DynamicTrees

Minecraft Forge mod providing dynamic trees that progressively grow from seed to maturity.
MIT License
235 stars 98 forks source link

Client Crashing when mousing over fruit - The One Probe conflict? #753

Closed BullyTheCode closed 1 year ago

BullyTheCode commented 1 year ago

Description: No issue on the server side, but clients instantly crash when mousing over any fruit on trees. We have experienced this with Dates on Dynamic Atum Palm trees, and now on Holly Trees from Oh the Biomes You'll Go.

Reproduction: Mousing over any dynamic tree based fruit is all it takes.

Rendering: We are using Rubidium and Oculus. Using default textures from Atum/BYG.

Crashlog https://pastebin.com/ycgUb6rk

Mod Notes: ATM Spellbound DynamicTrees-1.16.5-0.10.2 DynamicTreesBYG-1.16.5-1.0.2

Lana-chan commented 1 year ago

this issue occurs when using Jade as well, as per https://github.com/DynamicTreesTeam/DynamicTreesPlus/issues/23

Lana-chan commented 1 year ago

this fixes it:

diff --git a/src/main/java/com/ferreusveritas/dynamictrees/systems/fruit/Fruit.java b/src/main/java/com/ferreusveritas/dynamictrees/systems/fruit/Fruit.java
index 72ade9eb..abd2cc64 100755
--- a/src/main/java/com/ferreusveritas/dynamictrees/systems/fruit/Fruit.java
+++ b/src/main/java/com/ferreusveritas/dynamictrees/systems/fruit/Fruit.java
@@ -179,6 +179,9 @@ public class Fruit extends RegistryEntry<Fruit> implements Resettable<Fruit> {
      * @return a copy of this fruit's item stack
      */
     public final ItemStack getItemStack() {
+        if (itemStack == null) {
+            return ItemStack.EMPTY;
+        }
         return itemStack.copy();
     }
github-actions[bot] commented 1 year ago

Stale issue message