suppress warnings

This commit is contained in:
dfsek
2021-05-03 20:14:06 -07:00
parent 6209b86560
commit 6614d19845
2 changed files with 3 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ public abstract class ConfiguredFeatureMixin {
@Shadow
public abstract boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos);
@SuppressWarnings("ConstantConditions")
@SuppressWarnings({"ConstantConditions", "try"})
public boolean terra$plant(Location l, Random r) {
String id = BuiltinRegistries.CONFIGURED_FEATURE.getId((ConfiguredFeature<?, ?>) (Object) this).toString();
try(ProfileFrame ignore = TerraFabricPlugin.getInstance().getProfiler().profile("fabric_tree:" + id.toLowerCase(Locale.ROOT))) {

View File

@@ -32,6 +32,7 @@ public abstract class ChunkRegionMixin {
return ((ChunkRegion) (Object) this).getDimensionHeight();
}
@SuppressWarnings("deprecation")
public ChunkGenerator terra$getGenerator() {
return (ChunkGenerator) ((ChunkRegion) (Object) this).toServerWorld().getChunkManager().getChunkGenerator();
}
@@ -44,6 +45,7 @@ public abstract class ChunkRegionMixin {
return new FabricBlock(new BlockPos(x, y, z), ((ChunkRegion) (Object) this));
}
@SuppressWarnings("deprecation")
public Entity terra$spawnEntity(Location location, EntityType entityType) {
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(((ChunkRegion) (Object) this).toServerWorld());
entity.setPos(location.getX(), location.getY(), location.getZ());