Skip to content

Commit

Permalink
FG 5 and filter recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticpasta1 committed Oct 9, 2023
1 parent 2b260b3 commit f101c8c
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 87 deletions.
128 changes: 72 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,79 +1,95 @@
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
}
plugins {
id 'net.minecraftforge.gradle' version '5.+'
id 'wtf.gofancy.fancygradle' version '1.1.2-5'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'org.jetbrains.kotlin.jvm' version "1.9.0"
}

apply plugin: "net.minecraftforge.gradle.forge"

version = "$mod_version.$patch_version"
group = "com.teamwizardry"
archivesBaseName = "refraction-$mc_version"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

sourceCompatibility = targetCompatibility = 1.8

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

fancyGradle {
patches {
coremods
}
}

minecraft {
version = "$mc_version-$forge_version"
runDir = "run"
mappings = "$mcp_version"
mappings channel: 'stable', version: '39-1.12'

replace 'GRADLE:VERSION', "$mod_version"
replace 'required-before:librarianlib', 'required-before:librarianlib@' + liblib_version
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
environment 'MC_VERSION', '1.12.2'
}

replaceIn 'Constants.java'
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
environment 'MC_VERSION', '1.12.2'
}
}
}

repositories {
mavenCentral()
maven { url = "http://maven.bluexin.be/repository/snapshots/" }
maven { url = "http://dvs1.progwml6.com/files/maven" }
maven { url = "http://maven.tterrag.com/" }
maven { url = "http://maven.blamejared.com" }
maven { url = 'http://maven.mcmoddev.com' }
maven { url = "https://maven.bluexin.be/repository/snapshots/" }
maven { url = "https://dvs1.progwml6.com/files/maven" }
maven { url = "https://maven.tterrag.com/" }
maven { url = "https://maven.blamejared.com" }
maven { url = 'https://maven.mcmoddev.com' }
maven { url = "https://mvnrepository.com/artifact/org.jetbrains/annotations" }
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
mavenLocal()
}

