reformat + imports

This commit is contained in:
dfsek committed 2021-08-03 12:59:58 -07:00
1 parent dca8dd4c4f
commit f1bda5c907
161 files changed
+342 -378

No files matched your search

@@ -15,11 +15,13 @@ import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.FeatureConfig;
public class FabricEntryPoint implements ModInitializer {
private static final TerraPluginImpl TERRA_PLUGIN = new TerraPluginImpl();
public static final PopulatorFeature POPULATOR_FEATURE = new PopulatorFeature(DefaultFeatureConfig.CODEC);
public static final ConfiguredFeature<?, ?> POPULATOR_CONFIGURED_FEATURE = POPULATOR_FEATURE.configure(FeatureConfig.DEFAULT).decorate(Decorator.NOPE.configure(NopeDecoratorConfig.INSTANCE));
private static final TerraPluginImpl TERRA_PLUGIN = new TerraPluginImpl();
public static TerraPluginImpl getTerraPlugin() {
return TERRA_PLUGIN;
}
@Override
public void onInitialize() {
@@ -31,8 +33,4 @@ public class FabricEntryPoint implements ModInitializer {
Registry.register(Registry.CHUNK_GENERATOR, new Identifier("terra:terra"), FabricChunkGeneratorWrapper.CODEC);
Registry.register(Registry.BIOME_SOURCE, new Identifier("terra:terra"), TerraBiomeSource.CODEC);
}
public static TerraPluginImpl getTerraPlugin() {
return TERRA_PLUGIN;
}
}
@@ -26,6 +26,10 @@ public class TerraPluginImpl extends AbstractTerraPlugin {
private final WorldHandle worldHandle = new FabricWorldHandle();
private final Lazy<File> dataFolder = Lazy.lazy(() -> new File(FabricLoader.getInstance().getConfigDir().toFile(), "Terra"));
public TerraPluginImpl() {
load();
}
@Override
public WorldHandle getWorldHandle() {
return worldHandle;
@@ -36,10 +40,6 @@ public class TerraPluginImpl extends AbstractTerraPlugin {
return Optional.of(new FabricAddon(this));
}
public TerraPluginImpl() {
load();
}
@Override
protected Logger createLogger() {
final org.apache.logging.log4j.Logger log4jLogger = LogManager.getLogger();
@@ -3,9 +3,9 @@ package com.dfsek.terra.fabric.generation;
import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.world.World;
import com.dfsek.terra.api.world.generator.ChunkData;
import com.dfsek.terra.api.world.generator.ChunkGenerator;
import com.dfsek.terra.api.world.generator.Chunkified;
import com.dfsek.terra.api.world.generator.GeneratorWrapper;
import com.dfsek.terra.api.world.generator.ChunkGenerator;
import com.dfsek.terra.fabric.FabricEntryPoint;
import com.dfsek.terra.fabric.block.FabricBlockState;
import com.dfsek.terra.fabric.mixin.StructureAccessorAccessor;
@@ -43,13 +43,13 @@ import java.util.concurrent.Executor;
@Implements(@Interface(iface = World.class, prefix = "terra$", remap = Interface.Remap.NONE))
public abstract class ServerWorldMixin {
private WorldConfig config;
@Shadow
public abstract long getSeed();
@Shadow
@Final
private ServerChunkManager chunkManager;
@Shadow
public abstract long getSeed();
@Inject(at = @At("RETURN"), method = "<init>(Lnet/minecraft/server/MinecraftServer;Ljava/util/concurrent/Executor;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lnet/minecraft/world/level/ServerWorldProperties;Lnet/minecraft/util/registry/RegistryKey;Lnet/minecraft/world/dimension/DimensionType;Lnet/minecraft/server/WorldGenerationProgressListener;Lnet/minecraft/world/gen/chunk/ChunkGenerator;ZJLjava/util/List;Z)V")
public void injectConstructor(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey<net.minecraft.world.World> worldKey, DimensionType dimensionType, WorldGenerationProgressListener worldGenerationProgressListener, net.minecraft.world.gen.chunk.ChunkGenerator chunkGenerator, boolean debugWorld, long seed, List<Spawner> spawners, boolean shouldTickTime, CallbackInfo ci) {
if(chunkGenerator instanceof FabricChunkGeneratorWrapper) {
@@ -1,7 +1,7 @@
package com.dfsek.terra.fabric.mixin.lifecycle.client;
import com.dfsek.terra.fabric.FabricEntryPoint;
import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent;
import com.dfsek.terra.fabric.FabricEntryPoint;
import com.dfsek.terra.fabric.generation.TerraGeneratorType;
import com.dfsek.terra.fabric.mixin.access.GeneratorTypeAccessor;
import net.minecraft.client.MinecraftClient;
@@ -1,7 +1,7 @@
package com.dfsek.terra.fabric.mixin.lifecycle.server;
import com.dfsek.terra.fabric.FabricEntryPoint;
import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent;
import com.dfsek.terra.fabric.FabricEntryPoint;
import net.minecraft.server.Main;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;