Skip to content

Commit

Permalink
Final Cleanup & 0.1.0 Alpha Release
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Nov 2, 2023
1 parent 807be71 commit 486ca9e
Show file tree
Hide file tree
Showing 27 changed files with 717 additions and 210 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1690966774
//version: 1695527071
/*
* DO NOT CHANGE THIS FILE!
* Also, you may replace this file at any time if there is an update available.
Expand All @@ -24,9 +24,9 @@ plugins {
id 'eclipse'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.23'
id 'net.darkhax.curseforgegradle' version '1.0.14' apply false
id 'com.modrinth.minotaur' version '2.8.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
id 'net.darkhax.curseforgegradle' version '1.1.16' apply false
id 'com.modrinth.minotaur' version '2.8.4' apply false
id 'com.diffplug.spotless' version '6.13.0' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ curseForgeProjectId = 932060
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
curseForgeRelations = requiredDependency:codechicken-lib-1-8;requiredDependency:gregtech-ce-unofficial;requiredDependency:gregicality-multiblocks;requiredDependency:groovyscript;incompatible:gregtechce;
curseForgeRelations = requiredDependency:codechicken-lib-1-8;requiredDependency:gregtech-ce-unofficial;requiredDependency:gregicality-multiblocks;requiredDependency:groovyscript;incompatible:gregtechce;incompatible:contenttweaker;

# This project's release type on CurseForge and/or Modrinth
# Alternatively this can be set with the 'RELEASE_TYPE' environment variable.
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ plugins {

blowdryerSetup {
repoSubfolder 'spotless'
github 'GregTechCEu/Buildscripts', 'tag', 'v1.0.0'
//devLocal '.' // Use this when testing config updated locally
github 'GregTechCEu/Buildscripts', 'tag', 'v1.0.7'
}

rootProject.name = rootProject.projectDir.getName()
18 changes: 6 additions & 12 deletions src/main/java/com/nomiceu/nomilabs/NomiLabs.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
name = LabsValues.LABS_MODNAME,
acceptedMinecraftVersions = "[1.12.2]",
dependencies = "required:forge@[14.23.5.2847,);"
+ "required-after:gregtech;")
+ "required-after:codechickenlib@[3.2.3,);"
+ "required-after:groovyscript@[0.6.0,);"
+ "required-after:gregtech;"
+ "after:appliedenergistics2;"
+ "after:jei@[4.15.0,);"
+ "after:theoneprobe;")
@SuppressWarnings("unused")
public class NomiLabs {
public static final Logger LOGGER = LogManager.getLogger(LabsValues.LABS_MODID);
Expand All @@ -42,17 +47,6 @@ public void postInit(FMLPostInitializationEvent event) {
CommonProxy.postInit();
}

@SubscribeEvent
public void registerRecipes(RegistryEvent.Register<IRecipe> event) {
event.getRegistry().register(new HandFramingRecipe(Item.getByNameOrId("contenttweaker:hand_framing_tool").getDefaultInstance())
.setRegistryName(LabsItems.HAND_FRAMING_TOOL.getRegistryName() + "_recipe"));
}
@SubscribeEvent
// Register blocks here (Remove if not needed)
public void registerBlocks(RegistryEvent.Register<Block> event) {

}

@EventHandler
// load "Do your mod setup. Build whatever data structures you care about." (Remove if not needed)
public void init(FMLInitializationEvent event) {
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.nomiceu.nomilabs.config;

import com.nomiceu.nomilabs.LabsValues;
import net.minecraftforge.common.config.Config;

@Config(modid = LabsValues.LABS_MODID)
public class LabsConfig {
@Config.Comment({"Whether to enable Custom Blocks, Items and Fluids.", "They will not have recipes.", "Default: True"})
@Config.RequiresMcRestart
public static boolean enableCustomContent = true;

@Config.Comment({"Whether to enable GT Custom Content.", "Includes Custom Multiblocks, Materials, Material Changes and Meta Blocks.", "They will not have recipes, but multiblocks will have recipeMaps.", "In Beta.", "Default: False"})
@Config.RequiresMcRestart
public static boolean enableGTCustomContent = false;
}
16 changes: 11 additions & 5 deletions src/main/java/com/nomiceu/nomilabs/event/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.nomiceu.nomilabs.LabsValues;
import com.nomiceu.nomilabs.block.registry.LabsMetaBlocks;
import com.nomiceu.nomilabs.config.LabsConfig;
import com.nomiceu.nomilabs.fluid.registry.LabsFluids;
import com.nomiceu.nomilabs.gregtech.LabsTextures;
import com.nomiceu.nomilabs.item.registry.LabsItems;
Expand All @@ -18,18 +19,23 @@
public class ClientProxy {

public static void preInit() {
LabsTextures.preInit();
if (LabsConfig.enableCustomContent)
LabsTextures.preInit();
}

@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
LabsItems.registerModels();
LabsMetaBlocks.registerModels();
LabsFluids.registerFluidBlockModels();
if (LabsConfig.enableCustomContent) {
LabsItems.registerModels();
LabsFluids.registerFluidBlockModels();
}
if (LabsConfig.enableGTCustomContent)
LabsMetaBlocks.registerModels();
}

@SubscribeEvent
public static void registerFluidModels(TextureStitchEvent.Pre event) {
LabsFluids.registerFluidModels(event);
if (LabsConfig.enableCustomContent)
LabsFluids.registerFluidModels(event);
}
}
54 changes: 40 additions & 14 deletions src/main/java/com/nomiceu/nomilabs/event/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,83 @@
import com.nomiceu.nomilabs.LabsValues;
import com.nomiceu.nomilabs.block.registry.LabsBlocks;
import com.nomiceu.nomilabs.block.registry.LabsMetaBlocks;
import com.nomiceu.nomilabs.config.LabsConfig;
import com.nomiceu.nomilabs.creativetab.registry.LabsCreativeTabs;
import com.nomiceu.nomilabs.fluid.registry.LabsFluids;
import com.nomiceu.nomilabs.gregtech.LabsRecipeMaps;
import com.nomiceu.nomilabs.gregtech.material.registry.LabsMaterials;
import com.nomiceu.nomilabs.gregtech.multiblock.registry.LabsMultiblocks;
import com.nomiceu.nomilabs.item.registry.LabsItems;
import com.nomiceu.nomilabs.recipe.GreenhouseTestRecipes;
import com.nomiceu.nomilabs.recipe.HandFramingRecipe;
import com.nomiceu.nomilabs.util.LabsNames;
import gregtech.api.unification.material.event.MaterialEvent;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.registries.IForgeRegistry;

import java.util.Objects;

@Mod.EventBusSubscriber(modid = LabsValues.LABS_MODID)
@SuppressWarnings("unused")
public class CommonProxy {

public static void preInit() {
LabsCreativeTabs.preInit();
LabsItems.preInit();
LabsBlocks.preInit();
LabsMetaBlocks.preInit();
LabsRecipeMaps.preInit();
LabsFluids.preInit();
if (LabsConfig.enableCustomContent) {
LabsCreativeTabs.preInit();
LabsItems.preInit();
LabsBlocks.preInit();
LabsFluids.preInit();
}
if (LabsConfig.enableGTCustomContent) {
LabsMetaBlocks.preInit();
LabsRecipeMaps.preInit();
}
}

public static void postInit() {
LabsMultiblocks.postInit();
GreenhouseTestRecipes.postInit();
if (LabsConfig.enableGTCustomContent)
LabsMultiblocks.postInit();
// GreenhouseTestRecipes.postInit();
}

@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
IForgeRegistry<Item> registry = event.getRegistry();
LabsItems.register(registry);
LabsMetaBlocks.registerItems(registry);
if (LabsConfig.enableCustomContent)
LabsItems.register(registry);
if (LabsConfig.enableGTCustomContent)
LabsMetaBlocks.registerItems(registry);
}

@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
IForgeRegistry<Block> registry = event.getRegistry();
LabsBlocks.register(registry);
LabsMetaBlocks.registerBlocks(registry);
if (LabsConfig.enableCustomContent)
LabsBlocks.register(registry);
if (LabsConfig.enableGTCustomContent)
LabsMetaBlocks.registerBlocks(registry);
}

@SubscribeEvent(priority = EventPriority.HIGH)
public static void registerMaterials(MaterialEvent event) {
LabsMaterials.init();
LabsMaterials.materialChanges();
if (LabsConfig.enableGTCustomContent) {
LabsMaterials.init();
LabsMaterials.materialChanges();
}
}

@SubscribeEvent
public void registerRecipes(RegistryEvent.Register<IRecipe> event) {
if (LabsConfig.enableCustomContent) {
event.getRegistry().register(new HandFramingRecipe(Objects.requireNonNull(Item.getByNameOrId("contenttweaker:hand_framing_tool")).getDefaultInstance())
.setRegistryName(LabsNames.makeLabsName(LabsItems.HAND_FRAMING_TOOL.getRegistryName() + "_recipe")));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ public class LabsItems {

public static ItemBase MAGNETRON;

public static ItemBase PULSATING_DUST;
public static ItemBase PULSATING_MESH;

/**
* Custom Behavior Items
* These are Items not extending BaseItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public static void initMisc() {
ULTRA_DENSE_HYDROGEN = createItem(new ItemBase(makeCTName("ultradensehydrogen"), LabsCreativeTabs.TAB_NOMI_LABS));

MAGNETRON = createItem(new ItemBase(makeCTName("magnetron"), LabsCreativeTabs.TAB_NOMI_LABS));

PULSATING_DUST = createItem(new ItemBase(makeCTName("pulsatingdust"), LabsCreativeTabs.TAB_NOMI_LABS));
PULSATING_MESH = createItem(new ItemBase(makeCTName("pulsatingmesh"), LabsCreativeTabs.TAB_NOMI_LABS));
}

public static void initCustomBehavior() {
Expand Down
13 changes: 8 additions & 5 deletions src/main/resources/assets/contenttweaker/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ item.contenttweaker.blazepowder.name=Blaze Powder
item.contenttweaker.grainsofinnocence.name=Grains Of Innocence

item.contenttweaker.hotdraconiumingot.name=Hot Draconium Ingot
item.contenttweaker.exoticnomilabs.materialscatalyst.name=Exotic Materials Catalyst
item.contenttweaker.exoticmaterialscatalyst.name=Exotic Materials Catalyst
item.contenttweaker.eternalcatalyst.name=Eternal Catalyst
item.contenttweaker.draconicstemcells.name=Draconic Stem Cells
item.contenttweaker.gemsensor.name=Gemstone Sensor
Expand Down Expand Up @@ -379,25 +379,28 @@ item.contenttweaker.dark_red_coal.name=Dark Red Coal

item.contenttweaker.hand_framing_tool.name=Hand Framing Tool

item.contenttweaker.hand_framing_tool.tooltip.material.not_set=Put this tool in a Framing Table to set its Framing Data!
item.contenttweaker.hand_framing_tool.tooltip.material.not_set=Put this tool in a Framing Table or a Crafting Table to set its Framing Data!

item.contenttweaker.hand_framing_tool.tooltip.material.side=Side
item.contenttweaker.hand_framing_tool.tooltip.material.trim=Trim
item.contenttweaker.hand_framing_tool.tooltip.material.front=Front

item.contenttweaker.hand_framing_tool.desc1=Frame your tools by hand!
item.contenttweaker.hand_framing_tool.desc2=The Hand Framing Tool lets you frame drawers already placed in the world.
item.contenttweaker.hand_framing_tool.desc3=To do this, the tool itself needs to be framed in a crafting table. See the item's crafting table recipes in JEI.
item.contenttweaker.hand_framing_tool.desc3=To do this, the tool itself needs to be framed in a crafting table or a framing table. See the item's crafting table recipes in JEI.
item.contenttweaker.hand_framing_tool.desc4=Then, once the tool is framed, right clicking any drawers in-world will frame them.
item.contenttweaker.hand_framing_tool.desc5=Optionally, the tool can be filled with sticks using the crafting table recipe. Up to a stack of sticks will be consumed from each slot.
item.contenttweaker.hand_framing_tool.desc6=The tool can then be used to convert existing unframed drawers into framed drawers, consuming 8 sticks to do so.
item.contenttweaker.hand_framing_tool.desc5=When right clicking any wood-type drawers in world, they will be turned into framed drawers.
item.contenttweaker.hand_framing_tool.desc6=The frames/decorations will also be applied to them.

item.contenttweaker.pulsatingdust.name=Pulsating Dust
item.contenttweaker.pulsatingmesh.name=Pulsating Mesh

tile.contenttweaker.simulation_casing.name=Naquadah-Plated Dark Steel Machine Casing
tile.contenttweaker.simulation_casing_2.name=Naquadah Machine Casing

gui.contenttweaker.naquadah_reactor.overclock=Does not overclock!
tooltip.contenttweaker.naquadah_reactor.produces=Produces exactly %s amps of %s.

multiblocktweaker.machine.microverse_projector_basic.name=Basic Microverse Projector
multiblocktweaker.machine.microverse_projector_advanced.name=Advanced Microverse Projector
multiblocktweaker.machine.microverse_projector_advanced_ii.name=Advanced Microverse Projector II
Expand Down
Loading

0 comments on commit 486ca9e

Please sign in to comment.