mirror of
				https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
				synced 2025-11-01 09:09:36 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			957 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			957 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
--- a/net/minecraft/world/level/block/BlockMonsterEggs.java
 | 
						|
+++ b/net/minecraft/world/level/block/BlockMonsterEggs.java
 | 
						|
@@ -20,6 +20,8 @@
 | 
						|
 import net.minecraft.world.level.block.state.IBlockData;
 | 
						|
 import net.minecraft.world.level.block.state.properties.IBlockState;
 | 
						|
 
 | 
						|
+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit
 | 
						|
+
 | 
						|
 public class BlockMonsterEggs extends Block {
 | 
						|
 
 | 
						|
     public static final MapCodec<BlockMonsterEggs> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
 | 
						|
@@ -54,7 +56,7 @@
 | 
						|
 
 | 
						|
         if (entitysilverfish != null) {
 | 
						|
             entitysilverfish.moveTo((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
 | 
						|
-            worldserver.addFreshEntity(entitysilverfish);
 | 
						|
+            worldserver.addFreshEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
 | 
						|
             entitysilverfish.spawnAnim();
 | 
						|
         }
 | 
						|
 
 |