Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49c3652d78 | ||
|
|
cc5f40a9e7 |
12 changed files with 34 additions and 150 deletions
19
build.gradle
19
build.gradle
|
|
@ -71,18 +71,27 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flatDir {
|
||||||
|
dirs 'libs'
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||||
|
|
||||||
|
|
||||||
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
|
annotationProcessor "org.spongepowered:mixin:0.8.5:processor"
|
||||||
|
|
||||||
implementation fg.deobf("curse.maven:markdownmanual-502485:4873115")
|
runtimeOnly fileTree(dir: 'libs', include: '*.jar')
|
||||||
implementation fg.deobf("curse.maven:architectury-api-419699:5137938")
|
runtimeOnly fg.deobf("curse.maven:architectury-api-419699:5137942")
|
||||||
implementation fg.deobf("curse.maven:libre-computers-1163239:6126363")
|
runtimeOnly fg.deobf("curse.maven:jei-238222:5846858")
|
||||||
|
runtimeOnly fg.deobf("curse.maven:tiny-redstone-453746:5318126")
|
||||||
|
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.3.0.4")
|
implementation fg.deobf("curse.maven:markdownmanual-502485:4306669")
|
||||||
}
|
implementation fg.deobf("curse.maven:libre-computers-1163239:6136998")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
System.setProperty("line.separator", "\n")
|
System.setProperty("line.separator", "\n")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,8 @@
|
||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
forge_version=47.2.32
|
forge_version=43.2.10
|
||||||
|
|
||||||
semver=1.1.1
|
semver=1.1.1
|
||||||
|
|
||||||
# curse_project_id=1037738
|
# curse_project_id=1037738
|
||||||
|
|
||||||
pr_version=4.19.0-beta+3
|
|
||||||
ccl_version=4.4.0.+
|
|
||||||
cbm_version=3.3.0.+
|
|
||||||
|
|
||||||
debug_embeddium=false
|
|
||||||
|
|
||||||
debug_embeddium_plus_plus=false
|
|
||||||
|
|
||||||
debug_oculus=false
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
ext {
|
ext {
|
||||||
minecraft_version = '1.20.1'
|
minecraft_version = '1.19.2'
|
||||||
minecraft_sdk = 'forge'
|
minecraft_sdk = 'forge'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
package com.therealm18studios.lc;
|
package com.therealm18studios.lc;
|
||||||
|
|
||||||
import com.therealm18studios.lc.common.item.ItemGroup;
|
|
||||||
import com.therealm18studios.lc.common.item.Items;
|
import com.therealm18studios.lc.common.item.Items;
|
||||||
import com.therealm18studios.lc.manual.Manuals;
|
import com.therealm18studios.lc.manual.Manuals;
|
||||||
import li.cil.oc2.common.ConfigManager;
|
import li.cil.oc2.common.ConfigManager;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
|
||||||
|
|
||||||
@Mod("librecomponents")
|
@Mod("librecomponents")
|
||||||
public final class LibreComponents {
|
public final class LibreComponents {
|
||||||
|
|
@ -20,6 +18,5 @@ public final class LibreComponents {
|
||||||
|
|
||||||
Items.initialize();
|
Items.initialize();
|
||||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> Manuals::initialize);
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> Manuals::initialize);
|
||||||
ItemGroup.TAB_REGISTER.register(FMLJavaModLoadingContext.get().getModEventBus());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
package com.therealm18studios.lc.common.item;
|
|
||||||
|
|
||||||
import com.therealm18studios.lc.LibreComponents;
|
|
||||||
import net.minecraft.core.registries.Registries;
|
|
||||||
import net.minecraft.network.chat.Component;
|
|
||||||
import net.minecraft.world.item.CreativeModeTab;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
|
||||||
import net.minecraftforge.registries.DeferredRegister;
|
|
||||||
import net.minecraftforge.registries.RegistryObject;
|
|
||||||
|
|
||||||
public final class ItemGroup {
|
|
||||||
public static final DeferredRegister<CreativeModeTab> TAB_REGISTER = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, LibreComponents.MOD_ID);
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public static final RegistryObject<CreativeModeTab> COMMON_TAB = TAB_REGISTER.register("common", () -> CreativeModeTab.builder()
|
|
||||||
// Set name of tab to display
|
|
||||||
.title(Component.translatable("item_group." + LibreComponents.MOD_ID + ".common"))
|
|
||||||
// Set icon of creative tab
|
|
||||||
.icon(() -> new ItemStack(Items.HARD_DRIVE_EXTRA_LARGE.get()))
|
|
||||||
// Add default items to tab
|
|
||||||
.displayItems((params, output) -> {
|
|
||||||
// Items
|
|
||||||
output.accept(Items.MEMORY_SMALL.get());
|
|
||||||
output.accept(Items.MEMORY_MEDIUM.get());
|
|
||||||
output.accept(Items.MEMORY_LARGE.get());
|
|
||||||
output.accept(Items.MEMORY_EXTRA_LARGE.get());
|
|
||||||
output.accept(Items.HARD_DRIVE_SMALL.get());
|
|
||||||
output.accept(Items.HARD_DRIVE_MEDIUM.get());
|
|
||||||
output.accept(Items.HARD_DRIVE_LARGE.get());
|
|
||||||
output.accept(Items.HARD_DRIVE_EXTRA_LARGE.get());
|
|
||||||
output.accept(Items.CPU_TIER_1.get());
|
|
||||||
output.accept(Items.CPU_TIER_2.get());
|
|
||||||
output.accept(Items.CPU_TIER_3.get());
|
|
||||||
output.accept(Items.CPU_TIER_4.get());
|
|
||||||
output.accept(Items.FLOPPY.get());
|
|
||||||
output.accept(Items.FLOPPY_MODERN.get());
|
|
||||||
})
|
|
||||||
.build()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -3,7 +3,7 @@ package com.therealm18studios.lc.common.item;
|
||||||
import com.therealm18studios.lc.LibreComponents;
|
import com.therealm18studios.lc.LibreComponents;
|
||||||
import li.cil.oc2.common.item.MemoryItem;
|
import li.cil.oc2.common.item.MemoryItem;
|
||||||
import li.cil.oc2.common.item.HardDriveItem;
|
import li.cil.oc2.common.item.HardDriveItem;
|
||||||
import li.cil.oc2.common.item.CPUItem;
|
//import li.cil.oc2.common.item.CPUItem;
|
||||||
import li.cil.oc2.common.item.FloppyItem;
|
import li.cil.oc2.common.item.FloppyItem;
|
||||||
import net.minecraft.world.item.DyeColor;
|
import net.minecraft.world.item.DyeColor;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
|
|
@ -39,14 +39,14 @@ public final class Items {
|
||||||
public static final RegistryObject<HardDriveItem> HARD_DRIVE_EXTRA_LARGE = register("hard_drive_extra_large", () ->
|
public static final RegistryObject<HardDriveItem> HARD_DRIVE_EXTRA_LARGE = register("hard_drive_extra_large", () ->
|
||||||
new HardDriveItem(268435456, DyeColor.YELLOW));
|
new HardDriveItem(268435456, DyeColor.YELLOW));
|
||||||
|
|
||||||
public static final RegistryObject<CPUItem> CPU_TIER_1 = register("cpu_tier_1", () ->
|
// public static final RegistryObject<CPUItem> CPU_TIER_1 = register("cpu_tier_1", () ->
|
||||||
new CPUItem(250000000));
|
// new CPUItem(250000000));
|
||||||
public static final RegistryObject<CPUItem> CPU_TIER_2 = register("cpu_tier_2", () ->
|
// public static final RegistryObject<CPUItem> CPU_TIER_2 = register("cpu_tier_2", () ->
|
||||||
new CPUItem(300000000));
|
// new CPUItem(300000000));
|
||||||
public static final RegistryObject<CPUItem> CPU_TIER_3 = register("cpu_tier_3", () ->
|
// public static final RegistryObject<CPUItem> CPU_TIER_3 = register("cpu_tier_3", () ->
|
||||||
new CPUItem(350000000));
|
// new CPUItem(350000000));
|
||||||
public static final RegistryObject<CPUItem> CPU_TIER_4 = register("cpu_tier_4", () ->
|
// public static final RegistryObject<CPUItem> CPU_TIER_4 = register("cpu_tier_4", () ->
|
||||||
new CPUItem(400000000));
|
// new CPUItem(400000000));
|
||||||
|
|
||||||
public static final RegistryObject<FloppyItem> FLOPPY = register("floppy", () ->
|
public static final RegistryObject<FloppyItem> FLOPPY = register("floppy", () ->
|
||||||
new FloppyItem(2949120));
|
new FloppyItem(2949120));
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
package com.therealm18studios.lc.data;
|
|
||||||
|
|
||||||
import net.minecraft.data.DataGenerator;
|
|
||||||
import net.minecraft.data.DataProvider;
|
|
||||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
|
||||||
import net.minecraftforge.data.event.GatherDataEvent;
|
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
|
||||||
public final class DataGenerators {
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void gatherData(final GatherDataEvent event) {
|
|
||||||
final DataGenerator generator = event.getGenerator();
|
|
||||||
final ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
|
|
||||||
|
|
||||||
generator.addProvider(event.includeClient(), new ModItemModelProvider(generator.getPackOutput(), existingFileHelper));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
package com.therealm18studios.lc.data;
|
|
||||||
|
|
||||||
import com.therealm18studios.lc.LibreComponents;
|
|
||||||
import li.cil.oc2.common.entity.Entities;
|
|
||||||
import com.therealm18studios.lc.common.item.Items;
|
|
||||||
import net.minecraft.data.PackOutput;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import net.minecraft.world.item.Item;
|
|
||||||
import net.minecraftforge.client.model.generators.ItemModelBuilder;
|
|
||||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
|
||||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
|
||||||
import net.minecraftforge.registries.RegistryObject;
|
|
||||||
|
|
||||||
public final class ModItemModelProvider extends ItemModelProvider {
|
|
||||||
public ModItemModelProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) {
|
|
||||||
super(output, LibreComponents.MOD_ID, existingFileHelper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void registerModels() {
|
|
||||||
simple(Items.MEMORY_SMALL);
|
|
||||||
simple(Items.MEMORY_MEDIUM);
|
|
||||||
simple(Items.MEMORY_LARGE);
|
|
||||||
simple(Items.MEMORY_EXTRA_LARGE);
|
|
||||||
simple(Items.CPU_TIER_1);
|
|
||||||
simple(Items.CPU_TIER_2);
|
|
||||||
simple(Items.CPU_TIER_3);
|
|
||||||
simple(Items.CPU_TIER_4);
|
|
||||||
simple(Items.HARD_DRIVE_SMALL, "item/hard_drive_base")
|
|
||||||
.texture("layer1", "item/hard_drive_tint");
|
|
||||||
simple(Items.HARD_DRIVE_MEDIUM, "item/hard_drive_base")
|
|
||||||
.texture("layer1", "item/hard_drive_tint");
|
|
||||||
simple(Items.HARD_DRIVE_LARGE, "item/hard_drive_base")
|
|
||||||
.texture("layer1", "item/hard_drive_tint");
|
|
||||||
simple(Items.HARD_DRIVE_EXTRA_LARGE, "item/hard_drive_base")
|
|
||||||
.texture("layer1", "item/hard_drive_tint");
|
|
||||||
simple(Items.FLOPPY, "item/floppy_base")
|
|
||||||
.texture("layer1", "item/floppy_tint");
|
|
||||||
simple(Items.FLOPPY_MODERN, "item/floppy_base")
|
|
||||||
.texture("layer1", "item/floppy_tint");
|
|
||||||
|
|
||||||
withExistingParent(Entities.ROBOT.getId().getPath(), "template_shulker_box");
|
|
||||||
}
|
|
||||||
|
|
||||||
private <T extends Item> void simple(final RegistryObject<T> item) {
|
|
||||||
simple(item, "item/" + item.getId().getPath());
|
|
||||||
}
|
|
||||||
|
|
||||||
private <T extends Item> ItemModelBuilder simple(final RegistryObject<T> item, final String texturePath) {
|
|
||||||
return singleTexture(item.getId().getPath(),
|
|
||||||
new ResourceLocation("item/generated"),
|
|
||||||
"layer0",
|
|
||||||
new ResourceLocation(LibreComponents.MOD_ID, texturePath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "[47,)"
|
loaderVersion = "[43,)"
|
||||||
issueTrackerURL = "https://github.com/Libre-Computers/LibreComponents/issues"
|
issueTrackerURL = "https://github.com/Libre-Computers/LibreComponents/issues"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ side = "BOTH"
|
||||||
[[dependencies.librecomponents]]
|
[[dependencies.librecomponents]]
|
||||||
modId = "minecraft"
|
modId = "minecraft"
|
||||||
mandatory = true
|
mandatory = true
|
||||||
versionRange = "1.20.1"
|
versionRange = "1.19.2"
|
||||||
ordering = "NONE"
|
ordering = "NONE"
|
||||||
side = "BOTH"
|
side = "BOTH"
|
||||||
[[dependencies.librecomponents]]
|
[[dependencies.librecomponents]]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"I": {
|
"I": {
|
||||||
"item": "oc2:floppy_modern"
|
"item": "oc2:floppy"
|
||||||
},
|
},
|
||||||
"T": {
|
"T": {
|
||||||
"item": "oc2:transistor"
|
"item": "oc2:transistor"
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"ITI",
|
"ITI",
|
||||||
"EBE"
|
"EBE",
|
||||||
|
"ITI"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"I": {
|
"I": {
|
||||||
"item": "oc2:hard_drive_extra_large"
|
"item": "oc2:hard_drive_large"
|
||||||
},
|
},
|
||||||
"T": {
|
"T": {
|
||||||
"item": "oc2:transistor"
|
"item": "oc2:transistor"
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"ITI",
|
"ITI",
|
||||||
" B "
|
" B ",
|
||||||
|
"ITI"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"I": {
|
"I": {
|
||||||
"item": "oc2:memory_extra_large"
|
"item": "oc2:memory_large"
|
||||||
},
|
},
|
||||||
"T": {
|
"T": {
|
||||||
"item": "oc2:transistor"
|
"item": "oc2:transistor"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue