mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Spawn entity using block instead of tile since it was causing issues
https://pastebin.com/gwXGK8qd
This commit is contained in:
parent
b7c67a16d9
commit
f1df8d07bb
@ -134,7 +134,7 @@ public class IrisEntitySpawn implements IRare {
|
||||
try {
|
||||
IrisEntity irisEntity = getRealEntity(g);
|
||||
|
||||
if (!irisEntity.getSurface().matches(at.clone().subtract(0, 1, 0).getBlock().getState()))
|
||||
if (!irisEntity.getSurface().matches(at.clone().subtract(0, 1, 0).getBlock()))
|
||||
return null; //Make sure it can spawn on the block
|
||||
|
||||
Entity e = irisEntity.spawn(g, at.add(0.5, 0, 0.5), rng.aquire(() -> new RNG(g.getTarget().getWorld().seed() + 4)));
|
||||
|
@ -20,6 +20,7 @@ package com.volmit.iris.engine.object.spawners;
|
||||
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
|
||||
@ -47,7 +48,7 @@ public enum IrisSurface {
|
||||
* @param state The blockstate
|
||||
* @return True if it matches
|
||||
*/
|
||||
public boolean matches(BlockState state) {
|
||||
public boolean matches(Block state) {
|
||||
Material type = state.getType();
|
||||
if (type.isSolid()) {
|
||||
return this == LAND || this == OVERWORLD || (this == ANIMAL
|
||||
|
Loading…
x
Reference in New Issue
Block a user