Skip to content

Commit

Permalink
switched back to a single module system
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Sep 13, 2024
1 parent 82389fb commit 3048f7d
Show file tree
Hide file tree
Showing 615 changed files with 21 additions and 149 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ bin/
common/src/generated/
run/

.DS_Store
.DS_Store
src/generated/resources
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {

forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"

modImplementation ("maven.modrinth:fb-api-reforged:${rootProject.fbapi_reforged_version}")
modImplementation include ("maven.modrinth:fb-api-reforged:${rootProject.fbapi_reforged_version}")
//modImplementation "com.github.Reforged-Mods.Terraform-Reforged:terraform-biome-remapper-api-v1:${project.terraform_version}"
modImplementation include("io.github.reforgedmods.terraform-api:terraform-shapes-api-v1:${project.terraform_version}")
modImplementation include("io.github.reforgedmods.terraform-api:terraform-wood-api-v1:${project.terraform_version}")
Expand Down
25 changes: 0 additions & 25 deletions client/src/main/resources/META-INF/mods.toml

This file was deleted.

Binary file removed client/src/main/resources/assets/cinderscapes/icon.png
Binary file not shown.
6 changes: 0 additions & 6 deletions client/src/main/resources/pack.mcmeta

This file was deleted.

43 changes: 0 additions & 43 deletions common/src/main/resources/META-INF/mods.toml

This file was deleted.

Binary file removed common/src/main/resources/assets/cinderscapes/icon.png
Binary file not shown.
5 changes: 0 additions & 5 deletions common/src/main/resources/cinderscapes-common.accesswidener

This file was deleted.

6 changes: 0 additions & 6 deletions common/src/main/resources/pack.mcmeta

This file was deleted.

5 changes: 1 addition & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ pluginManagement {
}
}

rootProject.name = "cinderscapes-forge"
include "client"
include "common"
include "worldgen"
rootProject.name = "cinderscapes-forge"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.terraformersmc.cinderscapes;

import com.terraformersmc.cinderscapes.biome.CinderscapesBiomeRemappings;
import com.terraformersmc.cinderscapes.client.CinderscapesClient;
import com.terraformersmc.cinderscapes.config.CinderscapesConfig;
import com.terraformersmc.cinderscapes.data.CinderscapesDatagen;
import com.terraformersmc.cinderscapes.init.CinderscapesBiomes;
Expand All @@ -15,6 +16,7 @@
import com.terraformersmc.cinderscapes.tag.CinderscapesBlockTags;
import com.terraformersmc.cinderscapes.tag.CinderscapesItemTags;
import com.terraformersmc.cinderscapes.util.NoiseCollisionChecker;
import com.terraformersmc.cinderscapes.worldgen.CinderscapesWorldgen;
import net.minecraft.block.Block;
import net.minecraft.block.ComposterBlock;
import net.minecraft.entity.EntityType;
Expand All @@ -28,8 +30,10 @@
import net.minecraft.world.Heightmap;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.Feature;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.ModContainer;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.ModLoadingContext;
Expand All @@ -46,7 +50,7 @@
import java.util.ArrayList;
import java.util.List;

@Mod("cinderscapes_common")
@Mod(Cinderscapes.NAMESPACE)
public class Cinderscapes {
public static final String NAMESPACE = "cinderscapes";
public static final Logger LOGGER = LogManager.getLogger(StringUtils.capitalize(NAMESPACE));
Expand All @@ -60,6 +64,8 @@ public Cinderscapes(){
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
FMLJavaModLoadingContext.get().getModEventBus().register(this);

DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> CinderscapesClient::new);
new CinderscapesWorldgen();
CinderscapesGroups.init();
}

Expand All @@ -75,8 +81,6 @@ private void setup(final FMLCommonSetupEvent e) {
@SubscribeEvent
@SuppressWarnings({"unchecked", "rawtypes"})
public void onRegister(final RegistryEvent.Register<?> event){
ModContainer previous = ModLoadingContext.get().getActiveContainer();
ModLoadingContext.get().setActiveContainer(ModList.get().getModContainerById(NAMESPACE).isPresent() ? ModList.get().getModContainerById(NAMESPACE).get() : previous);
if (event.getRegistry() == ForgeRegistries.FEATURES){
for (Identifier id : CinderscapesFeatures.FEATURES.keySet()){
Feature<?> feature = CinderscapesFeatures.FEATURES.get(id);
Expand Down Expand Up @@ -139,7 +143,6 @@ public void onRegister(final RegistryEvent.Register<?> event){
((IForgeRegistry)event.getRegistry()).register(item);
}
}
ModLoadingContext.get().setActiveContainer(previous);
}

public void onInitialize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos)
}

@Override
public AbstractBlock.OffsetType getOffsetType() {
return AbstractBlock.OffsetType.XZ;
public OffsetType getOffsetType() {
return OffsetType.XZ;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Locale;

public class GhastlyEctoplasmBlock extends Block {
public static final EnumProperty<GhastlyEctoplasmBlock.Type> TYPE = EnumProperty.of("type", GhastlyEctoplasmBlock.Type.class);
public static final EnumProperty<Type> TYPE = EnumProperty.of("type", Type.class);

public GhastlyEctoplasmBlock(Settings settings) {
super(settings);
Expand All @@ -28,7 +28,7 @@ public GhastlyEctoplasmBlock(Settings settings) {
@Override
@SuppressWarnings("deprecation")
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
return state.get(GhastlyEctoplasmBlock.TYPE) == GhastlyEctoplasmBlock.Type.BOTTOM ? Block.createCuboidShape(3.0D, 2.5D, 3.0D, 13.0D, 16.0D, 13.0D) : Block.createCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
return state.get(GhastlyEctoplasmBlock.TYPE) == Type.BOTTOM ? Block.createCuboidShape(3.0D, 2.5D, 3.0D, 13.0D, 16.0D, 13.0D) : Block.createCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@SuppressWarnings("unused")
@Mod("cinderscapes_client")
public class CinderscapesClient {

public CinderscapesClient(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.forge.event.lifecycle.GatherDataEvent;

@Mod.EventBusSubscriber(modid = Cinderscapes.NAMESPACE + "_common", bus = Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = Cinderscapes.NAMESPACE, bus = Mod.EventBusSubscriber.Bus.MOD)
public class CinderscapesDatagen{

public static void onInitializeDataGenerator(DataGenerator dataGenerator, ExistingFileHelper helper){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static boolean modifiedLine(StructureWorldAccess world, BlockState state,
int dx = to.getX() - from.getX();
int dy = to.getY() - from.getY();
int dz = to.getZ() - from.getZ();
int dt = java.lang.Math.max(java.lang.Math.max(java.lang.Math.abs(dx), java.lang.Math.abs(dy)), java.lang.Math.abs(dz));
int dt = Math.max(Math.max(Math.abs(dx), Math.abs(dy)), Math.abs(dz));

int randomDroop = -(random.nextInt(dt/2) + 1);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod("cinderscapes_worldgen")
public class CinderscapesWorldgen {

public CinderscapesWorldgen(){
Expand Down
Loading

0 comments on commit 3048f7d

Please sign in to comment.