mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-22 08:10:40 +00:00
rename architectury implementation util class
This commit is contained in:
@@ -48,7 +48,7 @@ import com.dfsek.terra.api.world.ServerWorld;
|
|||||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||||
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||||
import com.dfsek.terra.api.world.chunk.generation.ProtoWorld;
|
import com.dfsek.terra.api.world.chunk.generation.ProtoWorld;
|
||||||
import com.dfsek.terra.forge.util.FabricUtil;
|
import com.dfsek.terra.forge.util.ForgeUtil;
|
||||||
|
|
||||||
|
|
||||||
@Mixin(ChunkRegion.class)
|
@Mixin(ChunkRegion.class)
|
||||||
@@ -109,7 +109,7 @@ public abstract class ChunkRegionMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockEntity terraWorld$getBlockEntity(int x, int y, int z) {
|
public BlockEntity terraWorld$getBlockEntity(int x, int y, int z) {
|
||||||
return FabricUtil.createState((WorldAccess) this, new BlockPos(x, y, z));
|
return ForgeUtil.createState((WorldAccess) this, new BlockPos(x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int terraWorld$getMinHeight() {
|
public int terraWorld$getMinHeight() {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import com.dfsek.terra.api.world.ServerWorld;
|
|||||||
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||||
import com.dfsek.terra.api.world.chunk.Chunk;
|
import com.dfsek.terra.api.world.chunk.Chunk;
|
||||||
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||||
import com.dfsek.terra.forge.util.FabricUtil;
|
import com.dfsek.terra.forge.util.ForgeUtil;
|
||||||
|
|
||||||
|
|
||||||
@Mixin(net.minecraft.server.world.ServerWorld.class)
|
@Mixin(net.minecraft.server.world.ServerWorld.class)
|
||||||
@@ -73,7 +73,7 @@ public abstract class ServerWorldMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BlockEntity terra$getBlockEntity(int x, int y, int z) {
|
public BlockEntity terra$getBlockEntity(int x, int y, int z) {
|
||||||
return FabricUtil.createState((WorldAccess) this, new BlockPos(x, y, z));
|
return ForgeUtil.createState((WorldAccess) this, new BlockPos(x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int terra$getMinHeight() {
|
public int terra$getMinHeight() {
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import net.minecraft.util.registry.RegistryEntry;
|
import net.minecraft.util.registry.RegistryEntry;
|
||||||
import net.minecraft.world.WorldAccess;
|
import net.minecraft.world.WorldAccess;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@@ -36,8 +34,8 @@ import com.dfsek.terra.api.block.entity.MobSpawner;
|
|||||||
import com.dfsek.terra.api.block.entity.Sign;
|
import com.dfsek.terra.api.block.entity.Sign;
|
||||||
|
|
||||||
|
|
||||||
public final class FabricUtil {
|
public final class ForgeUtil {
|
||||||
private FabricUtil() {
|
private ForgeUtil() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ public class ProtoPlatformBiome implements PlatformBiome {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public RegistryKey<Biome> get(Registry<net.minecraft.world.biome.Biome> registry) {
|
public RegistryKey<Biome> get(Registry<net.minecraft.world.biome.Biome> registry) {
|
||||||
return FabricUtil.getEntry(registry, identifier).orElseThrow().getKey().orElseThrow();
|
return ForgeUtil.getEntry(registry, identifier).orElseThrow().getKey().orElseThrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegistryKey<Biome> get(IForgeRegistry<Biome> registry) {
|
public RegistryKey<Biome> get(IForgeRegistry<Biome> registry) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public final class TagUtil {
|
|||||||
|
|
||||||
LifecycleUtil
|
LifecycleUtil
|
||||||
.getPresets()
|
.getPresets()
|
||||||
.forEach(id -> FabricUtil
|
.forEach(id -> ForgeUtil
|
||||||
.getEntry(registry, id)
|
.getEntry(registry, id)
|
||||||
.ifPresentOrElse(
|
.ifPresentOrElse(
|
||||||
preset -> collect
|
preset -> collect
|
||||||
@@ -57,11 +57,11 @@ public final class TagUtil {
|
|||||||
BiomeUtil
|
BiomeUtil
|
||||||
.getTerraBiomeMap()
|
.getTerraBiomeMap()
|
||||||
.forEach((vb, terraBiomes) ->
|
.forEach((vb, terraBiomes) ->
|
||||||
FabricUtil
|
ForgeUtil
|
||||||
.getEntry(registry, vb)
|
.getEntry(registry, vb)
|
||||||
.ifPresentOrElse(
|
.ifPresentOrElse(
|
||||||
vanilla -> terraBiomes
|
vanilla -> terraBiomes
|
||||||
.forEach(tb -> FabricUtil
|
.forEach(tb -> ForgeUtil
|
||||||
.getEntry(registry, tb)
|
.getEntry(registry, tb)
|
||||||
.ifPresentOrElse(
|
.ifPresentOrElse(
|
||||||
terra -> {
|
terra -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user