Skip to content

Commit

Permalink
fixes compat modules and legends trees
Browse files Browse the repository at this point in the history
legends trees do still make a strange error when the world loads, but it seems to work anyway
  • Loading branch information
Thutmose committed Dec 5, 2021
1 parent 5bd54f2 commit 5bd7cb7
Show file tree
Hide file tree
Showing 12 changed files with 283 additions and 277 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,25 @@ dependencies {
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'

//Computer Craft Support.
//implementation fg.deobf("org.squiddev:cc-tweaked-${version_cct_mc}:${version_cct}")
implementation fg.deobf("org.squiddev:cc-tweaked-${version_cct_mc}:${version_cct}")

//Lost Cities
//implementation "blank:lostcities-1.16-4.0.7-beta"

//Thut Essentials
//implementation "${depstr_thutessentials}"
implementation "${depstr_thutessentials}"

//JEI
// compile against the JEI API but do not include it at runtime
//compileOnly fg.deobf("mezz.jei:jei-${version_jei_mc}:${version_jei}:api")
compileOnly fg.deobf("mezz.jei:jei-${version_jei_mc}:${version_jei}:api")
// at runtime, use the full JEI jar
//runtimeOnly fg.deobf("mezz.jei:jei-${version_jei_mc}:${version_jei}")
runtimeOnly fg.deobf("mezz.jei:jei-${version_jei_mc}:${version_jei}")

//WHYLA
//implementation fg.deobf("curse.maven:Jade-${version_jade}")
implementation fg.deobf("curse.maven:Jade-${version_jade}")

//Minecolonies
//implementation "blank:minecolonies-1.17.1-1.0.23-ALPHA-api"
implementation "blank:minecolonies-1.17.1-1.0.23-ALPHA-api"

//Immersive Enginnering
//implementation "blusunrize:ImmersiveEngineering:0.15-+"
Expand All @@ -189,7 +189,7 @@ dependencies {
//implementation "blank:LibVulpes-1.16.5-1.0.1-6-api"

// Curios - Wearables Support
//implementation fg.deobf("curse.maven:curios-${version_curios}")
implementation fg.deobf("curse.maven:curios-${version_curios}")
}

sourceSets {
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ compile_name=pokecube-aio
author_name=Thutmose

# Mod Support versions
version_cct_mc=1.17.1
version_cct=1.98.2
version_jei_mc=1.17.1
version_jei=8.1.0.21
version_cct_mc=1.18
version_cct=1.99.0
version_jei_mc=1.18
version_jei=9.0.0.40
version_lostcities=1.16-4.0.3-alpha-deobf
version_minecolonies=api
depstr_thutessentials=blank:thutessentials-1.17.1-4.2.0-deobf
depstr_thutessentials=blank:thutessentials-1.18-4.2.0-deobf

version_jade=324717:3468298
version_curios=309927:3457073
version_jade=324717:3544015
version_curios=309927:3546313
version_journeymap=32274:3420875
Binary file added libs/thutessentials-1.18-4.2.0-deobf.jar
Binary file not shown.
Binary file added libs/thutessentials-1.18-4.2.0.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pending_mod_update/lostcities/Impl.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void register()
@SubscribeEvent
public static void buildStructure(final PickLocation event)
{
final MinecraftServer server = LogicalSidedProvider.INSTANCE.get(LogicalSide.SERVER);
final MinecraftServer server = Essentials.server;
final ServerLevel world = server.getLevel(event.getDimensionKey());
final IDimensionInfo dimInfo = Registration.LOSTCITY_FEATURE.getDimensionInfo(world);
if (dimInfo == null)
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/pokecube/legends/PokecubeLegends.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
import pokecube.legends.recipes.LegendsLootingRecipeManager;
import pokecube.legends.tileentity.RaidSpawn;
import pokecube.legends.tileentity.RingTile;
import pokecube.legends.worldgen.WorldgenFeatures;
import pokecube.legends.worldgen.trees.Trees;
import thut.api.terrain.BiomeDatabase;
import thut.core.common.ThutCore;

Expand Down Expand Up @@ -173,9 +175,6 @@ public static void registerFeatures(final RegistryEvent.Register<Feature<?>> eve
// Currently this uses same settings as gold ore.
WorldgenHandler.INSTANCE.register(check, GenerationStep.Decoration.UNDERGROUND_ORES,
ORE_SAPPHIRE_PLACEMENT);

// FIXME worldgen
// Trees.register();
}

@SubscribeEvent
Expand Down Expand Up @@ -265,7 +264,8 @@ public PokecubeLegends()
Type.MOUNTAIN, Type.RARE, Type.WET);

// FIXME worldgen features
// WorldgenFeatures.init(modEventBus);
// WorldgenFeatures.init(modEventBus);
Trees.init(modEventBus);
BlockInit.init();
ItemInit.init();
MoveRegister.init();
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/pokecube/legends/worldgen/WorldgenFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@
import pokecube.legends.worldgen.features.TaintedKelpFeature;
import pokecube.legends.worldgen.features.TaintedSeagrassFeature;
import pokecube.legends.worldgen.features.TemporalBambooFeature;
import pokecube.legends.worldgen.features.treedecorators.LeavesStringOfPearlsDecorator;
import pokecube.legends.worldgen.features.treedecorators.TrunkStringOfPearlsDecorator;
import pokecube.legends.worldgen.trees.treedecorators.LeavesStringOfPearlsDecorator;
import pokecube.legends.worldgen.trees.treedecorators.TrunkStringOfPearlsDecorator;

public class WorldgenFeatures
{
// public static final DeferredRegister<SurfaceBuilder<?>> SURFACE_BUILDERS = DeferredRegister.create(
// ForgeRegistries.SURFACE_BUILDERS, Reference.ID);
public static final DeferredRegister<Feature<?>> FEATURES = DeferredRegister.create(
ForgeRegistries.FEATURES, Reference.ID);
public static final DeferredRegister<TreeDecoratorType<?>> TREE_DECORATORS = DeferredRegister.create(
ForgeRegistries.TREE_DECORATOR_TYPES, Reference.ID);

// public static final RegistryObject<SurfaceBuilder<?>> BURNT_DESERT = WorldgenFeatures.SURFACE_BUILDERS.register("burnt_desert_builder",
// () -> new BurntDesertSurfaceBuilder(SurfaceBuilderBaseConfiguration.CODEC));
Expand Down Expand Up @@ -90,15 +88,10 @@ public class WorldgenFeatures
public static final RegistryObject<Feature<?>> STRING_OF_PEARLS = WorldgenFeatures.FEATURES.register("string_of_pearls_feature",
() -> new StringOfPearlsFeature(NoneFeatureConfiguration.CODEC));

public static final RegistryObject<TreeDecoratorType<?>> LEAVES_STRING_OF_PEARLS = WorldgenFeatures.TREE_DECORATORS.register("leaves_string_of_pearls_decorator",
() -> new TreeDecoratorType<>(LeavesStringOfPearlsDecorator.CODEC));
public static final RegistryObject<TreeDecoratorType<?>> TRUNK_STRING_OF_PEARLS = WorldgenFeatures.TREE_DECORATORS.register("trunk_string_of_pearls_decorator",
() -> new TreeDecoratorType<>(TrunkStringOfPearlsDecorator.CODEC));

public static void init(final IEventBus bus)
{
// WorldgenFeatures.SURFACE_BUILDERS.register(bus);
WorldgenFeatures.FEATURES.register(bus);
WorldgenFeatures.TREE_DECORATORS.register(bus);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public boolean place(final FeaturePlaceContext<BlockStateConfiguration> context)
{
pos = pos.below(4);
for (final StructureFeature<?> village : StructureFeature.NOISE_AFFECTING_FEATURES)
if (world.startsForFeature(SectionPos.of(pos), village).findAny().isPresent()) return false;
if (world.startsForFeature(SectionPos.of(pos), StructureFeature.VILLAGE).findAny().isPresent()) return false;
if (!world.startsForFeature(SectionPos.of(pos), village).isEmpty()) return false;
if (!world.startsForFeature(SectionPos.of(pos), StructureFeature.VILLAGE).isEmpty()) return false;
else
{
final boolean[] aboolean = new boolean[2048];
Expand Down

This file was deleted.

Loading

0 comments on commit 5bd7cb7

Please sign in to comment.