Skip to content

Commit

Permalink
Bronze Cell
Browse files Browse the repository at this point in the history
Co-Authored-By: marisathewitch <[email protected]>
  • Loading branch information
IntegerLimit and marisathewitch committed Nov 25, 2024
1 parent eeffbe3 commit 8446f08
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/nomiceu/nomilabs/config/LabsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ public static class GTCustomContent {
@Config.RequiresMcRestart
public boolean enablePerfectGems = true;

@Config.Comment({
"Enable Custom GT Items.",
"[default: true]"
})
@Config.LangKey("config.nomilabs.content.gt_content.items")
@Config.RequiresMcRestart
public boolean enableItems = true;

@Config.Comment({
"Enable Custom GT Blocks.",
"In Beta.",
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/nomiceu/nomilabs/event/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.nomiceu.nomilabs.fluid.FluidRegistryMixinHelper;
import com.nomiceu.nomilabs.fluid.registry.LabsFluids;
import com.nomiceu.nomilabs.gregtech.block.registry.LabsMetaBlocks;
import com.nomiceu.nomilabs.gregtech.item.LabsMetaItems;
import com.nomiceu.nomilabs.gregtech.material.registry.LabsMaterials;
import com.nomiceu.nomilabs.gregtech.metatileentity.registry.LabsMetaTileEntities;
import com.nomiceu.nomilabs.gregtech.mixinhelper.RecipeMapLogic;
Expand Down Expand Up @@ -88,6 +89,8 @@ public static void preInit() {
if (LabsConfig.content.customContent.enableFluids)
LabsFluids.preInit();

if (LabsConfig.content.gtCustomContent.enableItems)
LabsMetaItems.preInit();
if (LabsConfig.content.gtCustomContent.enableBlocks)
LabsMetaBlocks.preInit();

Expand Down
29 changes: 29 additions & 0 deletions src/main/java/com/nomiceu/nomilabs/gregtech/item/LabsMetaItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.nomiceu.nomilabs.gregtech.item;

import static com.nomiceu.nomilabs.gregtech.item.LabsMetaItems.*;
import static gregtech.api.GTValues.*;

import com.nomiceu.nomilabs.creativetab.registry.LabsCreativeTabs;
import com.nomiceu.nomilabs.gregtech.mixinhelper.BucketItemFluidContainer;

import gregtech.api.items.metaitem.FilteredFluidStats;
import gregtech.api.items.metaitem.StandardMetaItem;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.material.properties.PropertyKey;
import gregtech.api.unification.stack.ItemMaterialInfo;
import gregtech.api.unification.stack.MaterialStack;

public class LabsMetaItem extends StandardMetaItem {

@Override
public void registerSubItems() {
BRONZE_CELL = addItem(0, "bronze_cell")
.addComponents(
new FilteredFluidStats(8000,
Materials.Bronze.getProperty(PropertyKey.FLUID_PIPE).getMaxFluidTemperature(),
true, false, false, false, true),
new BucketItemFluidContainer())
.setMaterialInfo(new ItemMaterialInfo(new MaterialStack(Materials.Bronze, M * 4)))
.setCreativeTabs(LabsCreativeTabs.TAB_NOMI_LABS);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.nomiceu.nomilabs.gregtech.item;

import com.nomiceu.nomilabs.util.LabsNames;

import gregtech.api.items.metaitem.MetaItem;

public class LabsMetaItems {

public static MetaItem<?>.MetaValueItem BRONZE_CELL;

public static void preInit() {
LabsMetaItem metaItem = new LabsMetaItem();
metaItem.setRegistryName(LabsNames.makeLabsName("meta_item"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"forge_marker": 1,
"variants": {
"inventory": {
"model": "forge:forgebucket",
"textures": {
"base": "gregtech:items/metaitems/bronze_cell/base",
"fluid": "gregtech:items/metaitems/bronze_cell/overlay",
"cover": "gregtech:items/metaitems/bronze_cell/base"
},
"transform": "forge:default-item"
}
}
}
2 changes: 2 additions & 0 deletions src/main/resources/assets/gregtech/lang/en_us.lang
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#-----------------Meta Items-----------------#
metaitem.bronze_cell.name=%s Bronze Cell
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/resources/assets/nomilabs/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config.nomilabs.content.gt_content=Custom GT Content Settings
config.nomilabs.content.gt_content.tooltip=Custom GT Content Settings
config.nomilabs.content.gt_content.materials=Enable Custom GT Materials
config.nomilabs.content.gt_content.perfect_gems=Enable Perfect Gems
config.nomilabs.content.gt_content.items=Enable Custom GT Items
config.nomilabs.content.gt_content.blocks=Enable Custom GT Blocks
config.nomilabs.content.gt_content.old_multiblocks=Enable Old Multiblocks
config.nomilabs.content.gt_content.new_multiblocks=Enable New Multiblocks
Expand Down

0 comments on commit 8446f08

Please sign in to comment.