mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Fix fx and spawning before terrain is setup
This commit is contained in:
parent
4b11bcb77b
commit
d42bcb0ab9
@ -141,9 +141,17 @@ public class IrisTerrainProvider extends SkyTerrainProvider implements IrisConte
|
||||
{
|
||||
spawnable = true;
|
||||
super.onTick(ticks);
|
||||
try
|
||||
{
|
||||
tickEffects();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void tickEffects()
|
||||
{
|
||||
if(!IrisSettings.get().isSystemEffects())
|
||||
@ -494,6 +502,8 @@ public class IrisTerrainProvider extends SkyTerrainProvider implements IrisConte
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if(isSpawnable())
|
||||
{
|
||||
if(!IrisSettings.get().isSystemEntitySpawnOverrides())
|
||||
@ -557,6 +567,12 @@ public class IrisTerrainProvider extends SkyTerrainProvider implements IrisConte
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable xe)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private boolean trySpawn(KList<IrisEntitySpawnOverride> s, EntitySpawnEvent e)
|
||||
{
|
||||
for(IrisEntitySpawnOverride i : s)
|
||||
|
@ -1,32 +1,22 @@
|
||||
package com.volmit.iris.gen.nms;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Jigsaw;
|
||||
import org.bukkit.craftbukkit.v1_16_R2.CraftWorld;
|
||||
|
||||
import net.minecraft.server.v1_16_R2.BlockJigsaw;
|
||||
import net.minecraft.server.v1_16_R2.ChunkGenerator;
|
||||
import net.minecraft.server.v1_16_R2.DimensionManager;
|
||||
import net.minecraft.server.v1_16_R2.IChunkAccess;
|
||||
import net.minecraft.server.v1_16_R2.IRegistry;
|
||||
import net.minecraft.server.v1_16_R2.IRegistryCustom;
|
||||
import net.minecraft.server.v1_16_R2.IRegistryWritable;
|
||||
import net.minecraft.server.v1_16_R2.MinecraftServer;
|
||||
import net.minecraft.server.v1_16_R2.RegistryMaterials;
|
||||
import net.minecraft.server.v1_16_R2.ResourceKey;
|
||||
import net.minecraft.server.v1_16_R2.StructureGenerator;
|
||||
import net.minecraft.server.v1_16_R2.StructureManager;
|
||||
import net.minecraft.server.v1_16_R2.StructureSettings;
|
||||
import net.minecraft.server.v1_16_R2.WorldDataServer;
|
||||
import net.minecraft.server.v1_16_R2.WorldDimension;
|
||||
import net.minecraft.server.v1_16_R2.WorldServer;
|
||||
|
||||
public class WorldCracker162
|
||||
{
|
||||
public static void makeStuffAt(World world, int x, int z)
|
||||
@SuppressWarnings("unused")
|
||||
public static void go(World world, int x, int z)
|
||||
{
|
||||
WorldServer ws = ((CraftWorld) world).getHandle();
|
||||
MinecraftServer server = ws.getMinecraftServer();
|
||||
@ -38,16 +28,4 @@ public class WorldCracker162
|
||||
ChunkGenerator cg = wdm.c();
|
||||
IChunkAccess ica = ws.getChunkAt(x, z);
|
||||
}
|
||||
|
||||
public static void attemptGenVillage(World world, int x, int z)
|
||||
{
|
||||
WorldServer ws = ((CraftWorld) world).getHandle();
|
||||
WorldDataServer wds = ws.worldDataServer;
|
||||
StructureManager sm = ws.getStructureManager();
|
||||
RegistryMaterials<WorldDimension> registrymaterials = wds.getGeneratorSettings().d();
|
||||
WorldDimension wdm = (WorldDimension) registrymaterials.a(WorldDimension.OVERWORLD);
|
||||
DimensionManager dm = wdm.b();
|
||||
ChunkGenerator cg = wdm.c();
|
||||
StructureSettings structureSettings = cg.getSettings();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user