mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Fix DungeonHooks not returning correct values. Fixes dungeons in world spawning pigs.
This commit is contained in:
1 parent
eb1a9b57c6
commit
54b2c18fcf
2 files changed
+3
-7
No files matched your search
@@ -59,7 +59,7 @@ public class DungeonHooks
|
||||
if (type == mob.type)
|
||||
{
|
||||
itr.remove();
|
||||
rarity = /* mob.weight */ 0 + rarity;
|
||||
rarity = mob.getWeight().asInt() + rarity;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class DungeonHooks
|
||||
if (name == mob.type)
|
||||
{
|
||||
dungeonMobs.remove(mob);
|
||||
return 0; // mob.weight;
|
||||
return mob.getWeight().asInt();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -95,7 +95,7 @@ public class DungeonHooks
|
||||
public static EntityType<?> getRandomDungeonMob(Random rand)
|
||||
{
|
||||
DungeonMob mob = WeightedRandom.getRandomItem(rand, dungeonMobs).orElseThrow();
|
||||
return null; // mob.type;
|
||||
return mob.type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user