dependencies {
compile "com.teamwizardry.librarianlib:librarianlib-1.12.2:$liblib_version-SNAPSHOT:deobf"

deobfCompile "mezz.jei:jei_1.12.2:$jei_version:api"
compile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-$ct_version"
compile "net.darkhax.tesla:Tesla-1.12.2:$tesla_version"
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'

runtime "mezz.jei:jei_1.12.2:$jei_version"
implementation 'org.jetbrains:annotations:16.0.2'
implementation fg.deobf("com.teamwizardry.librarianlib:librarianlib-1.12.2:$liblib_version-SNAPSHOT:deobf")
compileOnly "mezz.jei:jei_1.12.2:$jei_version:api"
implementation fg.deobf("curse.maven:forgelin-continuous-456403:4635770")
implementation fg.deobf("curse.maven:shadowfacts-forgelin-248453:2785465")
implementation fg.deobf("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-$ct_version")
runtimeOnly fg.deobf("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-$ct_version")
implementation fg.deobf("CraftTweaker2:CraftTweaker2-API:$ct_version")
runtimeOnly fg.deobf("CraftTweaker2:CraftTweaker2-API:$ct_version")
implementation fg.deobf("CraftTweaker2:ZenScript:$ct_version")
runtimeOnly fg.deobf("CraftTweaker2:ZenScript:$ct_version")
implementation fg.deobf("net.darkhax.tesla:Tesla-1.12.2:$tesla_version")
runtimeOnly "mezz.jei:jei_1.12.2:$jei_version"
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"

// replace version and mcversion
expand "version": project.version,
"mcversion": project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
jar {
manifest {
attributes([
"Specification-Title": "refraction",
"Specification-Vendor": "Mysticpasta1",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Mysticpasta1",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

idea {
module {
inheritOutputDirs = false
outputDir = compileJava.destinationDir
testOutputDir = compileTestJava.destinationDir
}
}
jar.finalizedBy('reobfJar')
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx5G
org.gradle.daemon=false

mod_version=1.9
patch_version=10
mc_version=1.12.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
19 changes: 19 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven {
name 'Garden of Fancy'
url 'https://maven.gofancy.wtf/releases'
}

maven {
url = 'https://maven.minecraftforge.net'
}
}

resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("org.jetbrains.kotlin")) useVersion("1.9.0")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.item.ItemStack;

import java.awt.*;
import java.util.function.Function;

import static com.teamwizardry.librarianlib.features.helpers.CommonUtilMethods.getCurrentModId;

Expand All @@ -29,4 +30,8 @@ public static IAssemblyBehavior register(String key, IAssemblyBehavior recipe) {
public static IAssemblyBehavior register(String key, ItemStack output, Color one, Color two, Object... inputs) {
return register(key, new AssemblyRecipe(output, one, two, inputs));
}

public static IAssemblyBehavior register(String key, ItemStack output, Function<ItemStack, ItemStack> function, Color one, Color two, Object... inputs) {
return register(key, new AssemblyRecipe(function.apply(output), one, two, inputs));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ public class BlockFilter extends BlockMod implements ILightSink, IOpticConnectab

public BlockFilter() {
super("filter", Material.GLASS, VARIANTS);
setBlockUnbreakable();
setHardness(100000);
setHardness(2F);
setSoundType(SoundType.GLASS);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.teamwizardry.refraction.init.recipies;

import com.teamwizardry.refraction.api.recipe.ColorConsumingBehavior;
import com.teamwizardry.refraction.common.block.BlockFilter;
import com.teamwizardry.refraction.init.ModBlocks;
import com.teamwizardry.refraction.init.ModItems;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;

import java.awt.*;
import java.util.function.Function;

import static com.teamwizardry.refraction.api.lib.LibOreDict.*;
import static com.teamwizardry.refraction.api.recipe.AssemblyBehaviors.register;
Expand Down Expand Up @@ -36,10 +38,12 @@ public static void init() {
LENS, LENS, LENS, LENS, LENS, LENS,
REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY,
"ingotIron", "ingotIron", "ingotIron");

register("splitter", new ItemStack(ModBlocks.SPLITTER),
new Color(0, 255, 0, 16), new Color(0, 255, 0, 32),
LENS, LENS, LENS,
REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY);

register("sensor", new ItemStack(ModBlocks.SENSOR),
new Color(255, 96, 0, 16), new Color(255, 160, 0, 64),
LENS, LENS, LENS, LENS, LENS, LENS,
Expand All @@ -64,10 +68,12 @@ public static void init() {
"dustGlowstone",
REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY,
LENS, LENS, LENS);

register("disco", new ItemStack(ModBlocks.DISCO_BALL),
new Color(255, 0, 255, 64), new Color(255, 0, 255, 128),
"gemDiamond", "gemDiamond", "gemDiamond", "gemDiamond",
REFLECTIVE_ALLOY, REFLECTIVE_ALLOY, REFLECTIVE_ALLOY);

register("optic_fiber", new ItemStack(ModBlocks.OPTIC_FIBER, 4),
new Color(96, 0, 255, 64), new Color(160, 0, 255, 128),
LENS, LENS, LENS,
Expand All @@ -80,6 +86,52 @@ public static void init() {
OPTIC_FIBER, OPTIC_FIBER, OPTIC_FIBER, OPTIC_FIBER,
"enderpearl",
"ingotIron");

register("white_filter", new ItemStack(ModBlocks.FILTER), applyMeta(0),
new Color(255, 255, 255, 128), new Color(255, 255, 255, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("red_filter", new ItemStack(ModBlocks.FILTER), applyMeta(1),
new Color(255, 0, 0, 128), new Color(255, 0, 0, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("green_filter", new ItemStack(ModBlocks.FILTER), applyMeta(2),
new Color(0, 255, 0, 128), new Color(0, 255, 0, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("blue_filter", new ItemStack(ModBlocks.FILTER), applyMeta(3),
new Color(0, 0, 255, 128), new Color(0, 0, 255, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("cyan_filter", new ItemStack(ModBlocks.FILTER), applyMeta(4),
new Color(0, 128, 255, 128), new Color(0, 128, 255, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("yellow_filter", new ItemStack(ModBlocks.FILTER), applyMeta(5),
new Color(255, 255, 0, 128), new Color(255, 255, 0, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("magenta_filter", new ItemStack(ModBlocks.FILTER), applyMeta(6),
new Color(255, 0, 255, 128), new Color(255, 0, 255, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("pink_filter", new ItemStack(ModBlocks.FILTER), applyMeta(7),
new Color(255, 128, 255, 128), new Color(255, 128, 255, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("orange_filter", new ItemStack(ModBlocks.FILTER), applyMeta(8),
new Color(255, 128, 0, 128), new Color(255, 128, 128, 255),
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY,
LENS, REFLECTIVE_ALLOY, LENS, REFLECTIVE_ALLOY, LENS);

register("electron_exciter", new ItemStack(ModBlocks.ELECTRON_EXCITER),
new Color(0, 255, 96, 128), new Color(0, 255, 160, 255),
LENS, LENS, LENS, LENS, LENS, LENS,
Expand All @@ -99,4 +151,11 @@ public static void init() {
register("ammo", new ColorConsumingBehavior(new ItemStack(ModItems.LIGHT_CARTRIDGE), new ItemStack(ModItems.LIGHT_CARTRIDGE)));
register("grenade", new ColorConsumingBehavior(new ItemStack(ModItems.GRENADE), new ItemStack(ModItems.GRENADE)));
}

public static Function<ItemStack, ItemStack> applyMeta(int meta) {
return itemStack -> {
itemStack.setItemDamage(meta);
return itemStack;
};
}
}
13 changes: 13 additions & 0 deletions src/main/resources/assets/minecraft/blockstates/air.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"color=white": {},
"color=red": {},
"color=green": {},
"color=blue": {},
"color=cyan": {},
"color=yellow": {},
"color=magenta": {},
"color=pink": {},
"color=orange": {}
}
}
18 changes: 9 additions & 9 deletions src/main/resources/assets/refraction/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ tile.refraction:axyz.8.name=AFDQTA (A Fool Doesn't Question This Acronym)
tile.refraction:axyz.9.name=AFDQTA (Atomically Flan Decrementing Quality Total Annihilator)
tile.refraction:light_bridge.name=Light Bridge

tile.refraction:filter_white.name=White Creative Filter
tile.refraction:filter_red.name=Red Creative Filter
tile.refraction:filter_green.name=Green Creative Filter
tile.refraction:filter_blue.name=Blue Creative Filter
tile.refraction:filter_cyan.name=Cyan Creative Filter
tile.refraction:filter_yellow.name=Yellow Creative Filter
tile.refraction:filter_magenta.name=Magenta Creative Filter
tile.refraction:filter_pink.name=Pink Creative Filter
tile.refraction:filter_orange.name=Orange Creative Filter
tile.refraction:filter_white.name=White Filter
tile.refraction:filter_red.name=Red Filter
tile.refraction:filter_green.name=Green Filter
tile.refraction:filter_blue.name=Blue Filter
tile.refraction:filter_cyan.name=Cyan Filter
tile.refraction:filter_yellow.name=Yellow Filter
tile.refraction:filter_magenta.name=Magenta Filter
tile.refraction:filter_pink.name=Pink Filter
tile.refraction:filter_orange.name=Orange Filter


item.refraction:laser_pen.name=Laser Pen
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/assets/refraction/lang/ru_RU.lang
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ tile.refraction:axyz.7.name=АПКТА (Атомный примитивный к
tile.refraction:axyz.8.name=АПКТА (Анатомический практически конспирологический транспортный автобус)
tile.refraction:axyz.9.name=АПКТА (Атмосферно проективное коммерческое телефонное агенство)

tile.refraction:filter_white.name=Белый творческий фильтр
tile.refraction:filter_red.name=Красный творческий фильтр
tile.refraction:filter_green.name=Зеленый творческий фильтр
tile.refraction:filter_blue.name=Синий творческий фильтр
tile.refraction:filter_cyan.name=Бирюзовый творческий фильтр
tile.refraction:filter_yellow.name=Желтый творческий фильтр
tile.refraction:filter_magenta.name=Фиолетовый творческий фильтр
tile.refraction:filter_pink.name=Розовый творческий фильтр
tile.refraction:filter_orange.name=Оранжевый творческий фильтр
tile.refraction:filter_white.name=Белый фильтр
tile.refraction:filter_red.name=Красный фильтр
tile.refraction:filter_green.name=Зеленый фильтр
tile.refraction:filter_blue.name=Синий фильтр
tile.refraction:filter_cyan.name=Бирюзовый фильтр
tile.refraction:filter_yellow.name=Желтый фильтр
tile.refraction:filter_magenta.name=Фиолетовый фильтр
tile.refraction:filter_pink.name=Розовый фильтр
tile.refraction:filter_orange.name=Оранжевый фильтр


item.refraction:laser_pen.name=Лазерная указка
Expand Down
Loading

0 comments on commit f101c8c

Please sign in to comment.