Skip to content

Commit

Permalink
Update to 1.20.
Browse files Browse the repository at this point in the history
- Update to 1.20 / 1.20.1
- Replace dead mod 'Craftable Lava'
- Replace dead mod 'Iron from the Earth'
- Add support for modded stone via c:stone
  • Loading branch information
gniftygnome committed Oct 24, 2023
1 parent 2e92be4 commit 3dbe95e
Show file tree
Hide file tree
Showing 24 changed files with 239 additions and 96 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
![icon](./src/main/resources/assets/skys-the-limit/icon.png)

# Skys the Limit
# Sky's the Limit
The Gnomecraft sky block support mod.

Skys the Limit requires [Cloth Config](https://github.com/shedaniel/cloth-config)!
Sky's the Limit requires [Cloth Config](https://github.com/shedaniel/cloth-config)!

## Features of the Skys the Limit mod
## Features of the Sky's the Limit mod

This mod provides support for the Gnomecraft sky block ecosystem; namely:

* Adding glue recipes and loot for mods in Gnomecraft sky block mod packs.
* Adds This Rocks! stone splitters as junk loot to fishing.
* Recipe for crafting This Rocks! stone splitters into Craftable Lava stone buckets.
* Recipe for crafting This Rocks! stone splitters into stone buckets.
* Recipe for crafting mixed This Rocks! stone splitters into cobblestone.
* Recipe for crafting Farmer's Delight tree bark into string.
* Recipe for crafting string into Farmer's Delight rope.
* Adding recipes and loot for vanilla Minecraft features to improve sky block play.
* Adds more ocean-related treasure loot to fishing.
* Adds Overworld base stone to vanilla tool crafting recipes.
* Recipe for crafting dirt and wheat seeds into grass blocks.
* Recipe for crafting moss carpets and bone meal into moss blocks.
* Recipe for crafting leather, string, and iron into saddles. (But why? Nobody knows...)
* In select cases when no existing mod seems to work, adding entire new sky block game features.
* Fog Catcher, an added block used to capture water from the fog that exists everywhere in Minecraft.
* Craft cobblestone into a stone bucket, then blast it slowly into a Lava Bucket in a blast furnace.
* Smelt or blast dirt blocks into iron bloom, which can be crafted into raw iron.
* Providing in-game documentation of Gnomecraft sky block play.
* (not yet implemented)

## What can you do with this mod?

Whatever you want. The main purpose of Skys the Limit is to be used in my sky block mod pack but feel free to
Whatever you want. The main purpose of Sky's the Limit is to be used in my sky block mod pack but feel free to
use it in yours or steal code from it or whatever. I will also consider feature requests and implement them if
I like them. Although this mod is extensively configurable, all features are enabled by default because they
would not be in the mod if I didn't want to use them.

## Related mods

At this time, the following related mods are required to activate the full feature set of Skys the Limit:
At this time, the following related mods are required to activate the full feature set of Sky's the Limit:

* [Craftable Lava](https://www.curseforge.com/minecraft/mc-mods/lava-bucket-bending-of-the-fire)
* [Farmer's Delight](https://github.com/newhoryzon/farmers-delight-fabric)
* [This Rocks!](https://github.com/TeamMidnightDust/ThisRocks)

Expand Down
20 changes: 7 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'fabric-loom' version '1.4.+'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.7.3'
}

version = project.mod_version
Expand All @@ -12,13 +11,13 @@ loom {

runs {
datagen {
server()
inherit server
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.modid=${project.archives_base_name}"

name = "Data Generation"
runDir = "build/datagen"

vmArg("-Dfabric-api.datagen")
vmArg("-Dfabric-api.datagen.output-dir=${file("src/main/generated")}")
runDir "build/datagen"
}
}
}
Expand All @@ -33,10 +32,6 @@ sourceSets {
}
}

quiltflower {
addToRuntimeClasspath.set(true)
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand Down Expand Up @@ -77,7 +72,6 @@ dependencies {
modImplementation "me.shedaniel.cloth:cloth-config-fabric:${project.clothconfig_version}"
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
// compatibility
modImplementation "curse.maven:craftablelava-678266:${project.craftablelava_cursed_id}"
modImplementation "curse.maven:farmers-delight-fabric-482834:${project.farmersdelight_cursed_id}"
modImplementation "curse.maven:midnightlib-488090:${project.midnightlib_cursed_id}"
modImplementation "curse.maven:this-rocks-416283:${project.rocks_cursed_id}"
Expand Down
21 changes: 10 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.28
loader_version=0.14.10
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.22
# Mod Properties
mod_version=0.1.1
mod_version=0.2.0
maven_group=net.gnomecraft
archives_base_name=skys-the-limit
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.62.0+1.19.2
fabric_version=0.90.0+1.20.1
# functionality dependencies
clothconfig_version=8.2.88
modmenu_version=4.1.0
clothconfig_version=11.1.106
modmenu_version=7.2.2
# mod compatibility
craftablelava_cursed_id=4022082
farmersdelight_cursed_id=3947019
midnightlib_cursed_id=3999849
rocks_cursed_id=3837155
farmersdelight_cursed_id=4712795
midnightlib_cursed_id=4576371
rocks_cursed_id=4580121
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions src/main/java/net/gnomecraft/skysthelimit/SkysTheLimit.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.gnomecraft.skysthelimit.fabricresourcecondition.SkysTheLimitResourceConditions;
import net.gnomecraft.skysthelimit.item.SkysTheLimitItems;
import net.gnomecraft.skysthelimit.loot.SkysTheLimitFishingLoot;
import net.gnomecraft.skysthelimit.tag.SkysTheLimitBlockTags;
import net.gnomecraft.skysthelimit.tag.SkysTheLimitItemTags;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -26,6 +27,7 @@ public void onInitialize() {
SkysTheLimitBlocks.init();
SkysTheLimitItems.init();
SkysTheLimitCompostMoreItems.init();
SkysTheLimitBlockTags.init();
SkysTheLimitItemTags.init();
SkysTheLimitFishingLoot.init();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ else if (biome.getTemperature() <= 0.15f && time > 18000) {
}
// Twice as fast in the wettest biomes as in the driest.
else {
localizedDripChance *= 0.5f + 0.5f * world.getBiome(pos).value().getDownfall();
localizedDripChance *= 0.5f + 0.5f * world.getBiome(pos).value().weather.downfall();
}
}
if (dripChance > localizedDripChance) {
Expand All @@ -82,7 +82,7 @@ else if (biome.getTemperature() <= 0.15f && time > 18000) {

// Tell the cauldron to get to work.
world.syncWorldEvent(1504, pos, 0);
world.createAndScheduleBlockTick(cauldronPos,
world.scheduleBlockTick(cauldronPos,
world.getBlockState(cauldronPos).getBlock(),
50 + pos.getY() - cauldronPos.getY());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.gnomecraft.skysthelimit.SkysTheLimit;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.block.MapColor;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

public class SkysTheLimitBlocks {
public static final Identifier FOG_CATCHER_BLOCK_ID = new Identifier(SkysTheLimit.MOD_ID, "fog_catcher");
public static Block FOG_CATCHER_BLOCK = Registry.register(Registry.BLOCK, FOG_CATCHER_BLOCK_ID, new FogCatcherBlock(FabricBlockSettings.of(Material.METAL).hardness(1.0f).ticksRandomly()));

public static Block FOG_CATCHER_BLOCK = Registry.register(Registries.BLOCK, FOG_CATCHER_BLOCK_ID, new FogCatcherBlock(FabricBlockSettings.create().hardness(1.0f).mapColor(MapColor.IRON_GRAY).sounds(BlockSoundGroup.METAL).ticksRandomly()));

public static void init() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public class SkysTheLimitConfig implements ConfigData {
@ConfigEntry.Category("recipes")
public Boolean barkToString = true;

@ConfigEntry.Category("recipes")
public Boolean blastCobbleToLava = true;

@ConfigEntry.Category("recipes")
public Boolean craftableSaddle = true;

Expand All @@ -56,6 +59,9 @@ public class SkysTheLimitConfig implements ConfigData {
@ConfigEntry.Category("recipes")
public Boolean mossCarpetToBlocks = true;

@ConfigEntry.Category("recipes")
public Boolean smeltDirtToIron = true;

@ConfigEntry.Category("recipes")
public Boolean snowToWater = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package net.gnomecraft.skysthelimit.data;

import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider;
import net.gnomecraft.skysthelimit.block.SkysTheLimitBlocks;

public class SkysTheLimitBlockLootTableProvider extends FabricBlockLootTableProvider {
protected SkysTheLimitBlockLootTableProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator);
protected SkysTheLimitBlockLootTableProvider(FabricDataOutput dataOutput) {
super(dataOutput);
}

@Override
protected void generateBlockLootTables() {
public void generate() {
// simple blocks
addDrop(SkysTheLimitBlocks.FOG_CATCHER_BLOCK);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
package net.gnomecraft.skysthelimit.data;

import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.gnomecraft.skysthelimit.block.SkysTheLimitBlocks;
import net.minecraft.tag.BlockTags;
import net.gnomecraft.skysthelimit.tag.SkysTheLimitBlockTags;
import net.minecraft.block.Blocks;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;

import java.util.concurrent.CompletableFuture;

public class SkysTheLimitBlockTagProvider extends FabricTagProvider.BlockTagProvider {
public SkysTheLimitBlockTagProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator);
public SkysTheLimitBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
super(output, registriesFuture);
}

@Override
protected void generateTags() {
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
// basic block tags
this.getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
.add(SkysTheLimitBlocks.FOG_CATCHER_BLOCK);

// Make sure vanilla overworld base stone is in c:stone
this.getOrCreateTagBuilder(SkysTheLimitBlockTags.COMMON_STONE)
.add(Blocks.STONE)
.add(Blocks.DEEPSLATE)
.add(Blocks.ANDESITE)
.add(Blocks.DIORITE)
.add(Blocks.GRANITE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
public class SkysTheLimitDatagen implements DataGeneratorEntrypoint {
@Override
public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) {
dataGenerator.addProvider(SkysTheLimitBlockLootTableProvider::new);
dataGenerator.addProvider(SkysTheLimitBlockTagProvider::new);
dataGenerator.addProvider(SkysTheLimitItemTagProvider::new);
dataGenerator.addProvider(SkysTheLimitRecipeProvider::new);
FabricDataGenerator.Pack pack = dataGenerator.createPack();

pack.addProvider(SkysTheLimitBlockLootTableProvider::new);
SkysTheLimitBlockTagProvider blockTagProvider = pack.addProvider(SkysTheLimitBlockTagProvider::new);
pack.addProvider((output, registries) -> new SkysTheLimitItemTagProvider(output, registries, blockTagProvider));
pack.addProvider(SkysTheLimitRecipeProvider::new);
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
package net.gnomecraft.skysthelimit.data;

import eu.midnightdust.motschen.rocks.RocksMain;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.gnomecraft.skysthelimit.tag.SkysTheLimitBlockTags;
import net.gnomecraft.skysthelimit.tag.SkysTheLimitItemTags;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.ItemTags;
import org.jetbrains.annotations.Nullable;

import java.util.concurrent.CompletableFuture;

public class SkysTheLimitItemTagProvider extends FabricTagProvider.ItemTagProvider {
public SkysTheLimitItemTagProvider(FabricDataGenerator dataGenerator) {
super(dataGenerator);
public SkysTheLimitItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture, @Nullable BlockTagProvider blockTagProvider) {
super(output, completableFuture, blockTagProvider);
}

@Override
protected void generateTags() {
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
// Make sure This Rocks! splitters are in c:stones
this.getOrCreateTagBuilder(SkysTheLimitItemTags.COMMON_STONES)
.add(RocksMain.CobblestoneSplitter)
.add(RocksMain.AndesiteSplitter)
.add(RocksMain.DioriteSplitter)
.add(RocksMain.GraniteSplitter);

// Copy c:stone from the block tag
this.copy(SkysTheLimitBlockTags.COMMON_STONE, SkysTheLimitItemTags.COMMON_STONE);

// Add c:stone to the stone tool crafting materials
this.getOrCreateTagBuilder(ItemTags.STONE_TOOL_MATERIALS)
.addTag(SkysTheLimitItemTags.COMMON_STONE);
}
}
Loading

0 comments on commit 3dbe95e

Please sign in to comment.