atlarge-research / opencraft

Other
4 stars 2 forks source link

Add entity spawn offset when within collision offset range - [merged] #157

Closed jdonkervliet closed 4 years ago

jdonkervliet commented 4 years ago

In GitLab by @julian9499 on May 26, 2020, 22:10

Merges feature/fix-mob-spawning-in-the-ground -> development

This fix will prevent mobs from spawning into the ground. Currently mobs spawn on an exact coordinate on the ground. This is troublesome since a small offset is needed to prevent collisions. This is resolved by a small check before spawning

jdonkervliet commented 4 years ago

In GitLab by @wubero on May 26, 2020, 22:12

Commented on src/main/java/net/glowstone/GlowWorld.java line 1769

Should use the entitySpawnLocation instead of the location.clone()

jdonkervliet commented 4 years ago

In GitLab by @larsdetombe on May 26, 2020, 22:15

Commented on src/main/java/net/glowstone/GlowWorld.java line 1771

Is this check even necessary? It wouldn't matter to place the entity a bit higher if the block below it is air

jdonkervliet commented 4 years ago

In GitLab by @julian9499 on May 26, 2020, 22:21

Commented on src/main/java/net/glowstone/GlowWorld.java line 1771

This method also spawns things like ender pearls and arrows. I don't want to alter their location if it isn't necessary.

jdonkervliet commented 4 years ago

In GitLab by @larsdetombe on May 26, 2020, 22:24

Commented on src/main/java/net/glowstone/GlowWorld.java line 1771

That makes sense, didn't know that was the case.

jdonkervliet commented 4 years ago

In GitLab by @larsdetombe on May 26, 2020, 22:24

resolved all threads

jdonkervliet commented 4 years ago

In GitLab by @swabbur on May 26, 2020, 22:58

merged

jdonkervliet commented 4 years ago

In GitLab by @swabbur on May 26, 2020, 22:58

mentioned in commit 492f394704d4af700565f6cee6c2cbd29f414f6b