-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First BetterFurnaces Reforged Architectury port version
- Loading branch information
Wilyicaro
committed
Dec 4, 2022
0 parents
commit ac966ed
Showing
568 changed files
with
16,800 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
build/ | ||
*.ipr | ||
run/ | ||
*.iws | ||
out/ | ||
*.iml | ||
.gradle/ | ||
output/ | ||
bin/ | ||
libs/ | ||
|
||
.classpath | ||
.project | ||
.idea/ | ||
classes/ | ||
.metadata | ||
.vscode | ||
.settings | ||
*.launch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
plugins { | ||
id "architectury-plugin" version "3.4-SNAPSHOT" | ||
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false | ||
} | ||
|
||
architectury { | ||
minecraft = rootProject.minecraft_version | ||
} | ||
|
||
subprojects { | ||
apply plugin: "dev.architectury.loom" | ||
|
||
loom { | ||
silentMojangMappingsLicense() | ||
} | ||
|
||
dependencies { | ||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" | ||
// The following line declares the mojmap mappings, you may use other mappings as well | ||
mappings loom.officialMojangMappings() | ||
// The following line declares the yarn mappings you may select this one as well. | ||
// mappings "net.fabricmc:yarn:1.19.2+build.3:v2" | ||
} | ||
} | ||
|
||
allprojects { | ||
apply plugin: "java" | ||
apply plugin: "architectury-plugin" | ||
apply plugin: "maven-publish" | ||
|
||
archivesBaseName = rootProject.archives_base_name | ||
version = rootProject.mod_version | ||
group = rootProject.maven_group | ||
|
||
repositories { | ||
maven { | ||
url "https://www.cursemaven.com" | ||
} | ||
maven { | ||
// location of a maven mirror for JEI files, as a fallback | ||
name = "ModMaven" | ||
url = "https://modmaven.k-4u.nl" | ||
} | ||
maven { | ||
name = "Fuzs Mod Resources" | ||
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" | ||
} | ||
exclusiveContent { | ||
forRepository { | ||
maven { | ||
name = "Modrinth" | ||
url = "https://api.modrinth.com/maven" | ||
} | ||
} | ||
filter { | ||
includeGroup "maven.modrinth" | ||
} | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
options.release = 17 | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
architectury { | ||
common(rootProject.enabled_platforms.split(",")) | ||
} | ||
|
||
loom { | ||
accessWidenerPath = file("src/main/resources/betterfurnaces.accesswidener") | ||
} | ||
|
||
dependencies { | ||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies | ||
// Do NOT use other classes from fabric loader | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" | ||
modImplementation "mezz.jei:jei-${jei_minecraft_version}-common-api:${jei_version}" | ||
modImplementation "maven.modrinth:factory_api:${factory_api_version}:common" | ||
modImplementation "net.minecraftforge:forgeconfigapiport-fabric:4.0.0" | ||
// Remove the next line if you don't want to depend on the API | ||
modApi "dev.architectury:architectury:${rootProject.architectury_version}" | ||
} | ||
|
||
publishing { | ||
publications { | ||
|
||
|
||
mavenCommon(MavenPublication) { | ||
artifactId = rootProject.archives_base_name | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
common/src/main/java/wily/betterfurnaces/BetterFurnacesPlatform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package wily.betterfurnaces; | ||
|
||
import dev.architectury.event.events.common.ChunkEvent; | ||
import dev.architectury.injectables.annotations.ExpectPlatform; | ||
import net.minecraft.server.level.ChunkHolder; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.tags.TagKey; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.level.ChunkPos; | ||
import wily.betterfurnaces.blockentity.AbstractCobblestoneGeneratorBlockEntity; | ||
import wily.betterfurnaces.blockentity.AbstractSmeltingBlockEntity; | ||
|
||
import java.nio.file.Path; | ||
import java.util.function.IntConsumer; | ||
import java.util.function.IntSupplier; | ||
|
||
public class BetterFurnacesPlatform { | ||
@ExpectPlatform | ||
public static Path getConfigDirectory() { | ||
throw new AssertionError(); | ||
} | ||
@ExpectPlatform | ||
public static TagKey<Item> getCommonItemTag(String tag){throw new AssertionError();} | ||
@ExpectPlatform | ||
public static void smeltingAutoIO(AbstractSmeltingBlockEntity be){ | ||
throw new AssertionError(); | ||
} | ||
@ExpectPlatform | ||
public static void transferEnergySides(AbstractSmeltingBlockEntity be){ | ||
throw new AssertionError(); | ||
} | ||
@ExpectPlatform | ||
public static void outputAutoIO(AbstractCobblestoneGeneratorBlockEntity be){ | ||
throw new AssertionError(); | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
common/src/main/java/wily/betterfurnaces/BetterFurnacesReforged.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package wily.betterfurnaces; | ||
|
||
import dev.architectury.registry.CreativeTabRegistry; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import wily.betterfurnaces.gitup.UpCheck; | ||
import wily.betterfurnaces.init.Registration; | ||
import wily.betterfurnaces.network.Messages; | ||
|
||
// The value here should match an entry in the META-INF/mods.toml file | ||
|
||
public class BetterFurnacesReforged | ||
{ | ||
|
||
public static final String MOD_ID = "betterfurnacesreforged"; | ||
public static final String VERSION = "1.0.3"; | ||
public static final String MC_VERSION = "1.19.2"; | ||
|
||
public static final Logger LOGGER = LogManager.getLogger(); | ||
public static final CreativeModeTab ITEM_GROUP = CreativeTabRegistry.create(new ResourceLocation(BetterFurnacesReforged.MOD_ID,"tab"), ()-> Registration.EXTREME_FURNACE.get().asItem().getDefaultInstance()); | ||
|
||
public static void init(){ | ||
|
||
Messages.registerMessages("betterfurnaces_network"); | ||
|
||
Config.setupPlatformConfig(); | ||
|
||
Registration.init(); | ||
|
||
if (Config.checkUpdates) { | ||
new UpCheck(); | ||
} else { | ||
LOGGER.warn("You have disabled BetterFurnace's Update Checker, to re-enable: change the value of Update Checker in .minecraft->config->betterfurnacesreforged-client.toml to 'true'."); | ||
} | ||
|
||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package wily.betterfurnaces; | ||
|
||
|
||
import dev.architectury.injectables.annotations.ExpectPlatform; | ||
import dev.architectury.platform.Platform; | ||
|
||
|
||
public class Config { | ||
|
||
public static final String CATEGORY_GENERAL = "general"; | ||
public static final String CATEGORY_FURNACE = "furnaces"; | ||
public static final String CATEGORY_MODDED_FURNACE = "modded_furnaces"; | ||
public static final String CATEGORY_JEI = "jei"; | ||
public static final String CATEGORY_UPDATES = "updates"; | ||
public static final String CATEGORY_MISC = "misc"; | ||
|
||
public static String getLiquidXPType() { | ||
if (xpFluidType == 0) { | ||
return "mob_grinding_utils:fluid_xp"; | ||
} else if (xpFluidType == 1) { | ||
return "industrialforegoing:essence"; | ||
} else if (xpFluidType == 2) { | ||
return "cyclic:xpjuice"; | ||
} else if (xpFluidType == 3) { | ||
return "reliquary:xp_juice"; | ||
} | ||
return "mob_grinding_utils:fluid_xp"; | ||
} | ||
|
||
|
||
public static String getLiquidXPMod() { | ||
String s = getLiquidXPType(); | ||
return s.substring(0, s.indexOf(":")); | ||
} | ||
|
||
public static void setupPlatformConfig(){ | ||
if (Platform.isModLoaded("forgeconfigapiport") || Platform.isForge()) ForgeConfigCompat.setupPlatformConfig(); | ||
else BetterFurnacesReforged.LOGGER.warn("Currently ForgeConfigApiPort isn't installed, to config BetterFurnaces options, please consider install it!"); | ||
} | ||
|
||
|
||
|
||
public static boolean checkUpdates = true; | ||
public static int cacheCapacity = 10; | ||
public static int furnaceXPDropValue = 1; | ||
public static int furnaceXPDropValue2 = 100000; | ||
|
||
public static boolean enableJeiPlugin = true; | ||
|
||
public static boolean enableJeiCatalysts = true; | ||
|
||
public static boolean enableJeiClickArea = true; | ||
|
||
public static int copperTierSpeed = 175; | ||
public static int ironTierSpeed = 150; | ||
public static int steelTierSpeed = 125; | ||
public static int goldTierSpeed = 100; | ||
public static int amethystTierSpeed = 75; | ||
public static int diamondTierSpeed = 50; | ||
public static int platinumTierSpeed = 25; | ||
public static int netherhotTierSpeed = 8; | ||
public static int extremeTierSpeed = 4; | ||
public static int ultimateTierSpeed = 1; | ||
|
||
public static int xpFluidType = 0; | ||
|
||
|
||
} |
Oops, something went wrong.