mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 22:31:52 +00:00
suppress warnings
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ public abstract class ConfiguredFeatureMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
public abstract boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos);
|
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) {
|
public boolean terra$plant(Location l, Random r) {
|
||||||
String id = BuiltinRegistries.CONFIGURED_FEATURE.getId((ConfiguredFeature<?, ?>) (Object) this).toString();
|
String id = BuiltinRegistries.CONFIGURED_FEATURE.getId((ConfiguredFeature<?, ?>) (Object) this).toString();
|
||||||
try(ProfileFrame ignore = TerraFabricPlugin.getInstance().getProfiler().profile("fabric_tree:" + id.toLowerCase(Locale.ROOT))) {
|
try(ProfileFrame ignore = TerraFabricPlugin.getInstance().getProfiler().profile("fabric_tree:" + id.toLowerCase(Locale.ROOT))) {
|
||||||
|
|||||||
+2
@@ -32,6 +32,7 @@ public abstract class ChunkRegionMixin {
|
|||||||
return ((ChunkRegion) (Object) this).getDimensionHeight();
|
return ((ChunkRegion) (Object) this).getDimensionHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public ChunkGenerator terra$getGenerator() {
|
public ChunkGenerator terra$getGenerator() {
|
||||||
return (ChunkGenerator) ((ChunkRegion) (Object) this).toServerWorld().getChunkManager().getChunkGenerator();
|
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));
|
return new FabricBlock(new BlockPos(x, y, z), ((ChunkRegion) (Object) this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public Entity terra$spawnEntity(Location location, EntityType entityType) {
|
public Entity terra$spawnEntity(Location location, EntityType entityType) {
|
||||||
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(((ChunkRegion) (Object) this).toServerWorld());
|
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(((ChunkRegion) (Object) this).toServerWorld());
|
||||||
entity.setPos(location.getX(), location.getY(), location.getZ());
|
entity.setPos(location.getX(), location.getY(), location.getZ());
|
||||||
|
|||||||
Reference in New Issue
Block a user