--- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java
+++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java
@@ -112,9 +_,22 @@
     }
 
     private static void spawnGolemInWorld(Level level, BlockPattern.BlockPatternMatch patternMatch, Entity golem, BlockPos pos) {
-        clearPatternBlocks(level, patternMatch);
+        // clearPatternBlocks(level, patternMatch); // Paper - moved down
         golem.snapTo(pos.getX() + 0.5, pos.getY() + 0.05, pos.getZ() + 0.5, 0.0F, 0.0F);
-        level.addFreshEntity(golem);
+        // Paper start
+        org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason;
+        if (golem.getType() == net.minecraft.world.entity.EntityType.SNOW_GOLEM) {
+            spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_SNOWMAN;
+        } else if (golem.getType() == net.minecraft.world.entity.EntityType.COPPER_GOLEM) {
+            spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_COPPERGOLEM;
+        } else {
+            spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_IRONGOLEM;
+        }
+        if (!level.addFreshEntity(golem, spawnReason)) {
+            return;
+        }
+        // Paper end
+        clearPatternBlocks(level, patternMatch); // Paper - from above
 
         for (ServerPlayer serverPlayer : level.getEntitiesOfClass(ServerPlayer.class, golem.getBoundingBox().inflate(5.0))) {
             CriteriaTriggers.SUMMONED_ENTITY.trigger(serverPlayer, golem);
