spawn_potential
This commit is contained in:
1 parent
c283fddd38
commit
460a78f866
4 files changed
+42
-3
No files matched your search
@@ -1,7 +1,9 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.SpawnHelperInnerInterface;
|
||||
import carpet.utils.SpawnReporter;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import net.minecraft.class_5263;
|
||||
import net.minecraft.entity.EntityCategory;
|
||||
import net.minecraft.world.SpawnHelper;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
@@ -14,12 +16,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
// temporary mixin until naming for spawnhelper gets fixed.
|
||||
|
||||
@Mixin(SpawnHelper.class_5262.class)
|
||||
public class SpawnHelperInnerMixin
|
||||
public class SpawnHelperInnerMixin implements SpawnHelperInnerInterface
|
||||
{
|
||||
@Shadow @Final private int field_24394;
|
||||
|
||||
@Shadow @Final private Object2IntMap<EntityCategory> field_24395;
|
||||
|
||||
@Shadow @Final private class_5263 field_24396;
|
||||
|
||||
@Inject(method = "method_27826", at = @At("HEAD"), cancellable = true)
|
||||
private void changeMobCaps(EntityCategory entityCategory, CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
@@ -28,4 +32,12 @@ public class SpawnHelperInnerMixin
|
||||
cir.setReturnValue(field_24395.getInt(entityCategory) < i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public class_5263 getPotentialCalculator()
|
||||
{
|
||||
return field_24396;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user