Skip to content

Commit

Permalink
Also run entity checks on cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba6000 committed Aug 22, 2023
1 parent 1ce45bc commit 6742f3e
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/main/java/com/kuba6000/mobsinfo/loader/MobRecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,15 @@ public boolean spawnEntityInWorld(Entity p_72838_1_) {
} else e = (EntityLiving) ((Class<?>) EntityList.stringToClassMapping.get(mobName))
.getConstructor(new Class[] { World.class })
.newInstance(new Object[] { f });
if (e instanceof EntitySlime) {
if (e.getClass() == EntityMagmaCube.class)
// noinspection ConstantConditions
((EntitySlimeAccessor) e).callSetSlimeSize(2);
else((EntitySlimeAccessor) e).callSetSlimeSize(1);
}
if (e instanceof EntityBat) {
((EntityBat) e).setIsBatHanging(false);
}
ArrayList<MobDrop> drops = entry.getValue();
drops.forEach(MobDrop::reconstructStack);
GeneralMobList.put(
Expand Down Expand Up @@ -667,11 +676,10 @@ public boolean spawnEntityInWorld(Entity p_72838_1_) {

if (registeringWitherSkeleton && e instanceof EntitySkeleton && k.equals("witherSkeleton"))
((EntitySkeleton) e).setSkeletonType(1);
else if (StatCollector.translateToLocal("entity." + k + ".name")
.equals("entity." + k + ".name")) {
LOG.warn("Entity " + k + " does't have localized name!");
// return;
}
else if (!StatCollector.canTranslate("entity." + k + ".name")) {
LOG.warn("Entity " + k + " does't have localized name!");
// return;
}

// POWERFULL GENERATION

Expand Down

0 comments on commit 6742f3e

Please sign in to comment.