diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f811f6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Disable autocrlf on generated files, they always generate with LF +# Add any extra files or paths here to make git stop saying they +# are changed when only line endings change. +src/generated/**/.cache/cache text eol=lf +src/generated/**/*.json text eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b333bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# eclipse +bin +*.launch +.settings +.metadata +.classpath +.project + +# idea +out +*.ipr +*.iws +*.iml +.idea + +# gradle +build +.gradle + +# other +eclipse +run + +# Files from Forge MDK +changelog.txt diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ba123e7 --- /dev/null +++ b/build.gradle @@ -0,0 +1,207 @@ +plugins { + id 'eclipse' + id 'maven-publish' + id 'net.minecraftforge.gradle' version '5.1.+' + id 'org.spongepowered.mixin' version '0.7.+' + +} + +version = '1.19.2-1.1' +group = 'com.jesz.createdieselgenerators' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = 'createdieselgenerators' + +// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + +println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" +minecraft { + // The mappings can be changed at any time and must be in the following format. + // Channel: Version: + // official MCVersion Official field/method names from Mojang mapping files + // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official + // + // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. + // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md + // + // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge + // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started + // + // Use non-default mappings at your own risk. They may not always work. + // Simply re-run your setup task after changing the mappings to update your workspace. + mappings channel: 'official', version: '1.19.2' + + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. + + // Default run configurations. + // These can be tweaked, removed, or duplicated as needed. + runs { + client { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + // The markers can be added/remove as needed separated by commas. + // "SCAN": For mods scan. + // "REGISTRIES": For firing of registry events. + // "REGISTRYDUMP": For getting the contents of all registries. + property 'forge.logging.markers', 'REGISTRIES' + + // Recommended logging level for the console + // You can set various levels here. + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'createdieselgenerators' + + mods { + createdieselgenerators { + source sourceSets.main + } + } + } + + server { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + property 'forge.enabledGameTestNamespaces', 'createdieselgenerators' + + mods { + createdieselgenerators { + source sourceSets.main + } + } + } + + // This run config launches GameTestServer and runs all registered gametests, then exits. + // By default, the server will crash when no gametests are provided. + // The gametest system is also enabled by default for other run configs under the /test command. + gameTestServer { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + property 'forge.enabledGameTestNamespaces', 'createdieselgenerators' + + mods { + createdieselgenerators { + source sourceSets.main + } + } + } + + data { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. + args '--mod', 'createdieselgenerators', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + + mods { + createdieselgenerators { + source sourceSets.main + } + } + } + } +} + +// Include resources generated by data generators. +sourceSets.main.resources { srcDir 'src/generated/resources' } + +repositories { + // Put repositories for dependencies here + // ForgeGradle automatically adds the Forge maven and Maven Central for you + + // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: + // flatDir { + // dir 'libs' + // } + maven { + url = "https://maven.blamejared.com/" + } + maven { + name = 'tterrag maven' + url = 'https://maven.tterrag.com/' + } + maven { + url "https://cursemaven.com" + } + maven { + name = "squiddev" + url = "https://squiddev.cc/maven/" + content { + includeGroup "org.squiddev" + } + } + maven { + url = "https://maven.theillusivec4.top/" + } + +} + +dependencies { + // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed + // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. + // The userdev artifact is a special name and will get all sorts of transformations applied to it. + minecraft 'net.minecraftforge:forge:1.19.2-43.2.11' + + // Real mod deobf dependency examples - these get remapped to your current mappings + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency + // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency + // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency + + implementation fg.deobf("com.simibubi.create:create-1.19.2:0.5.1.b-30:slim") + implementation fg.deobf("curse.maven:flywheel-486392:4341471") + implementation fg.deobf("com.tterrag.registrate:Registrate:MC1.19-1.1.5") + implementation fg.deobf("curse.maven:jei-238222:4494410") + + // For more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html +} +// Example for how to get properties into the manifest for reading at runtime. +jar { + manifest { + attributes([ + "Specification-Title" : "createdieselgenerators", + "Specification-Vendor" : "createdieselgenerators", + "Specification-Version" : "1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : project.jar.archiveVersion, + "Implementation-Vendor" : "createdieselgenerators", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +// Example configuration to allow publishing using the maven-publish plugin +// This is the preferred method to reobfuscate your jar file +jar.finalizedBy('reobfJar') +// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing +// publish.dependsOn('reobfJar') + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + } + } + repositories { + maven { + url "file://${project.projectDir}/mcmodsrepo" + } + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..878bf1f --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ae04661 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..a69d9cb --- /dev/null +++ b/gradlew @@ -0,0 +1,240 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..f127cfd --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,91 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..3703f36 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,6 @@ +pluginManagement { + repositories { + gradlePluginPortal() + maven { url = 'https://maven.minecraftforge.net/' } + } +} \ No newline at end of file diff --git a/src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java b/src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java new file mode 100644 index 0000000..23297e3 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java @@ -0,0 +1,60 @@ +package com.jesz.createdieselgenerators; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import com.jesz.createdieselgenerators.blocks.entity.BlockEntityRegistry; +import com.jesz.createdieselgenerators.fluids.FluidRegistry; +import com.jesz.createdieselgenerators.items.ItemRegistry; +import com.jesz.createdieselgenerators.ponder.PonderIndex; +import com.jesz.createdieselgenerators.recipes.RecipeRegistry; +import com.simibubi.create.Create; +import com.simibubi.create.foundation.data.CreateRegistrate; +import com.simibubi.create.foundation.utility.Components; +import net.minecraft.client.renderer.ItemBlockRenderTypes; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; + +import static com.simibubi.create.foundation.utility.Lang.resolveBuilders; + +@Mod("createdieselgenerators") +public class CreateDieselGenerators +{ + public static final CreateRegistrate REGISTRATE = CreateRegistrate.create("createdieselgenerators"); + public CreateDieselGenerators() + { + IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); + IEventBus forgeEventBus = MinecraftForge.EVENT_BUS; + + ItemRegistry.register(modEventBus); + BlockRegistry.register(); + FluidRegistry.register(); + BlockEntityRegistry.register(); + RecipeRegistry.register(modEventBus); + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> onClient(modEventBus, forgeEventBus)); + + MinecraftForge.EVENT_BUS.register(this); + REGISTRATE.registerEventListeners(modEventBus); + } + public static MutableComponent translate(String key, Object... args) { + return Components.translatable(key, resolveBuilders(args)); + } + + public static void onClient(IEventBus modEventBus, IEventBus forgeEventBus) { + modEventBus.addListener(CreateDieselGenerators::clientInit); + + } + + public static void clientInit(final FMLClientSetupEvent event) { + ItemBlockRenderTypes.setRenderLayer(FluidRegistry.ETHANOL.get(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(FluidRegistry.ETHANOL.getSource(), RenderType.translucent()); + PonderIndex.register(); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/CreativeTab.java b/src/main/java/com/jesz/createdieselgenerators/CreativeTab.java new file mode 100644 index 0000000..bcf0c38 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/CreativeTab.java @@ -0,0 +1,15 @@ +package com.jesz.createdieselgenerators; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; + +public class CreativeTab { + public static final CreativeModeTab CREATIVE_TAB = new CreativeModeTab("cdg_creative_tab") { + @Override + public ItemStack makeIcon() { + return new ItemStack(BlockRegistry.DIESEL_ENGINE.get()); + } + }; + +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/BasinLidBlock.java b/src/main/java/com/jesz/createdieselgenerators/blocks/BasinLidBlock.java new file mode 100644 index 0000000..a2ef3a3 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/BasinLidBlock.java @@ -0,0 +1,121 @@ +package com.jesz.createdieselgenerators.blocks; + +import com.jesz.createdieselgenerators.blocks.entity.BasinLidBlockEntity; +import com.jesz.createdieselgenerators.blocks.entity.BlockEntityRegistry; +import com.simibubi.create.content.equipment.wrench.IWrenchable; +import com.simibubi.create.foundation.block.IBE; +import com.simibubi.create.foundation.block.ProperWaterloggedBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +public class BasinLidBlock extends Block implements ProperWaterloggedBlock, IBE, IWrenchable { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + public static final BooleanProperty ON_A_BASIN = BooleanProperty.create("on_a_basin"); + public static final BooleanProperty OPEN = BlockStateProperties.OPEN; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + + public BasinLidBlock(Properties properties) { + super(properties); + registerDefaultState(super.defaultBlockState().setValue(ON_A_BASIN, false)); + registerDefaultState(super.defaultBlockState().setValue(WATERLOGGED, false)); + registerDefaultState(super.defaultBlockState().setValue(OPEN, false)); + } + @Override + public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + if(!pState.getValue(OPEN)) + return Shapes.or(Block.box(0,0,0,16,2,16), + Block.box(5,2,5,11,4,11)); + if(pState.getValue(FACING) == Direction.SOUTH) + return Shapes.or(Block.box(0, 0, 14, 16, 16, 16), + Block.box(5, 5, 16, 11, 11, 18)); + if(pState.getValue(FACING) == Direction.WEST) + return Shapes.or(Block.box(0, 0, 0, 2, 16, 16), + Block.box(-2, 5, 5, 0, 11, 11)); + if(pState.getValue(FACING) == Direction.NORTH) + return Shapes.or(Block.box(0, 0, 0, 16, 16, 2), + Block.box(5, 5, -2, 11, 11, 0)); + return Shapes.or(Block.box(14, 0, 0, 16, 16, 16), + Block.box(16, 5, 5, 18, 11, 11)); + + } + + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, + Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { + boolean currentState = pState.getValue(OPEN); + if(!pLevel.isClientSide() && pHand == InteractionHand.MAIN_HAND) { + + pLevel.setBlock(pPos, pState.setValue(OPEN, !currentState), 3); + + } + + if (currentState) + pLevel.playLocalSound(pPos.getX(), pPos.getY(), pPos.getZ(), SoundEvents.IRON_TRAPDOOR_CLOSE, SoundSource.BLOCKS, 3f, 1.18f, false); + else + pLevel.playLocalSound(pPos.getX(), pPos.getY(), pPos.getZ(), SoundEvents.IRON_TRAPDOOR_OPEN, SoundSource.BLOCKS, 3f, 1.18f, false); + + return InteractionResult.SUCCESS; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(ON_A_BASIN); + builder.add(FACING); + builder.add(OPEN); + builder.add(WATERLOGGED); + super.createBlockStateDefinition(builder); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext pContext) { + if (pContext.getPlayer().isShiftKeyDown()) { + return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite()); + } else { + return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection()); + } + } + + @Override + public FluidState getFluidState(BlockState pState) { + return fluidState(pState); + } + + @Override + public BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState, + LevelAccessor pLevel, BlockPos pCurrentPos, BlockPos pNeighborPos) { + updateWater(pLevel, pState, pCurrentPos); + return pState; + } + + + @Override + public Class getBlockEntityClass() { + return BasinLidBlockEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return BlockEntityRegistry.BASIN_LID.get(); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/BlockRegistry.java b/src/main/java/com/jesz/createdieselgenerators/blocks/BlockRegistry.java new file mode 100644 index 0000000..2cf6300 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/BlockRegistry.java @@ -0,0 +1,47 @@ +package com.jesz.createdieselgenerators.blocks; + +import com.jesz.createdieselgenerators.CreativeTab; +import com.simibubi.create.foundation.data.BlockStateGen; +import com.tterrag.registrate.util.entry.BlockEntry; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.material.MaterialColor; + +import static com.jesz.createdieselgenerators.CreateDieselGenerators.REGISTRATE; +import static com.simibubi.create.foundation.data.ModelGen.customItemModel; + +public class BlockRegistry { +static { + REGISTRATE.creativeModeTab(() -> CreativeTab.CREATIVE_TAB); + } +public static final BlockEntry DIESEL_ENGINE = REGISTRATE.block("diesel_engine", DieselGeneratorBlock::new) + .properties(p -> p.color(MaterialColor.COLOR_YELLOW)) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .properties(p -> p.noOcclusion()) + .properties(p -> p.strength(3f)) + .blockstate(BlockStateGen.horizontalBlockProvider(true)) + .item() + .transform(customItemModel("_", "block")) + .register(); + public static final BlockEntry MODULAR_DIESEL_ENGINE = REGISTRATE.block("large_diesel_engine", LargeDieselGeneratorBlock::new) + .properties(p -> p.color(MaterialColor.COLOR_YELLOW)) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .properties(p -> p.noOcclusion()) + .properties(p -> p.strength(3f)) + .blockstate(BlockStateGen.horizontalBlockProvider(true)) + .item() + .transform(customItemModel("_", "block")) + .register(); + public static final BlockEntry BASIN_LID = REGISTRATE.block("basin_lid", BasinLidBlock::new) + .properties(p -> p.color(MaterialColor.COLOR_BLACK)) + .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) + .properties(p -> p.noOcclusion()) + .properties(p -> p.strength(3f)) + .blockstate(BlockStateGen.horizontalBlockProvider(true)) + .item() + .transform(customItemModel("_", "block")) + .register(); + + public static void register() { + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/DieselGeneratorBlock.java b/src/main/java/com/jesz/createdieselgenerators/blocks/DieselGeneratorBlock.java new file mode 100644 index 0000000..49d4ed9 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/DieselGeneratorBlock.java @@ -0,0 +1,94 @@ +package com.jesz.createdieselgenerators.blocks; + +import com.jesz.createdieselgenerators.blocks.entity.DieselGeneratorBlockEntity; +import com.jesz.createdieselgenerators.blocks.entity.BlockEntityRegistry; +import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock; +import com.simibubi.create.foundation.block.IBE; +import com.simibubi.create.foundation.block.ProperWaterloggedBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition.Builder; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import static net.minecraft.core.Direction.NORTH; +import static net.minecraft.core.Direction.SOUTH; + +public class DieselGeneratorBlock extends DirectionalKineticBlock implements IBE, ProperWaterloggedBlock { + public static final DirectionProperty FACING = BlockStateProperties.FACING; + public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + + public DieselGeneratorBlock(Properties properties) { + super(properties); + registerDefaultState(super.defaultBlockState().setValue(POWERED, false)); + registerDefaultState(super.defaultBlockState().setValue(WATERLOGGED, false)); + } + @Override + protected void createBlockStateDefinition(Builder builder) { + builder.add(POWERED); + builder.add(WATERLOGGED); + super.createBlockStateDefinition(builder); + } + + @Override + public FluidState getFluidState(BlockState pState) { + return fluidState(pState); + } + + @Override + public BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState, + LevelAccessor pLevel, BlockPos pCurrentPos, BlockPos pNeighborPos) { + updateWater(pLevel, pState, pCurrentPos); + return pState; + } + + @Override + public Class getBlockEntityClass() { + return DieselGeneratorBlockEntity.class; + } + @Override + public BlockEntityType getBlockEntityType() { + return BlockEntityRegistry.DIESEL_ENGINE.get(); + } + + + + + @Override + public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + + if (pState.getValue(FACING) == NORTH || pState.getValue(FACING) == SOUTH){ + return Shapes.or(Block.box(3, 3, 0, 13, 13, 16), Block.box(0,0,0,16,4,16)); + }else if(pState.getValue(FACING) == Direction.DOWN){ + return Shapes.or(Block.box(3,0,3, 13, 16, 13), Block.box(0, 4, 4, 16, 12, 12)); + }else if(pState.getValue(FACING) == Direction.UP){ + return Shapes.or(Block.box(3,0,3, 13, 16, 13), Block.box(4, 4, 0, 12, 12, 16)); + }else{ + return Shapes.or(Block.box(0, 3, 3, 16, 13, 13), Block.box(0,0,0,16,4,16)); + } + } + + @Override + public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) { + return state.getValue(FACING) + .getAxis() == face.getAxis(); + } + + @Override + public Direction.Axis getRotationAxis(BlockState blockState) { + return blockState.getValue(FACING) + .getAxis(); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/LargeDieselGeneratorBlock.java b/src/main/java/com/jesz/createdieselgenerators/blocks/LargeDieselGeneratorBlock.java new file mode 100644 index 0000000..f52d69c --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/LargeDieselGeneratorBlock.java @@ -0,0 +1,87 @@ +package com.jesz.createdieselgenerators.blocks; + +import com.jesz.createdieselgenerators.blocks.entity.LargeDieselGeneratorBlockEntity; +import com.jesz.createdieselgenerators.blocks.entity.BlockEntityRegistry; +import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition.Builder; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import static net.minecraft.core.Direction.NORTH; +import static net.minecraft.core.Direction.SOUTH; + +public class LargeDieselGeneratorBlock extends HorizontalKineticBlock implements IBE { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + + public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + + public static final BooleanProperty PIPE = BooleanProperty.create("pipe"); + + public LargeDieselGeneratorBlock(Properties properties) { + super(properties); + registerDefaultState(super.defaultBlockState().setValue(POWERED, false)); + registerDefaultState(super.defaultBlockState().setValue(PIPE, true)); + } + @Override + public BlockState getRotatedBlockState(BlockState originalState, Direction targetedFace) { + return originalState; + } + @Override + protected void createBlockStateDefinition(Builder builder) { + builder.add(POWERED); + builder.add(PIPE); + super.createBlockStateDefinition(builder); + } + @Override + public BlockState getStateForPlacement(BlockPlaceContext pContext) { + if(pContext.getPlayer().isShiftKeyDown()) + return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection()); + else + return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite()); + } + @Override + public Class getBlockEntityClass() { + return LargeDieselGeneratorBlockEntity.class; + } + @Override + public BlockEntityType getBlockEntityType() { + return BlockEntityRegistry.LARGE_DIESEL_ENGINE.get(); + } + + @Override + public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { + + if (pState.getValue(FACING) == NORTH || pState.getValue(FACING) == SOUTH){ + return Shapes.or(Block.box(0,0,0,16,16,16), Block.box(-2,0,0,18,4,16)); + }else{ + return Shapes.or(Block.box(0,0,0,16,16,16), Block.box(0,0,-2,16,4,18)); + } + + + + } + + @Override + public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) { + return state.getValue(FACING) + .getAxis() == face.getAxis(); + } + @Override + public Direction.Axis getRotationAxis(BlockState blockState) { + return blockState.getValue(FACING) + .getAxis(); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BasinLidBlockEntity.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BasinLidBlockEntity.java new file mode 100644 index 0000000..c929717 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BasinLidBlockEntity.java @@ -0,0 +1,129 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.jesz.createdieselgenerators.recipes.RecipeRegistry; +import com.simibubi.create.content.processing.basin.BasinBlockEntity; +import com.simibubi.create.content.processing.basin.BasinOperatingBlockEntity; +import com.simibubi.create.content.processing.recipe.ProcessingRecipe; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.Container; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.List; +import java.util.Optional; + +import static com.jesz.createdieselgenerators.blocks.BasinLidBlock.ON_A_BASIN; +import static com.jesz.createdieselgenerators.blocks.BasinLidBlock.OPEN; + +public class BasinLidBlockEntity extends BasinOperatingBlockEntity { + + public int procesingTime; + public boolean running; + public BasinLidBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + } + + @Override + protected void write(CompoundTag compound, boolean clientPacket) { + super.write(compound, clientPacket); + compound.putInt("MeltingTime", this.procesingTime); + compound.putBoolean("Running", this.running); + } + + @Override + protected void read(CompoundTag compound, boolean clientPacket) { + super.read(compound, clientPacket); + this.procesingTime = compound.getInt("MeltingTime"); + this.running = compound.getBoolean("Running"); + } + + @Override + protected void onBasinRemoved() { + if (!this.running) return; + this.procesingTime = 0; + this.currentRecipe = null; + this.running = false; + } + + @Override + public void tick() { + super.tick(); + + boolean basinPresent = (level.getBlockEntity(worldPosition.below(1)) instanceof BasinBlockEntity); + + if(getBlockState().getValue(ON_A_BASIN) != basinPresent){ + level.setBlock(getBlockPos(), getBlockState().setValue(ON_A_BASIN, basinPresent), 3); + } + + if (!this.level.isClientSide && (this.currentRecipe == null || this.procesingTime == -1)) { + this.running = false; + this.procesingTime = -1; + this.basinChecker.scheduleUpdate(); + } + + if (this.running && this.level != null) { + if (!this.level.isClientSide && this.procesingTime <= 0) { + this.procesingTime = -1; + this.applyBasinRecipe(); + this.sendData(); + } + + if (this.procesingTime > 0) --this.procesingTime; + } + } + + @Override + protected boolean updateBasin() { + if (this.running) return true; + if (this.level == null || this.level.isClientSide) return true; + if (this.getBasin().filter(BasinBlockEntity::canContinueProcessing).isEmpty()) return true; + + List> recipes = this.getMatchingRecipes(); + if (recipes.isEmpty()) return true; + this.currentRecipe = recipes.get(0); + this.startProcessingBasin(); + this.sendData(); + return true; + } + + @Override + public void startProcessingBasin() { + if (this.running && this.procesingTime > 0) return; + super.startProcessingBasin(); + this.running = true; + this.procesingTime = this.currentRecipe instanceof ProcessingRecipe processed ? processed.getProcessingDuration() : 20; + } + + @Override + protected boolean isRunning() { + return running; + } + + + @Override + protected Optional getBasin() { + if (level == null) + return Optional.empty(); + BlockEntity basinBE = level.getBlockEntity(worldPosition.below(1)); + if (!(basinBE instanceof BasinBlockEntity)) + return Optional.empty(); + if(getBlockState().getValue(OPEN)) + return Optional.empty(); + return Optional.of((BasinBlockEntity) basinBE); + } + @Override + protected boolean matchStaticFilters(Recipe recipe) { + return recipe.getType() == RecipeRegistry.BASIN_FERMENTING.getType(); + } + + + + private static final Object BasinFermentingRecipesKey = new Object(); + @Override + protected Object getRecipeCacheKey() { + return BasinFermentingRecipesKey; + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BlockEntityRegistry.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BlockEntityRegistry.java new file mode 100644 index 0000000..0e923b1 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/BlockEntityRegistry.java @@ -0,0 +1,27 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import com.simibubi.create.content.kinetics.base.ShaftInstance; +import com.tterrag.registrate.util.entry.BlockEntityEntry; + +import static com.jesz.createdieselgenerators.CreateDieselGenerators.REGISTRATE; + +public class BlockEntityRegistry { + + public static final BlockEntityEntry DIESEL_ENGINE = REGISTRATE.blockEntity("diesel_engine_tile_entity", DieselGeneratorBlockEntity::new) + .instance(() -> ShaftInstance::new, false) + .validBlocks(BlockRegistry.DIESEL_ENGINE) + .renderer(() -> DieselGeneratorRenderer::new) + .register(); + public static final BlockEntityEntry LARGE_DIESEL_ENGINE = REGISTRATE.blockEntity("large_diesel_engine_tile_entity", LargeDieselGeneratorBlockEntity::new) + .instance(() -> ShaftInstance::new, false) + .validBlocks(BlockRegistry.MODULAR_DIESEL_ENGINE) + .renderer(() -> LargeDieselGeneratorRenderer::new) + .register(); + public static final BlockEntityEntry BASIN_LID = REGISTRATE.blockEntity("basin_lid_tile_entity", BasinLidBlockEntity::new) + .validBlocks(BlockRegistry.BASIN_LID) + .register(); + + public static void register() { + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorBlockEntity.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorBlockEntity.java new file mode 100644 index 0000000..e187e96 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorBlockEntity.java @@ -0,0 +1,194 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +//import com.jesz.createdieselgenerators.blocks.LargeDieselGeneratorBlock; +import com.jesz.createdieselgenerators.blocks.DieselGeneratorBlock; +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity; +import com.simibubi.create.content.kinetics.base.IRotate; +import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTankBehaviour; +import com.simibubi.create.foundation.fluid.FluidHelper; +import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.TagKey; +import net.minecraft.util.Mth; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.List; + +import static com.jesz.createdieselgenerators.blocks.DieselGeneratorBlock.*; +import static com.simibubi.create.AllTags.optionalTag; + +public class DieselGeneratorBlockEntity extends GeneratingKineticBlockEntity { + BlockState state; + boolean weak; + boolean slow; + boolean validFuel; + + private final TagKey tagSS; + private final TagKey tagFS; + private final TagKey tagFW; + private final TagKey tagSW; + private final TagKey tagPlantOil; + private final TagKey tagFuel; + private final TagKey tagEthanol; + public DieselGeneratorBlockEntity(BlockEntityType typeIn, BlockPos pos, BlockState state) { + super(typeIn, pos, state); + tagSS = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_slow_strong")); + tagSW = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_slow_weak")); + tagFS = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_fast_strong")); + tagFW = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_fast_weak")); + tagPlantOil = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:plantoil")); + tagFuel = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:fuel")); + tagEthanol = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:ethanol")); + this.state = state; + } + private SmartFluidTankBehaviour tank; + + + + + + @Override + public LazyOptional getCapability(Capability cap, Direction side) { + if(state.getValue(FACING) == Direction.DOWN) { + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.WEST) + return tank.getCapability().cast(); + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.EAST) + return tank.getCapability().cast(); + }else if(state.getValue(FACING) == Direction.UP){ + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.NORTH) + return tank.getCapability().cast(); + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.SOUTH) + return tank.getCapability().cast(); + }else{ + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.DOWN) + return tank.getCapability().cast(); + } + return super.getCapability(cap, side); + } + + + @Override + protected void write(CompoundTag compound, boolean clientPacket) { + super.write(compound, clientPacket); + tank.write(compound, false); + } + + @Override + protected void read(CompoundTag compound, boolean clientPacket) { + super.read(compound, clientPacket); + tank.read(compound, false); + } + + @Override + public void addBehaviours(List behaviours) { + tank = SmartFluidTankBehaviour.single(this, 1000); + behaviours.add(tank); + super.addBehaviours(behaviours); + } + + @Override + public void initialize() { + super.initialize(); + if (!hasSource() || getGeneratedSpeed() > getTheoreticalSpeed()) + updateGeneratedRotation(); + } + @Override + public float calculateAddedStressCapacity() { + if(getGeneratedSpeed() == 0) + return 0; + if(weak) + return 512/Math.abs(getGeneratedSpeed()); + else + return 1024/Math.abs(getGeneratedSpeed()); + } + + @Override + public float getGeneratedSpeed() { + if(validFuel) { + if(slow) + return convertToDirection(48, getBlockState().getValue(FACING)); + else + return convertToDirection(96, getBlockState().getValue(FACING)); + } + return 0; + } + + @Override + public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { + boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking); + if (!IRotate.StressImpact.isEnabled()) + return added; + + float stressBase = calculateAddedStressCapacity(); + if (Mth.equal(stressBase, 0)) + return added; + Lang.translate("gui.goggles.fluid_container").forGoggles(tooltip); + Lang.fluidName(tank.getPrimaryHandler().getFluid()).style(ChatFormatting.GRAY).space().add(Lang.number(tank.getPrimaryHandler().getFluid().getAmount()).style(ChatFormatting.DARK_GRAY)).add(Lang.translate("generic.unit.millibuckets").style(ChatFormatting.DARK_GRAY)).forGoggles(tooltip); + + return true; + } + int t = 0; + float lastsp = 0; + @Override + public void tick() { + super.tick(); + updateGeneratedRotation(); + if (tank.getPrimaryHandler().getFluid().getFluid().is(tagFS) || tank.getPrimaryHandler().getFluid().getFluid().is(tagFuel)) { + validFuel = true; + slow = false; + weak = false; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagFW) || tank.getPrimaryHandler().getFluid().getFluid().is(tagEthanol)) { + validFuel = true; + slow = false; + weak = true; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagSS) || tank.getPrimaryHandler().getFluid().getFluid().is(tagPlantOil)) { + validFuel = true; + slow = true; + weak = false; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagSW)) { + validFuel = true; + slow = true; + weak = true; + }else{ + validFuel = false; + } + + if(lastsp != getGeneratedSpeed()){ + changeBlockstate(state.setValue(DieselGeneratorBlock.POWERED, validFuel)); + lastsp = getGeneratedSpeed(); + } + + if(t > 2){ + if(validFuel){ + tank.getPrimaryHandler().setFluid(FluidHelper.copyStackWithAmount(tank.getPrimaryHandler().getFluid(), + tank.getPrimaryHandler().getFluid().getAmount() - 1)); + t = 0; + level.playLocalSound(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), SoundEvents.CANDLE_EXTINGUISH, SoundSource.BLOCKS, 3f, 1.18f, false); + AllSoundEvents.STEAM.playAt(level, worldPosition, 0.2f, .8f, false); + } + }else { + t++; + } + + + } + private void changeBlockstate(BlockState state){ + level.setBlock(getBlockPos(), state, 3); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorRenderer.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorRenderer.java new file mode 100644 index 0000000..62dbba2 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DieselGeneratorRenderer.java @@ -0,0 +1,12 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.simibubi.create.content.kinetics.base.ShaftRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; + +public class DieselGeneratorRenderer extends ShaftRenderer { + + public DieselGeneratorRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorBlockEntity.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorBlockEntity.java new file mode 100644 index 0000000..5f23bad --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorBlockEntity.java @@ -0,0 +1,283 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.mojang.logging.LogUtils; +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity; +import com.simibubi.create.content.kinetics.base.IRotate; +import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTankBehaviour; +import com.simibubi.create.foundation.fluid.FluidHelper; +import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.TagKey; +import net.minecraft.util.Mth; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.registries.ForgeRegistries; +import org.slf4j.Logger; + +import java.lang.ref.WeakReference; +import java.util.List; + +import static com.jesz.createdieselgenerators.blocks.LargeDieselGeneratorBlock.*; +import static com.simibubi.create.AllTags.optionalTag; + +public class LargeDieselGeneratorBlockEntity extends GeneratingKineticBlockEntity { + BlockState state; + boolean weak; + boolean slow; + boolean validFuel; + public int stacked; + public boolean powered = false; + boolean end = true; + private final TagKey tagSS; + private final TagKey tagFS; + private final TagKey tagFW; + private final TagKey tagSW; + private final TagKey tagPlantOil; + private final TagKey tagFuel; + private final TagKey tagEthanol; + public WeakReference forw; + public WeakReference back; + + public LargeDieselGeneratorBlockEntity(BlockEntityType typeIn, BlockPos pos, BlockState state) { + super(typeIn, pos, state); + forw = new WeakReference<>(null); + back = new WeakReference<>(null); + tagSS = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_slow_strong")); + tagSW = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_slow_weak")); + tagFS = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_fast_strong")); + tagFW = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("createdieselgenerators:diesel_engine_fuel_fast_weak")); + tagPlantOil = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:plantoil")); + tagFuel = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:fuel")); + tagEthanol = optionalTag(ForgeRegistries.FLUIDS, new ResourceLocation("forge:ethanol")); + + this.state = state; + } + + private SmartFluidTankBehaviour tank; + public LargeDieselGeneratorBlockEntity mainTankBE; + + @Override + public LazyOptional getCapability(Capability cap, Direction side) { + if (state.getValue(PIPE)) { + if (cap == ForgeCapabilities.FLUID_HANDLER && side == Direction.UP) + return tank.getCapability().cast(); + } + return super.getCapability(cap, side); + } + + @Override + protected void write(CompoundTag compound, boolean clientPacket) { + super.write(compound, clientPacket); + tank.write(compound, false); + } + + @Override + protected void read(CompoundTag compound, boolean clientPacket) { + super.read(compound, clientPacket); + tank.read(compound, false); + } + + @Override + public void addBehaviours(List behaviours) { + tank = SmartFluidTankBehaviour.single(this, 1000); + behaviours.add(tank); + super.addBehaviours(behaviours); + } + + @Override + public void initialize() { + super.initialize(); + if (!hasSource() || getGeneratedSpeed() > getTheoreticalSpeed()) + updateGeneratedRotation(); + } + + @Override + public float calculateAddedStressCapacity() { + if (getGeneratedSpeed() == 0 || !end) + return 0; + if (weak) + return (512 / Math.abs(getGeneratedSpeed())) * stacked; + else + return (1024 / Math.abs(getGeneratedSpeed())) * stacked; + } + + @Override + public float getGeneratedSpeed() { + if (validFuel) { + if (slow) + return convertToDirection(48, getBlockState().getValue(FACING)); + else + return convertToDirection(96, getBlockState().getValue(FACING)); + } + return 0; + } + + @Override + public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { + boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking); + if (!IRotate.StressImpact.isEnabled()) + return added; + + float stressBase = calculateAddedStressCapacity(); + if (Mth.equal(stressBase, 0)) + return added; + Lang.translate("gui.goggles.fluid_container").forGoggles(tooltip); + Lang.fluidName(tank.getPrimaryHandler().getFluid()).style(ChatFormatting.GRAY).space().add(Lang.number(tank.getPrimaryHandler().getFluid().getAmount()).style(ChatFormatting.DARK_GRAY)).add(Lang.translate("generic.unit.millibuckets").style(ChatFormatting.DARK_GRAY)).forGoggles(tooltip); + + return true; + } + int t = 0; + boolean lastp = true; + boolean lastf; + @Override + public void tick() { + super.tick(); + + + LargeDieselGeneratorBlockEntity engineForward = getEngineFor(); + LargeDieselGeneratorBlockEntity engineBack = getEngineBack(); + + + lastf = getBlockState().getValue(PIPE); + state = getBlockState(); + if(engineForward == null){ + if(!lastf){ + lastf = true; + changeBlockState(getBlockState().setValue(PIPE, true)); + } + }else{ + if(lastf){ + lastf = false; + changeBlockState(getBlockState().setValue(PIPE, false)); + } + } + end = engineForward == null; + + + + + if (reActivateSource) { + updateGeneratedRotation(); + reActivateSource = false; + } + + // stacked + if (engineBack != null) { + this.stacked = engineBack.stacked + 1; + } else { + this.stacked = 1; + } + + if(tank.getPrimaryHandler().getFluid().getAmount() >= stacked){ + if (tank.getPrimaryHandler().getFluid().getFluid().is(tagFS) || tank.getPrimaryHandler().getFluid().getFluid().is(tagFuel)) { + validFuel = true; + slow = false; + weak = false; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagFW) || tank.getPrimaryHandler().getFluid().getFluid().is(tagEthanol)) { + validFuel = true; + slow = false; + weak = true; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagSS) || tank.getPrimaryHandler().getFluid().getFluid().is(tagPlantOil)) { + validFuel = true; + slow = true; + weak = false; + } else if (tank.getPrimaryHandler().getFluid().getFluid().is(tagSW)) { + validFuel = true; + slow = true; + weak = true; + }else{ + validFuel = false; + } + }else{ + validFuel = false; + } + lastp = getBlockState().getValue(POWERED); + + if (end) { + if(lastp != validFuel){ + changeBlockState(getBlockState().setValue(POWERED, powered)); + } + updateGeneratedRotation(); + powered = getGeneratedSpeed() != 0; + } else{ + powered = engineForward.powered; + if (lastp != powered) { +// lastp = powered; + changeBlockState(getBlockState().setValue(POWERED, powered)); + } + } + + + if (t > 2 && end) { + if (validFuel && tank.getPrimaryHandler().getFluid().getAmount() >= stacked) + tank.getPrimaryHandler().setFluid(FluidHelper.copyStackWithAmount(tank.getPrimaryHandler().getFluid(), + tank.getPrimaryHandler().getFluid().getAmount() - stacked)); + t = 0; + if (powered) { + level.playLocalSound(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), SoundEvents.CANDLE_EXTINGUISH, SoundSource.BLOCKS, 3f, 1.18f, false); + AllSoundEvents.STEAM.playAt(level, worldPosition, 0.2f, .8f, false); + } + } else { + t++; + } + + + } + + private void changeBlockState(BlockState state) { + level.setBlock(getBlockPos(), state, 3); + } + + private LargeDieselGeneratorBlockEntity getEngineFor() { + LargeDieselGeneratorBlockEntity engine = forw.get(); + if (engine == null || engine.isRemoved() || engine.state.getValue(FACING) == state.getValue(FACING)) { + if (engine != null) + forw = new WeakReference<>(null); + Direction facing = this.state.getValue(FACING); + BlockEntity be = level.getBlockEntity(worldPosition.relative(facing.getOpposite())); + if (be instanceof LargeDieselGeneratorBlockEntity engineBE) + forw = new WeakReference<>(engine = engineBE); + } + if(engine != null){ + if (engine.state.getValue(FACING) != state.getValue(FACING)) { + forw = new WeakReference<>(null); + return null; + } + } + return engine; + } + + private LargeDieselGeneratorBlockEntity getEngineBack() { + LargeDieselGeneratorBlockEntity engine = back.get(); + if (engine == null || engine.isRemoved()) { + if (engine != null) + back = new WeakReference<>(null); + Direction facing = this.state.getValue(FACING); + BlockEntity be = level.getBlockEntity(worldPosition.relative(facing)); + if (be instanceof LargeDieselGeneratorBlockEntity engineBE) + back = new WeakReference<>(engine = engineBE); + + } + if(engine != null){ + if (engine.state.getValue(FACING) != state.getValue(FACING)) { + back = new WeakReference<>(null); + return null; + } + } + return engine; + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorRenderer.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorRenderer.java new file mode 100644 index 0000000..cbcb644 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/LargeDieselGeneratorRenderer.java @@ -0,0 +1,12 @@ +package com.jesz.createdieselgenerators.blocks.entity; + +import com.simibubi.create.content.kinetics.base.ShaftRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; + +public class LargeDieselGeneratorRenderer extends ShaftRenderer { + + public LargeDieselGeneratorRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + +} diff --git a/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingCategory.java b/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingCategory.java new file mode 100644 index 0000000..f25aac2 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingCategory.java @@ -0,0 +1,110 @@ +package com.jesz.createdieselgenerators.compat.jei; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; +import com.simibubi.create.compat.jei.category.CreateRecipeCategory; +import com.simibubi.create.compat.jei.category.animations.AnimatedMillstone; +import com.simibubi.create.content.processing.basin.BasinRecipe; +import com.simibubi.create.content.processing.burner.BlazeBurnerBlock; +import com.simibubi.create.content.processing.recipe.HeatCondition; +import com.simibubi.create.content.processing.recipe.ProcessingOutput; +import com.simibubi.create.foundation.fluid.FluidIngredient; +import com.simibubi.create.foundation.gui.AllGuiTextures; +import com.simibubi.create.foundation.item.ItemHelper; +import com.simibubi.create.foundation.utility.Pair; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.mutable.MutableInt; + +import javax.annotation.ParametersAreNonnullByDefault; +import java.util.ArrayList; +import java.util.List; + +@ParametersAreNonnullByDefault +public class BasinFermentingCategory extends CreateRecipeCategory { + + private final BasinFermentingStationElement BasinFermentingStation = new BasinFermentingStationElement(); + + public BasinFermentingCategory(Info info) { + super(info); + } + + +@Override +public void setRecipe(IRecipeLayoutBuilder builder, BasinRecipe recipe, IFocusGroup focuses) { + List> condensedIngredients = ItemHelper.condenseIngredients(recipe.getIngredients()); + + int size = condensedIngredients.size() + recipe.getFluidIngredients().size(); + int xOffset = size < 2 ? (2 - size) * 19 / 2 : 0; + int i = 0; + + for (Pair pair : condensedIngredients) { + List stacks = new ArrayList<>(); + for (ItemStack itemStack : pair.getFirst().getItems()) { + ItemStack copy = itemStack.copy(); + copy.setCount(pair.getSecond().getValue()); + stacks.add(copy); + } + + int xPosition = 20 - (size % 2 != 0 && i == size - 1 ? 0 : i % 2 == 0 ? 10 : -9); + int yPosition = -19 * (i / 2) + 20; + + builder + .addSlot(RecipeIngredientRole.INPUT, xPosition, yPosition) + .setBackground(getRenderedSlot(), -1, -1) + .addItemStacks(stacks); + i++; + } + for (FluidIngredient fluidIngredient : recipe.getFluidIngredients()) { + int xPosition = 20 - (size % 2 != 0 && i == size - 1 ? 0 : i % 2 == 0 ? 10 : -9); + int yPosition = -19 * (i / 2) + 20; + builder + .addSlot(RecipeIngredientRole.INPUT, xPosition, yPosition) + .setBackground(getRenderedSlot(), -1, -1) + .addIngredients(ForgeTypes.FLUID_STACK, withImprovedVisibility(fluidIngredient.getMatchingFluidStacks())) + .addTooltipCallback(addFluidTooltip(fluidIngredient.getRequiredAmount())); + i++; + } + + size = recipe.getRollableResults().size() + recipe.getFluidResults().size(); + i = 0; + + for (ProcessingOutput result : recipe.getRollableResults()) { + int xPosition = 142 - (size % 2 != 0 && i == size - 1 ? 0 : i % 2 == 0 ? 10 : -9); + int yPosition = -20 * (i / 2) + 30; + + builder + .addSlot(RecipeIngredientRole.OUTPUT, xPosition, yPosition) + .setBackground(getRenderedSlot(result), -1, -1) + .addItemStack(result.getStack()) + .addTooltipCallback(addStochasticTooltip(result)); + i++; + } + + for (FluidStack fluidResult : recipe.getFluidResults()) { + int xPosition = 142 - (size % 2 != 0 && i == size - 1 ? 0 : i % 2 == 0 ? 10 : -9); + int yPosition = -20 * (i / 2) + 30; + + builder + .addSlot(RecipeIngredientRole.OUTPUT, xPosition, yPosition) + .setBackground(getRenderedSlot(), -1, -1) + .addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(fluidResult)) + .addTooltipCallback(addFluidTooltip(fluidResult.getAmount())); + i++; + } +} + @Override + public void draw(BasinRecipe recipe, IRecipeSlotsView iRecipeSlotsView, PoseStack matrixStack, double mouseX, double mouseY) { + AllGuiTextures.JEI_ARROW.render(matrixStack, 85, 32); + AllGuiTextures.JEI_DOWN_ARROW.render(matrixStack, 50, 4); + BasinFermentingStation.draw(matrixStack, 50, 27); + } + +} \ No newline at end of file diff --git a/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingStationElement.java b/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingStationElement.java new file mode 100644 index 0000000..81432c4 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/compat/jei/BasinFermentingStationElement.java @@ -0,0 +1,43 @@ +package com.jesz.createdieselgenerators.compat.jei; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.gui.element.GuiGameElement; +import mezz.jei.api.gui.drawable.IDrawable; + +import static com.jesz.createdieselgenerators.blocks.BasinLidBlock.ON_A_BASIN; + +public class BasinFermentingStationElement implements IDrawable { + @Override + public int getWidth() { + return 50; + } + + @Override + public int getHeight() { + return 50; + } + + @Override + public void draw(PoseStack poseStack, int xOffset, int yOffset) { + poseStack.pushPose(); + poseStack.translate(xOffset, yOffset, 200); + poseStack.mulPose(Vector3f.XP.rotationDegrees(-15.5f)); + poseStack.mulPose(Vector3f.YP.rotationDegrees(22.5f)); + int scale = 23; + + GuiGameElement.of(BlockRegistry.BASIN_LID.getDefaultState().setValue(ON_A_BASIN, true)) + .atLocal(0, 0, 0) + .scale(scale) + .render(poseStack); + + GuiGameElement.of(AllBlocks.BASIN.getDefaultState()) + .atLocal(0, 1, 0) + .scale(scale) + .render(poseStack); + + poseStack.popPose(); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/compat/jei/cdgJei.java b/src/main/java/com/jesz/createdieselgenerators/compat/jei/cdgJei.java new file mode 100644 index 0000000..e673fda --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/compat/jei/cdgJei.java @@ -0,0 +1,256 @@ +package com.jesz.createdieselgenerators.compat.jei; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import com.jesz.createdieselgenerators.recipes.RecipeRegistry; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.compat.jei.*; +import com.simibubi.create.compat.jei.category.CreateRecipeCategory; +import com.simibubi.create.content.equipment.blueprint.BlueprintScreen; +import com.simibubi.create.content.logistics.filter.AbstractFilterScreen; +import com.simibubi.create.content.processing.basin.BasinRecipe; +import com.simibubi.create.content.redstone.link.controller.LinkedControllerScreen; +import com.simibubi.create.content.trains.schedule.ScheduleScreen; +import com.simibubi.create.foundation.config.ConfigBase; +import com.simibubi.create.foundation.gui.menu.AbstractSimiContainerScreen; +import com.simibubi.create.foundation.recipe.IRecipeTypeInfo; +import com.simibubi.create.infrastructure.config.AllConfigs; +import com.simibubi.create.infrastructure.config.CRecipes; +import mezz.jei.api.IModPlugin; +import mezz.jei.api.JeiPlugin; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.recipe.category.IRecipeCategory; +import mezz.jei.api.registration.IGuiHandlerRegistration; +import mezz.jei.api.registration.IRecipeCatalystRegistration; +import mezz.jei.api.registration.IRecipeCategoryRegistration; +import mezz.jei.api.registration.IRecipeRegistration; +import mezz.jei.api.runtime.IIngredientManager; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; + +import javax.annotation.ParametersAreNonnullByDefault; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.Supplier; + +import static com.jesz.createdieselgenerators.CreateDieselGenerators.translate; +import static com.simibubi.create.compat.jei.CreateJEI.*; + +@JeiPlugin +@ParametersAreNonnullByDefault +public class cdgJei implements IModPlugin { + + private static final ResourceLocation ID = new ResourceLocation("createdieselgenerators", "jei_plugin"); + @Override + public ResourceLocation getPluginUid() { + return ID; + } + + + private final List> allCategories = new ArrayList<>(); + private IIngredientManager ingredientManager; + + private void loadCategories() { + allCategories.clear(); + + CreateRecipeCategory + milling = builder(BasinRecipe.class) + .addTypedRecipes(RecipeRegistry.BASIN_FERMENTING) + .catalyst(BlockRegistry.BASIN_LID::get) + .catalyst(AllBlocks.BASIN::get) + .doubleItemIcon(AllBlocks.BASIN.get(), BlockRegistry.BASIN_LID.get()) + .emptyBackground(177, 53) + .build("basin_fermenting", BasinFermentingCategory::new); + } + + private > CategoryBuilder builder(Class recipeClass) { + return new CategoryBuilder<>(recipeClass); + } + + @Override + public void registerCategories(IRecipeCategoryRegistration registration) { + loadCategories(); + registration.addRecipeCategories(allCategories.toArray(IRecipeCategory[]::new)); + } + @Override + public void registerRecipes(IRecipeRegistration registration) { + ingredientManager = registration.getIngredientManager(); + + allCategories.forEach(c -> c.registerRecipes(registration)); + } + + @Override + public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) { + allCategories.forEach(c -> c.registerCatalysts(registration)); + } + + @Override + public void registerGuiHandlers(IGuiHandlerRegistration registration) { + registration.addGenericGuiContainerHandler(AbstractSimiContainerScreen.class, new SlotMover()); + + registration.addGhostIngredientHandler(AbstractFilterScreen.class, new GhostIngredientHandler()); + registration.addGhostIngredientHandler(BlueprintScreen.class, new GhostIngredientHandler()); + registration.addGhostIngredientHandler(LinkedControllerScreen.class, new GhostIngredientHandler()); + registration.addGhostIngredientHandler(ScheduleScreen.class, new GhostIngredientHandler()); + } + + private class CategoryBuilder> { + private final Class recipeClass; + private Predicate predicate = cRecipes -> true; + + private IDrawable background; + private IDrawable icon; + + private final List>> recipeListConsumers = new ArrayList<>(); + private final List> catalysts = new ArrayList<>(); + + public CategoryBuilder(Class recipeClass) { + this.recipeClass = recipeClass; + } + + public CategoryBuilder enableIf(Predicate predicate) { + this.predicate = predicate; + return this; + } + + public CategoryBuilder enableWhen(Function configValue) { + predicate = c -> configValue.apply(c).get(); + return this; + } + + public CategoryBuilder addRecipeListConsumer(Consumer> consumer) { + recipeListConsumers.add(consumer); + return this; + } + + public CategoryBuilder addRecipes(Supplier> collection) { + return addRecipeListConsumer(recipes -> recipes.addAll(collection.get())); + } + + public CategoryBuilder addAllRecipesIf(Predicate> pred) { + return addRecipeListConsumer(recipes -> consumeAllRecipes(recipe -> { + if (pred.test(recipe)) { + recipes.add((T) recipe); + } + })); + } + + public CategoryBuilder addAllRecipesIf(Predicate> pred, Function, T> converter) { + return addRecipeListConsumer(recipes -> consumeAllRecipes(recipe -> { + if (pred.test(recipe)) { + recipes.add(converter.apply(recipe)); + } + })); + } + + public CategoryBuilder addTypedRecipes(IRecipeTypeInfo recipeTypeEntry) { + return addTypedRecipes(recipeTypeEntry::getType); + } + + public CategoryBuilder addTypedRecipes(Supplier> recipeType) { + return addRecipeListConsumer(recipes -> CreateJEI.consumeTypedRecipes(recipes::add, recipeType.get())); + } + + public CategoryBuilder addTypedRecipes(Supplier> recipeType, Function, T> converter) { + return addRecipeListConsumer(recipes -> CreateJEI.consumeTypedRecipes(recipe -> recipes.add(converter.apply(recipe)), recipeType.get())); + } + + public CategoryBuilder addTypedRecipesIf(Supplier> recipeType, Predicate> pred) { + return addRecipeListConsumer(recipes -> CreateJEI.consumeTypedRecipes(recipe -> { + if (pred.test(recipe)) { + recipes.add(recipe); + } + }, recipeType.get())); + } + + public CategoryBuilder addTypedRecipesExcluding(Supplier> recipeType, + Supplier> excluded) { + return addRecipeListConsumer(recipes -> { + List> excludedRecipes = getTypedRecipes(excluded.get()); + CreateJEI.consumeTypedRecipes(recipe -> { + for (Recipe excludedRecipe : excludedRecipes) { + if (doInputsMatch(recipe, excludedRecipe)) { + return; + } + } + recipes.add(recipe); + }, recipeType.get()); + }); + } + + public CategoryBuilder removeRecipes(Supplier> recipeType) { + return addRecipeListConsumer(recipes -> { + List> excludedRecipes = getTypedRecipes(recipeType.get()); + recipes.removeIf(recipe -> { + for (Recipe excludedRecipe : excludedRecipes) + if (doInputsMatch(recipe, excludedRecipe) && doOutputsMatch(recipe, excludedRecipe)) + return true; + return false; + }); + }); + } + + public CategoryBuilder catalystStack(Supplier supplier) { + catalysts.add(supplier); + return this; + } + + public CategoryBuilder catalyst(Supplier supplier) { + return catalystStack(() -> new ItemStack(supplier.get() + .asItem())); + } + + public CategoryBuilder icon(IDrawable icon) { + this.icon = icon; + return this; + } + + public CategoryBuilder itemIcon(ItemLike item) { + icon(new ItemIcon(() -> new ItemStack(item))); + return this; + } + + public CategoryBuilder doubleItemIcon(ItemLike item1, ItemLike item2) { + icon(new DoubleItemIcon(() -> new ItemStack(item1), () -> new ItemStack(item2))); + return this; + } + + public CategoryBuilder background(IDrawable background) { + this.background = background; + return this; + } + + public CategoryBuilder emptyBackground(int width, int height) { + background(new EmptyBackground(width, height)); + return this; + } + + public CreateRecipeCategory build(String name, CreateRecipeCategory.Factory factory) { + Supplier> recipesSupplier; + if (predicate.test(AllConfigs.server().recipes)) { + recipesSupplier = () -> { + List recipes = new ArrayList<>(); + for (Consumer> consumer : recipeListConsumers) + consumer.accept(recipes); + return recipes; + }; + } else { + recipesSupplier = () -> Collections.emptyList(); + } + + CreateRecipeCategory.Info info = new CreateRecipeCategory.Info<>( + new mezz.jei.api.recipe.RecipeType<>(new ResourceLocation("createdieselgenerators"), recipeClass), + translate("createdieselgenerators.recipe." + name), background, icon, recipesSupplier, catalysts); + CreateRecipeCategory category = factory.create(info); + allCategories.add(category); + return category; + } + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/fluids/FluidRegistry.java b/src/main/java/com/jesz/createdieselgenerators/fluids/FluidRegistry.java new file mode 100644 index 0000000..b3d6e62 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/fluids/FluidRegistry.java @@ -0,0 +1,53 @@ +package com.jesz.createdieselgenerators.fluids; + +import com.simibubi.create.AllFluids; +import com.simibubi.create.content.fluids.potion.PotionFluid; +import com.tterrag.registrate.util.entry.FluidEntry; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.BlockAndTintGetter; +import net.minecraft.world.level.material.FluidState; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.ForgeFlowingFluid; + +import static com.jesz.createdieselgenerators.CreateDieselGenerators.REGISTRATE; + +public class FluidRegistry { + + public static final FluidEntry PLANT_OIL = + REGISTRATE.fluid("plant_oil", new ResourceLocation("createdieselgenerators:fluid/plant_oil_still"), new ResourceLocation("createdieselgenerators:fluid/plant_oil_flow")) + .lang("Plant Oil") + .properties(b -> b.viscosity(1500) + .density(500)) + .fluidProperties(p -> p.levelDecreasePerBlock(2) + .tickRate(25) + .slopeFindDistance(3) + .explosionResistance(100f)) + .register(); + + public static final FluidEntry BIODIESEL = + REGISTRATE.fluid("biodiesel", new ResourceLocation("createdieselgenerators:fluid/biodiesel_still"), new ResourceLocation("createdieselgenerators:fluid/biodiesel_flow")) + .lang("Biodiesel") + .properties(b -> b.viscosity(1500) + .density(500)) + .fluidProperties(p -> p.levelDecreasePerBlock(2) + .tickRate(25) + .slopeFindDistance(3) + .explosionResistance(100f)) + .register(); + public static final FluidEntry ETHANOL = + REGISTRATE.fluid("ethanol", new ResourceLocation("createdieselgenerators:fluid/ethanol_still"), new ResourceLocation("createdieselgenerators:fluid/ethanol_flow")) + .lang("Ethanol") + .properties(b -> b.viscosity(1500) + .density(500)) + .fluidProperties(p -> p.levelDecreasePerBlock(2) + .tickRate(25) + .slopeFindDistance(5) + .explosionResistance(100f)) + .register(); + + public static void register() {} + + +} diff --git a/src/main/java/com/jesz/createdieselgenerators/items/ItemRegistry.java b/src/main/java/com/jesz/createdieselgenerators/items/ItemRegistry.java new file mode 100644 index 0000000..2e02c92 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/items/ItemRegistry.java @@ -0,0 +1,20 @@ +package com.jesz.createdieselgenerators.items; + +import com.jesz.createdieselgenerators.CreativeTab; +import net.minecraft.world.item.Item; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ItemRegistry { + public static final DeferredRegister ITEMS = + DeferredRegister.create(ForgeRegistries.ITEMS, "createdieselgenerators"); + + public static final RegistryObject ENGINEPISTON = ITEMS.register("engine_piston", + () -> new Item(new Item.Properties().tab(CreativeTab.CREATIVE_TAB))); + + public static void register(IEventBus eventBus) { + ITEMS.register(eventBus); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/ponder/BasinScenes.java b/src/main/java/com/jesz/createdieselgenerators/ponder/BasinScenes.java new file mode 100644 index 0000000..464e950 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/ponder/BasinScenes.java @@ -0,0 +1,78 @@ +package com.jesz.createdieselgenerators.ponder; + +import com.jesz.createdieselgenerators.fluids.FluidRegistry; +import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity; +import com.simibubi.create.foundation.ponder.SceneBuilder; +import com.simibubi.create.foundation.ponder.SceneBuildingUtil; +import com.simibubi.create.foundation.ponder.Selection; +import com.simibubi.create.foundation.ponder.element.InputWindowElement; +import com.simibubi.create.foundation.utility.Pointing; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; + +import static com.jesz.createdieselgenerators.blocks.BasinLidBlock.ON_A_BASIN; + +public class BasinScenes { + public static void basin_lid(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("basin_fermenting_station", "Setting up a Basin Fermenting Station"); + scene.configureBasePlate(0, 0, 3); + scene.showBasePlate(); + + Selection basinSection = util.select.position(1, 1, 1); + Selection basinLidSection = util.select.position(1, 2, 1); + + scene.idle(15); + + + scene.world.showSection(basinSection, Direction.DOWN); + scene.world.showSection(basinLidSection, Direction.DOWN); + scene.overlay.showText(50) + .attachKeyFrame() + .text("Basin Lids allow you to create Ethanol.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(60); + scene.overlay.showText(30) + .attachKeyFrame() + .text("Give them some sugar...") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(30); + scene.world.modifyBlock(util.grid.at(1, 2, 1), s -> s.setValue(ON_A_BASIN, false), false); + scene.world.hideSection(basinLidSection, Direction.UP); + scene.idle(10); + scene.overlay.showControls(new InputWindowElement(util.vector.topOf(1, 1, 1), Pointing.DOWN).withItem(new ItemStack(Items.SUGAR)), + 30); + scene.idle(30); + + scene.world.showSection(basinLidSection, Direction.DOWN); + scene.world.modifyBlock(util.grid.at(1, 2, 1), s -> s.setValue(ON_A_BASIN, false), false); + scene.idle(20); + scene.world.modifyBlock(util.grid.at(1, 2, 1), s -> s.setValue(ON_A_BASIN, true), false); + scene.idle(30); + scene.overlay.showText(30) + .attachKeyFrame() + .text("... It will create Ethanol.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(40); + scene.world.showSection(util.select.fromTo(3, 0, 1, 4, 1, 1), Direction.SOUTH); + scene.world.showSection(util.select.position(2, 1, 1), Direction.SOUTH); + scene.idle(20); + scene.world.modifyKineticSpeed(util.select.position(3, 0, 0),s -> 16f); + scene.world.modifyKineticSpeed(util.select.position(3, 1, 1),s -> -16f); + scene.idle(10); + FluidStack content = new FluidStack(FluidRegistry.ETHANOL.get() + .getSource(), 50); + scene.world.modifyBlockEntity(util.grid.at(4, 0, 1), FluidTankBlockEntity.class, be -> be.getTankInventory() + .fill(content, IFluidHandler.FluidAction.EXECUTE)); + scene.idle(60); + + + + + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/ponder/DieselEngineScenes.java b/src/main/java/com/jesz/createdieselgenerators/ponder/DieselEngineScenes.java new file mode 100644 index 0000000..eaf6f8e --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/ponder/DieselEngineScenes.java @@ -0,0 +1,164 @@ +package com.jesz.createdieselgenerators.ponder; + +import com.jesz.createdieselgenerators.fluids.FluidRegistry; +import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity; +import com.simibubi.create.foundation.ponder.ElementLink; +import com.simibubi.create.foundation.ponder.SceneBuilder; +import com.simibubi.create.foundation.ponder.SceneBuildingUtil; +import com.simibubi.create.foundation.ponder.Selection; +import com.simibubi.create.foundation.ponder.element.WorldSectionElement; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; + +import static com.jesz.createdieselgenerators.blocks.DieselGeneratorBlock.POWERED; + +public class DieselEngineScenes { + public static void small(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("diesel_engine", "Setting up a Diesel Engine"); + scene.configureBasePlate(0, 0, 3); + scene.showBasePlate(); + + Selection tank = util.select.fromTo(4, 0, 1, 4, 1, 1); + BlockPos pumpPos = util.grid.at(3, 1, 1); + BlockPos enginePos = util.grid.at(1, 2, 1); + Selection engine = util.select.position(enginePos); + Selection pump = util.select.position(pumpPos); + Selection pipe = util.select.fromTo(1, 1, 1, 3, 1, 1); + Selection cogs = util.select.fromTo(3, 0, 2, 4, 0, 2); + + scene.idle(15); + ElementLink engineElement = + scene.world.showIndependentSection(engine, Direction.DOWN); + scene.world.moveSection(engineElement, util.vector.of(0, -1, 0), 0); + scene.world.modifyBlock(util.grid.at(1, 2, 1), s -> s.setValue(POWERED, false) , false); + scene.idle(15); + scene.overlay.showText(50) + .attachKeyFrame() + .text("Diesel Generators are a compact way of generating kinetic energy.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(30); + scene.world.hideIndependentSection(engineElement, Direction.UP); + scene.idle(15); + scene.world.moveSection(engineElement, util.vector.of(0, 1, 0), 0); + scene.world.showIndependentSection(engine, Direction.DOWN); + scene.world.modifyBlock(enginePos, s -> s.setValue(POWERED, false) , false); + scene.world.showSection(pipe, Direction.WEST); + scene.world.showSection(tank, Direction.NORTH); + scene.idle(30); + scene.world.showSection(cogs, Direction.NORTH); + scene.idle(30); + scene.overlay.showText(70) + .attachKeyFrame() + .text("Give it some fuel and it will produce kinetic energy.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 2, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(30); + scene.world.modifyKineticSpeed(cogs, f -> 16f); + scene.world.modifyKineticSpeed(pump, f -> -32f); + scene.effects.rotationSpeedIndicator(util.grid.at(3, 0, 2)); + + FluidStack content = new FluidStack(FluidRegistry.BIODIESEL.get() + .getSource(), 300); + scene.world.modifyBlockEntity(util.grid.at(4, 0, 1), FluidTankBlockEntity.class, be -> be.getTankInventory() + .drain(content, IFluidHandler.FluidAction.EXECUTE)); + scene.world.modifyKineticSpeed(engine, f -> 96f); + scene.world.modifyBlock(enginePos, s -> s.setValue(POWERED, true) , false); + scene.effects.rotationSpeedIndicator(enginePos); + scene.idle(20); + scene.world.modifyKineticSpeed(cogs, f -> 0f); + scene.world.modifyKineticSpeed(pump, f -> 0f); + scene.idle(20); + scene.world.showSection(util.select.position(util.grid.at(1, 2, 0)), Direction.DOWN); + scene.world.showSection(util.select.position(util.grid.at(1, 2, 2)), Direction.DOWN); + scene.world.modifyKineticSpeed(util.select.fromTo(1, 2, 0, 1, 2, 2),f -> 96f); + scene.idle(60); + } + public static void modular(SceneBuilder scene, SceneBuildingUtil util) { + scene.title("large_diesel_engine", "Setting up a Modular Diesel Engine"); + scene.configureBasePlate(0, 0, 5); + scene.showBasePlate(); + + Selection tank = util.select.fromTo(4, 1, 3, 4, 2, 3); + BlockPos pumpPos = util.grid.at(3, 1, 3); + Selection mainEngine = util.select.position(1, 1, 1); + Selection engines = util.select.fromTo(1, 1, 2, 1, 1, 3); + + Selection pump = util.select.position(pumpPos); + Selection pipe = util.select.fromTo(1, 2, 1, 2 ,2, 1); + Selection pipe2 = util.select.fromTo(2, 1, 1, 2 ,1, 3); + Selection pipe3 = util.select.fromTo(3, 1, 3, 4, 2, 3); + Selection cogs = util.select.fromTo(5, 1, 2, 3, 1, 2); + Selection largeCog = util.select.position(5, 0, 1); + + scene.idle(15); + scene.world.showSection(mainEngine, Direction.DOWN); + scene.world.modifyBlock(util.grid.at(1, 1, 1), s -> s.setValue(POWERED, false), false); + scene.idle(15); + scene.overlay.showText(50) + .attachKeyFrame() + .text("Modular Diesel Generators function like normal Diesel generators.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + scene.idle(60); + + scene.world.showSection(pipe, Direction.DOWN); + scene.world.showSection(pipe2, Direction.DOWN); + scene.world.showSection(pipe3, Direction.DOWN); + + scene.idle(15); + + scene.world.showSection(cogs, Direction.DOWN); + scene.world.showSection(largeCog, Direction.DOWN); + + scene.idle(15); + + scene.overlay.showText(50) + .attachKeyFrame() + .text("Once you give them some fuel, they will produce Kinetic Energy ...") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + + scene.idle(60); + + scene.world.modifyKineticSpeed(largeCog, s -> 16f); + scene.world.modifyKineticSpeed(cogs, s -> -32f); + scene.world.modifyKineticSpeed(pump, s -> 32f); + scene.idle(10); + + FluidStack content = new FluidStack(FluidRegistry.BIODIESEL.get() + .getSource(), 300); + scene.world.modifyBlockEntity(util.grid.at(4, 1, 3), FluidTankBlockEntity.class, be -> be.getTankInventory() + .drain(content, IFluidHandler.FluidAction.EXECUTE)); + + scene.world.modifyKineticSpeed(mainEngine, s -> 96f); + scene.world.modifyBlock(util.grid.at(1, 1, 1), s -> s.setValue(POWERED, true), false); + + scene.effects.rotationSpeedIndicator(util.grid.at(1, 1, 1)); + + scene.idle(15); + + scene.overlay.showText(50) + .attachKeyFrame() + .text("... They can be stacked.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + + scene.idle(60); + + scene.world.showSection(engines, Direction.EAST); + + scene.world.modifyKineticSpeed(engines, s -> 96f); + scene.world.modifyBlocks(engines, s -> s.setValue(POWERED, true), false); + + scene.overlay.showText(50) + .attachKeyFrame() + .text("They will generate stress proportionally to how much engines you stack.") + .pointAt(util.vector.blockSurface(util.grid.at(1, 1, 1), Direction.NORTH)) + .placeNearTarget(); + + scene.idle(60); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/ponder/PonderIndex.java b/src/main/java/com/jesz/createdieselgenerators/ponder/PonderIndex.java new file mode 100644 index 0000000..50008d3 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/ponder/PonderIndex.java @@ -0,0 +1,25 @@ +package com.jesz.createdieselgenerators.ponder; + +import com.jesz.createdieselgenerators.blocks.BlockRegistry; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.ponder.PonderRegistrationHelper; +import com.simibubi.create.foundation.ponder.PonderRegistry; +import com.simibubi.create.infrastructure.ponder.AllPonderTags; + +public class PonderIndex { + static final PonderRegistrationHelper HELPER = new PonderRegistrationHelper("createdieselgenerators"); + public static void register() { + HELPER.forComponents(BlockRegistry.DIESEL_ENGINE) + .addStoryBoard("diesel_engine", DieselEngineScenes::small); + HELPER.forComponents(BlockRegistry.MODULAR_DIESEL_ENGINE) + .addStoryBoard("large_diesel_engine", DieselEngineScenes::modular); + HELPER.forComponents(BlockRegistry.BASIN_LID, AllBlocks.BASIN) + .addStoryBoard("basin_fermenting_station", BasinScenes::basin_lid); + + PonderRegistry.TAGS.forTag(AllPonderTags.KINETIC_SOURCES) + .add(BlockRegistry.DIESEL_ENGINE) + .add(BlockRegistry.MODULAR_DIESEL_ENGINE); + PonderRegistry.TAGS.forTag(AllPonderTags.KINETIC_APPLIANCES) + .add(BlockRegistry.BASIN_LID); + } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/recipes/BasinFermentingRecipe.java b/src/main/java/com/jesz/createdieselgenerators/recipes/BasinFermentingRecipe.java new file mode 100644 index 0000000..7d5b9a9 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/recipes/BasinFermentingRecipe.java @@ -0,0 +1,8 @@ +package com.jesz.createdieselgenerators.recipes; + +import com.simibubi.create.content.processing.basin.BasinRecipe; +import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder.ProcessingRecipeParams; + +public class BasinFermentingRecipe extends BasinRecipe { + public BasinFermentingRecipe(ProcessingRecipeParams params) { super(RecipeRegistry.BASIN_FERMENTING, params); } +} diff --git a/src/main/java/com/jesz/createdieselgenerators/recipes/RecipeRegistry.java b/src/main/java/com/jesz/createdieselgenerators/recipes/RecipeRegistry.java new file mode 100644 index 0000000..98c9d01 --- /dev/null +++ b/src/main/java/com/jesz/createdieselgenerators/recipes/RecipeRegistry.java @@ -0,0 +1,76 @@ +package com.jesz.createdieselgenerators.recipes; + +import com.simibubi.create.Create; +import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder; +import com.simibubi.create.content.processing.recipe.ProcessingRecipeSerializer; +import com.simibubi.create.foundation.recipe.IRecipeTypeInfo; +import com.simibubi.create.foundation.utility.Lang; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; +import org.jetbrains.annotations.Nullable; + +import java.util.function.Supplier; + +public enum RecipeRegistry implements IRecipeTypeInfo { + + BASIN_FERMENTING(BasinFermentingRecipe::new); + private final ResourceLocation id; + private final RegistryObject> serializerObject; + @Nullable + private final RegistryObject> typeObject; + private final Supplier> type; + + RecipeRegistry(Supplier> serializerSupplier, Supplier> typeSupplier, boolean registerType) { + String name = Lang.asId(name()); + id = new ResourceLocation("createdieselgenerators"); + serializerObject = Registers.SERIALIZER_REGISTER.register(name, serializerSupplier); + if (registerType) { + typeObject = Registers.TYPE_REGISTER.register(name, typeSupplier); + type = typeObject; + } else { + typeObject = null; + type = typeSupplier; + } + } + + RecipeRegistry(Supplier> serializerSupplier) { + String name = Lang.asId(name()); + id = new ResourceLocation("createdieselgenerators"); + serializerObject = Registers.SERIALIZER_REGISTER.register(name, serializerSupplier); + typeObject = Registers.TYPE_REGISTER.register(name, () -> RecipeType.simple(id)); + type = typeObject; + } + RecipeRegistry(ProcessingRecipeBuilder.ProcessingRecipeFactory processingFactory) { + this(() -> new ProcessingRecipeSerializer<>(processingFactory)); + } + public static void register(IEventBus modEventBus) { + Registers.SERIALIZER_REGISTER.register(modEventBus); + Registers.TYPE_REGISTER.register(modEventBus); + } + + @Override + public ResourceLocation getId() { + return id; + } + + @Override + public > T getSerializer() { + return (T) serializerObject.get(); + } + + @Override + public > T getType() { + return (T) type.get(); + } + + private static class Registers { + private static final DeferredRegister> SERIALIZER_REGISTER = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, "createdieselgenerators"); + private static final DeferredRegister> TYPE_REGISTER = DeferredRegister.create(Registry.RECIPE_TYPE_REGISTRY, "createdieselgenerators"); + } +} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..7a2963c --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,67 @@ +# This is an example mods.toml file. It contains the data relating to the loading mods. +# There are several mandatory fields (#mandatory), and many more that are optional (#optional). +# The overall format is standard TOML format, v0.5.0. +# Note that there are a couple of TOML lists in this file. +# Find more information on toml format here: https://github.com/toml-lang/toml +# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +modLoader="javafml" #mandatory +# A version range to match for said mod loader - for regular FML @Mod it will be the forge version +loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. +# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. +license="MIT" +# A URL to refer people to when problems occur with this mod +#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional +# A list of mods - how many allowed here is determined by the individual mod loader +[[mods]] #mandatory +# The modid of the mod +modId="createdieselgenerators" #mandatory +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata +# see the associated build.gradle script for how to populate this completely automatically during a build +version="1.19.2-1.1" #mandatory + # A display name for the mod +displayName="Create Diesel Generators" #mandatory +# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ +#updateJSONURL="https://change.me.example.invalid/updates.json" #optional +# A URL for the "homepage" for this mod, displayed in the mod UI +displayURL="https://www.curseforge.com/minecraft/mc-mods/create-diesel-generators" #optional +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="createde_icon.png" #optional +# A text field displayed in the mod UI +# credits="Thanks for this example mod goes to Java" #optional +# A text field displayed in the mod UI +authors="kamień-bot AKA George VI AKA Jesz" #optional +# The description text for the mod (multi line!) (#mandatory) +description=''' +A mod that adds diesel generators to the create mod! + +You can add custom fuel types by adding "createdieselgenerators:diesel_engine_fuel_[slow/fast]_[strong/weak]" tag to a fluid. +''' +# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. +[[dependencies.createdieselgenerators]] #optional + # the modid of the dependency + modId="forge" #mandatory + # Does this dependency have to exist - if not, ordering below must be specified + mandatory=true #mandatory + # The version range of the dependency + versionRange="[40.2.4,)" #mandatory + # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT or SERVER + side="BOTH" +# Here's another dependency +[[dependencies.createdieselgenerators]] + modId="minecraft" + mandatory=true +# This version range declares a minimum of the current minecraft version up to but not including the next major version + versionRange="[1.19.2,)" + ordering="NONE" + side="BOTH" +[[dependencies.createdieselgenerators]] + modId="create" + mandatory=true +# This version range declares a minimum of the current minecraft version up to but not including the next major version + versionRange="[0.5.1.a,)" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/assets/createdieselgenerators/blockstates/basin_lid.json b/src/main/resources/assets/createdieselgenerators/blockstates/basin_lid.json new file mode 100644 index 0000000..de2b986 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/blockstates/basin_lid.json @@ -0,0 +1,68 @@ +{ + "variants": { + "on_a_basin=false,facing=north,open=false": { + "model": "createdieselgenerators:block/basin_lid", + "y": 180 + }, + "on_a_basin=false,facing=south,open=false": { + "model": "createdieselgenerators:block/basin_lid" + }, + "on_a_basin=false,facing=west,open=false": { + "model": "createdieselgenerators:block/basin_lid", + "y": 90 + }, + "on_a_basin=false,facing=east,open=false": { + "model": "createdieselgenerators:block/basin_lid", + "y": 270 + }, + + "on_a_basin=true,facing=north,open=false": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin", + "y": 180 + }, + "on_a_basin=true,facing=south,open=false": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin" + }, + "on_a_basin=true,facing=west,open=false": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin", + "y": 90 + }, + "on_a_basin=true,facing=east,open=false": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin", + "y": 270 + }, + + "on_a_basin=false,facing=north,open=true": { + "model": "createdieselgenerators:block/basin_lid_open", + "y": 180 + }, + "on_a_basin=false,facing=south,open=true": { + "model": "createdieselgenerators:block/basin_lid_open" + }, + "on_a_basin=false,facing=west,open=true": { + "model": "createdieselgenerators:block/basin_lid_open", + "y": 90 + }, + "on_a_basin=false,facing=east,open=true": { + "model": "createdieselgenerators:block/basin_lid_open", + "y": 270 + }, + + "on_a_basin=true,facing=north,open=true": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin_open", + "y": 180 + }, + "on_a_basin=true,facing=south,open=true": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin_open" + }, + "on_a_basin=true,facing=west,open=true": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin_open", + "y": 90 + }, + "on_a_basin=true,facing=east,open=true": { + "model": "createdieselgenerators:block/basin_lid_on_a_basin_open", + "y": 270 + } + + } +} diff --git a/src/main/resources/assets/createdieselgenerators/blockstates/diesel_engine.json b/src/main/resources/assets/createdieselgenerators/blockstates/diesel_engine.json new file mode 100644 index 0000000..764cdcb --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/blockstates/diesel_engine.json @@ -0,0 +1,50 @@ +{ + "variants": { + "powered=false,facing=north": { + "model": "createdieselgenerators:block/diesel_engine", + "y": 180 + }, + "powered=false,facing=south": { + "model": "createdieselgenerators:block/diesel_engine" + }, + "powered=false,facing=west": { + "model": "createdieselgenerators:block/diesel_engine", + "y": 90 + }, + "powered=false,facing=east": { + "model": "createdieselgenerators:block/diesel_engine", + "y": 270 + }, + "powered=false,facing=up": { + "model": "createdieselgenerators:block/diesel_engine_vertical", + "y": 90 + }, + "powered=false,facing=down": { + "model": "createdieselgenerators:block/diesel_engine_vertical", + "x": 180 + }, + "powered=true,facing=north": { + "model": "createdieselgenerators:block/diesel_engine_on", + "y": 180 + }, + "powered=true,facing=south": { + "model": "createdieselgenerators:block/diesel_engine_on" + }, + "powered=true,facing=west": { + "model": "createdieselgenerators:block/diesel_engine_on", + "y": 90 + }, + "powered=true,facing=east": { + "model": "createdieselgenerators:block/diesel_engine_on", + "y": 270 + }, + "powered=true,facing=up": { + "model": "createdieselgenerators:block/diesel_engine_vertical_on", + "y": 90 + }, + "powered=true,facing=down": { + "model": "createdieselgenerators:block/diesel_engine_vertical_on", + "x": 180 + } + } +} diff --git a/src/main/resources/assets/createdieselgenerators/blockstates/large_diesel_engine.json b/src/main/resources/assets/createdieselgenerators/blockstates/large_diesel_engine.json new file mode 100644 index 0000000..5bbbe76 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/blockstates/large_diesel_engine.json @@ -0,0 +1,64 @@ +{ + "variants": { + "pipe=false,powered=false,facing=north": { + "model": "createdieselgenerators:block/large_diesel_engine", + "y": 180 + }, + "pipe=false,powered=false,facing=south": { + "model": "createdieselgenerators:block/large_diesel_engine" + }, + "pipe=false,powered=false,facing=west": { + "model": "createdieselgenerators:block/large_diesel_engine", + "y": 90 + }, + "pipe=false,powered=false,facing=east": { + "model": "createdieselgenerators:block/large_diesel_engine", + "y": 270 + }, + "pipe=false,powered=true,facing=north": { + "model": "createdieselgenerators:block/large_diesel_engine_on", + "y": 180 + }, + "pipe=false,powered=true,facing=south": { + "model": "createdieselgenerators:block/large_diesel_engine_on" + }, + "pipe=false,powered=true,facing=west": { + "model": "createdieselgenerators:block/large_diesel_engine_on", + "y": 90 + }, + "pipe=false,powered=true,facing=east": { + "model": "createdieselgenerators:block/large_diesel_engine_on", + "y": 270 + }, + "pipe=true,powered=false,facing=north": { + "model": "createdieselgenerators:block/large_diesel_engine_pipe", + "y": 180 + }, + "pipe=true,powered=false,facing=south": { + "model": "createdieselgenerators:block/large_diesel_engine_pipe" + }, + "pipe=true,powered=false,facing=west": { + "model": "createdieselgenerators:block/large_diesel_engine_pipe", + "y": 90 + }, + "pipe=true,powered=false,facing=east": { + "model": "createdieselgenerators:block/large_diesel_engine_pipe", + "y": 270 + }, + "pipe=true,powered=true,facing=north": { + "model": "createdieselgenerators:block/large_diesel_engine_on_pipe", + "y": 180 + }, + "pipe=true,powered=true,facing=south": { + "model": "createdieselgenerators:block/large_diesel_engine_on_pipe" + }, + "pipe=true,powered=true,facing=west": { + "model": "createdieselgenerators:block/large_diesel_engine_on_pipe", + "y": 90 + }, + "pipe=true,powered=true,facing=east": { + "model": "createdieselgenerators:block/large_diesel_engine_on_pipe", + "y": 270 + } + } +} diff --git a/src/main/resources/assets/createdieselgenerators/blockstates/plant_oil.json b/src/main/resources/assets/createdieselgenerators/blockstates/plant_oil.json new file mode 100644 index 0000000..c9a679c --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/blockstates/plant_oil.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "createdieselgenerators:block/plant_oil" + } + } +} diff --git a/src/main/resources/assets/createdieselgenerators/lang/en_us.json b/src/main/resources/assets/createdieselgenerators/lang/en_us.json new file mode 100644 index 0000000..8d7b51d --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/lang/en_us.json @@ -0,0 +1,27 @@ +{ + "itemGroup.cdg_creative_tab": "Create Diesel Generators", + "item.createdieselgenerators.engine_piston": "Engine Piston", + "item.createdieselgenerators.plant_oil_bucket": "Plant Oil Bucket", + "fluid.createdieselgenerators.plant_oil": "Plant Oil", + "item.createdieselgenerators.biodiesel_bucket": "Biodiesel Bucket", + "item.createdieselgenerators.ethanol_bucket": "Ethanol Bucket", + "fluid.createdieselgenerators.biodiesel": "Biodiesel", + "fluid.createdieselgenerators.ethanol": "Ethanol", + "block.createdieselgenerators.diesel_engine": "Diesel Engine", + "block.createdieselgenerators.basin_lid": "Basin Lid", + "block.createdieselgenerators.large_diesel_engine": "Modular Diesel Engine", + "createdieselgenerators.recipe.basin_fermenting": "Basin Fermenting", + + "createdieselgenerators.ponder.diesel_engine.header": "Setting up a Diesel Engine", + "createdieselgenerators.ponder.diesel_engine.text_1": "Diesel Generators are a compact way of generating kinetic energy.", + "createdieselgenerators.ponder.diesel_engine.text_2": "Give it some fuel and it will produce kinetic energy.", + "createdieselgenerators.ponder.basin_fermenting_station.header": "Setting up a Basin Fermenting Station", + "createdieselgenerators.ponder.basin_fermenting_station.text_1": "Basin Lids allow you to create Ethanol.", + "createdieselgenerators.ponder.basin_fermenting_station.text_2": "Give them some sugar...", + "createdieselgenerators.ponder.basin_fermenting_station.text_3": "... Ethanol will be created.", + "createdieselgenerators.ponder.large_diesel_engine.header": "Setting up a Modular Diesel Engine", + "createdieselgenerators.ponder.large_diesel_engine.text_1": "Modular Diesel Generators function like normal Diesel generators.", + "createdieselgenerators.ponder.large_diesel_engine.text_2": "Once you give them some fuel, they will produce Kinetic Energy ...", + "createdieselgenerators.ponder.large_diesel_engine.text_3": "... They can be stacked.", + "createdieselgenerators.ponder.large_diesel_engine.text_4": "They will generate stress proportionally to how much engines you stack." +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/lang/pl_pl.json b/src/main/resources/assets/createdieselgenerators/lang/pl_pl.json new file mode 100644 index 0000000..4fc001d --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/lang/pl_pl.json @@ -0,0 +1,27 @@ +{ + "item.createdieselgenerators.engine_piston": "Tłok Silnika", + "item.createdieselgenerators.plant_oil_bucket": "Wiadro Oleju Roślinnego", + "fluid.createdieselgenerators.plant_oil": "Olej Roślinny", + "item.createdieselgenerators.biodiesel_bucket": "Wiadro Biodiesla", + "item.createdieselgenerators.ethanol_bucket": "Wiadro Etanolu", + "fluid.createdieselgenerators.biodiesel": "Biodiesel", + "fluid.createdieselgenerators.biodiesel": "Biodiesel", + "fluid.createdieselgenerators.ethanol": "Ethanol", + "block.createdieselgenerators.diesel_engine": "Silnik Spalinowy", + "block.createdieselgenerators.basin_lid": "Pokrywa Tygielu", + "block.createdieselgenerators.large_diesel_engine": "Modułowy Silnik Spalinowy", + "createdieselgenerators.recipe.basin_fermenting": "Fermentacja w Tygielu", + + "createdieselgenerators.ponder.diesel_engine.header": "Używanie Silników Spalinowych", + "createdieselgenerators.ponder.diesel_engine.text_1": "Silniki Spalinowe są kompaktowym źródłem Energii Kinetycznej.", + "createdieselgenerators.ponder.diesel_engine.text_2": "Daj im trochę paliwa i zaczną tworzyć Energię Kinetyczną.", + "createdieselgenerators.ponder.basin_fermenting_station.header": "Fermentacja w Tygielu", + "createdieselgenerators.ponder.basin_fermenting_station.text_1": "Pokrywy Tygielu pozwalają ci tworzyć etanol.", + "createdieselgenerators.ponder.basin_fermenting_station.text_2": "Wsadź do nich trochę cukru...", + "createdieselgenerators.ponder.basin_fermenting_station.text_3": "... Etanol zostanie stworzony.", + "createdieselgenerators.ponder.large_diesel_engine.header": "Używanie Modułowych Silników Spalinowych", + "createdieselgenerators.ponder.large_diesel_engine.text_1": "Modułowe Silniki Spalinowe funkcjonują jak normalne Silniki Spalinowe.", + "createdieselgenerators.ponder.large_diesel_engine.text_2": "Jak im dasz Paliwo, zaczną produkować Energię Kinetyczną ...", + "createdieselgenerators.ponder.large_diesel_engine.text_3": "... One mogą być układane w Stos.", + "createdieselgenerators.ponder.large_diesel_engine.text_4": "Będą generować siłę proporcjonalnie do tego, ile Silników ustawisz." +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/basin_lid.json b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid.json new file mode 100644 index 0000000..025be64 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid.json @@ -0,0 +1,74 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/basin", + "1": "createdieselgenerators:block/basin_lid", + "3": "createdieselgenerators:block/basin_lid_top", + "particle": "create:block/basin" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [8, 0, 0, 1], "texture": "#0"}, + "east": {"uv": [8, 0, 0, 1], "texture": "#0"}, + "south": {"uv": [8, 0, 0, 1], "texture": "#0"}, + "west": {"uv": [8, 0, 0, 1], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [5, 2, 5], + "to": [11, 4, 11], + "faces": { + "north": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "east": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "south": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "west": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "up": {"uv": [11, 11, 5, 5], "texture": "#3"}, + "down": {"uv": [4, 4, 0, 8], "texture": "#3"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 2.5], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 2.5], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "translation": [0, 2.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "translation": [0, 2.75, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "translation": [0, 3.25, 0], + "scale": [0.625, 0.625, 0.625] + }, + "head": { + "translation": [0, 13, 0] + }, + "fixed": { + "rotation": [-90, 0, 0], + "translation": [0, 0, -3], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin.json b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin.json new file mode 100644 index 0000000..5f10723 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin.json @@ -0,0 +1,43 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "createdieselgenerators:block/basin_lid_top", + "4": "create:block/basin", + "5": "createdieselgenerators:block/gauge", + "6": "createdieselgenerators:block/basin_lid", + "particle": "create:block/basin" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 2, 16], + "faces": { + "north": {"uv": [8, 0, 0, 1], "texture": "#4"}, + "east": {"uv": [8, 0, 0, 1], "texture": "#4"}, + "south": {"uv": [8, 0, 0, 1], "texture": "#4"}, + "west": {"uv": [8, 0, 0, 1], "texture": "#4"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#6"} + } + }, + { + "from": [5, 2, 5], + "to": [11, 4, 11], + "faces": { + "north": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "east": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "south": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "west": {"uv": [11, 6, 5, 4], "texture": "#3"}, + "up": {"uv": [11, 11, 5, 5], "texture": "#3"}, + "down": {"uv": [4, 4, 0, 8], "texture": "#3"} + } + }, + { + "from": [4, -9, -0.01], + "to": [12, -1, -0.01], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#5"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin_open.json b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin_open.json new file mode 100644 index 0000000..78b95c8 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_on_a_basin_open.json @@ -0,0 +1,45 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "createdieselgenerators:block/basin_lid_top", + "4": "create:block/basin", + "5": "createdieselgenerators:block/gauge", + "6": "createdieselgenerators:block/basin_lid", + "particle": "create:block/basin" + }, + "elements": [ + { + "from": [0, 0, 14], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "x", "origin": [0, 0, 16]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#6"}, + "east": {"uv": [8, 0, 0, 1], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "west": {"uv": [8, 0, 0, 1], "rotation": 90, "texture": "#4"}, + "up": {"uv": [8, 0, 0, 1], "rotation": 180, "texture": "#4"}, + "down": {"uv": [8, 0, 0, 1], "texture": "#4"} + } + }, + { + "from": [5, 5, 16], + "to": [11, 11, 18], + "rotation": {"angle": 0, "axis": "x", "origin": [0, 0, 16]}, + "faces": { + "north": {"uv": [4, 4, 0, 8], "rotation": 180, "texture": "#3"}, + "east": {"uv": [11, 6, 5, 4], "rotation": 270, "texture": "#3"}, + "south": {"uv": [11, 11, 5, 5], "texture": "#3"}, + "west": {"uv": [11, 6, 5, 4], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 6, 5, 4], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 6, 5, 4], "texture": "#3"} + } + }, + { + "from": [4, -9, -0.01], + "to": [12, -1, -0.01], + "faces": { + "north": {"uv": [0, 0, 8, 8], "texture": "#5"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_open.json b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_open.json new file mode 100644 index 0000000..c0373fe --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/basin_lid_open.json @@ -0,0 +1,37 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "3": "createdieselgenerators:block/basin_lid_top", + "4": "create:block/basin", + "6": "createdieselgenerators:block/basin_lid", + "particle": "create:block/basin" + }, + "elements": [ + { + "from": [0, 0, 14], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "x", "origin": [0, 0, 16]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#6"}, + "east": {"uv": [8, 0, 0, 1], "rotation": 270, "texture": "#4"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#3"}, + "west": {"uv": [8, 0, 0, 1], "rotation": 90, "texture": "#4"}, + "up": {"uv": [8, 0, 0, 1], "rotation": 180, "texture": "#4"}, + "down": {"uv": [8, 0, 0, 1], "texture": "#4"} + } + }, + { + "from": [5, 5, 16], + "to": [11, 11, 18], + "rotation": {"angle": 0, "axis": "x", "origin": [0, 0, 16]}, + "faces": { + "north": {"uv": [4, 4, 0, 8], "rotation": 180, "texture": "#3"}, + "east": {"uv": [11, 6, 5, 4], "rotation": 270, "texture": "#3"}, + "south": {"uv": [11, 11, 5, 5], "texture": "#3"}, + "west": {"uv": [11, 6, 5, 4], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 6, 5, 4], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 6, 5, 4], "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine.json b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine.json new file mode 100644 index 0000000..b01dd43 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine.json @@ -0,0 +1,151 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 4, 16], + "faces": { + "north": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "east"}, + "south": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "west"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#2"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#2", "cullface": "down"} + } + }, + { + "from": [0, 3, 3], + "to": [4, 10, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [0, 3, 9], + "to": [4, 10, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 3], + "to": [15, 11, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 9], + "to": [15, 11, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [11, 4, 0], + "to": [13, 13, 16], + "faces": { + "north": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "south": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "up": {"uv": [0, 9.5, 8, 8.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [3, 4, 0], + "to": [5, 13, 16], + "faces": { + "north": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "south": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "up": {"uv": [0, 5.5, 8, 4.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 11, 0], + "to": [11, 13, 16], + "faces": { + "north": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "south"}, + "up": {"uv": [0, 8.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 4, 0], + "to": [11, 5, 16], + "faces": { + "north": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "south"}, + "up": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 5, 1], + "to": [11, 11, 15], + "faces": { + "north": {"uv": [7, 13, 10, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [7, 13, 10, 16], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, -90, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_on.json b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_on.json new file mode 100644 index 0000000..4fa6c3a --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_on.json @@ -0,0 +1,151 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine_on", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 4, 16], + "faces": { + "north": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "east"}, + "south": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "west"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#2"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#2", "cullface": "down"} + } + }, + { + "from": [0, 3, 3], + "to": [4, 10, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [0, 3, 9], + "to": [4, 10, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 3], + "to": [15, 11, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 9], + "to": [15, 11, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [11, 4, 0], + "to": [13, 13, 16], + "faces": { + "north": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "south": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "up": {"uv": [0, 9.5, 8, 8.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [3, 4, 0], + "to": [5, 13, 16], + "faces": { + "north": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "south": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "up": {"uv": [0, 5.5, 8, 4.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 11, 0], + "to": [11, 13, 16], + "faces": { + "north": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "south"}, + "up": {"uv": [0, 8.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 4, 0], + "to": [11, 5, 16], + "faces": { + "north": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "south"}, + "up": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 5, 1], + "to": [11, 11, 15], + "faces": { + "north": {"uv": [7, 13, 10, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [7, 13, 10, 16], "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, -90, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical.json b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical.json new file mode 100644 index 0000000..91cdea7 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical.json @@ -0,0 +1,188 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "1": "create:block/pipes", + "2": "createdieselgenerators:block/diesel_engine", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [7, 3, -0.5], + "to": [11, 7, 6.5], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 5, 3]}, + "faces": { + "north": {"uv": [2, 9.5, 4, 11.5], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 180, "texture": "#2"} + } + }, + { + "from": [7, 9, -0.5], + "to": [11, 13, 6.5], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 11, 3]}, + "faces": { + "north": {"uv": [10, 12, 12, 14], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 180, "texture": "#2"} + } + }, + { + "from": [5.5, 3, 11], + "to": [12.5, 7, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 5, 13]}, + "faces": { + "north": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "east": {"uv": [10, 12, 12, 14], "rotation": 180, "texture": "#2"}, + "south": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5.5, 9, 11], + "to": [12.5, 13, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 11, 13]}, + "faces": { + "north": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "east": {"uv": [2, 9.5, 4, 11.5], "rotation": 180, "texture": "#2"}, + "south": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [3, 0, 11], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [8, 1.5, 16, 6.5], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 8.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 4.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 4.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 12.5, 7, 11.5], "texture": "#2"}, + "down": {"uv": [2, 11.5, 7, 12.5], "texture": "#2"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 16, 5], + "faces": { + "north": {"uv": [0, 4.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 4.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [8, 1.5, 16, 6.5], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 8.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 11.5, 7, 12.5], "texture": "#2"}, + "down": {"uv": [2, 12.5, 7, 11.5], "texture": "#2"} + } + }, + { + "from": [3, 0, 5], + "to": [5, 16, 11], + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "east": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "west": {"uv": [0, 5.5, 8, 8.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 12.5, 3, 15.5], "texture": "#2"}, + "down": {"uv": [2, 12.5, 3, 15.5], "texture": "#2"} + } + }, + { + "from": [11, 0, 5], + "to": [13, 16, 11], + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "east": {"uv": [0, 5.5, 8, 8.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "west": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [6, 12.5, 7, 15.5], "texture": "#2"}, + "down": {"uv": [6, 12.5, 7, 15.5], "texture": "#2"} + } + }, + { + "from": [5, 1, 5], + "to": [11, 14, 11], + "faces": { + "north": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "east": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "south": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "west": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "up": {"uv": [7, 13, 10, 16], "texture": "#2"}, + "down": {"uv": [7, 13, 10, 16], "texture": "#2"} + } + }, + { + "from": [14, 3, 3], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 11, 3]}, + "faces": { + "north": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "east": {"uv": [11, 11, 16, 16], "texture": "#1"}, + "south": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "west": {"uv": [6, 11, 11, 16], "texture": "#1"}, + "up": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "down": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 11, 3]}, + "faces": { + "north": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "east": {"uv": [6, 11, 11, 16], "texture": "#1"}, + "south": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "west": {"uv": [11, 11, 16, 16], "texture": "#1"}, + "up": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "down": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"} + } + }, + { + "from": [2, 4, 4], + "to": [14, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 4]}, + "faces": { + "north": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "south": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "up": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "down": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, -90, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical_on.json b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical_on.json new file mode 100644 index 0000000..2dfd79c --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/diesel_engine_vertical_on.json @@ -0,0 +1,188 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "1": "create:block/pipes", + "2": "createdieselgenerators:block/diesel_engine_on", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [7, 3, -0.5], + "to": [11, 7, 6.5], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 5, 3]}, + "faces": { + "north": {"uv": [2, 9.5, 4, 11.5], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 180, "texture": "#2"} + } + }, + { + "from": [7, 9, -0.5], + "to": [11, 13, 6.5], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 11, 3]}, + "faces": { + "north": {"uv": [10, 12, 12, 14], "rotation": 180, "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 180, "texture": "#2"} + } + }, + { + "from": [5.5, 3, 11], + "to": [12.5, 7, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 5, 13]}, + "faces": { + "north": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "east": {"uv": [10, 12, 12, 14], "rotation": 180, "texture": "#2"}, + "south": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5.5, 9, 11], + "to": [12.5, 13, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [9, 11, 13]}, + "faces": { + "north": {"uv": [2, 9.5, 0, 13], "rotation": 270, "texture": "#2"}, + "east": {"uv": [2, 9.5, 4, 11.5], "rotation": 180, "texture": "#2"}, + "south": {"uv": [2, 9.5, 0, 13], "rotation": 90, "texture": "#2"}, + "up": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 9.5, 2, 13], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [3, 0, 11], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [8, 1.5, 16, 6.5], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 8.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 4.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 4.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 12.5, 7, 11.5], "texture": "#2"}, + "down": {"uv": [2, 11.5, 7, 12.5], "texture": "#2"} + } + }, + { + "from": [3, 0, 3], + "to": [13, 16, 5], + "faces": { + "north": {"uv": [0, 4.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "east": {"uv": [0, 4.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [8, 1.5, 16, 6.5], "rotation": 90, "texture": "#2"}, + "west": {"uv": [0, 8.5, 8, 9.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 11.5, 7, 12.5], "texture": "#2"}, + "down": {"uv": [2, 12.5, 7, 11.5], "texture": "#2"} + } + }, + { + "from": [3, 0, 5], + "to": [5, 16, 11], + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "east": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "west": {"uv": [0, 5.5, 8, 8.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [2, 12.5, 3, 15.5], "texture": "#2"}, + "down": {"uv": [2, 12.5, 3, 15.5], "texture": "#2"} + } + }, + { + "from": [11, 0, 5], + "to": [13, 16, 11], + "faces": { + "north": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "east": {"uv": [0, 5.5, 8, 8.5], "rotation": 90, "texture": "#2"}, + "south": {"uv": [0, 0, 1, 8], "texture": "#2"}, + "west": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"}, + "up": {"uv": [6, 12.5, 7, 15.5], "texture": "#2"}, + "down": {"uv": [6, 12.5, 7, 15.5], "texture": "#2"} + } + }, + { + "from": [5, 1, 5], + "to": [11, 14, 11], + "faces": { + "north": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "east": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "south": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "west": {"uv": [0, 0, 3, 7], "texture": "#2"}, + "up": {"uv": [7, 13, 10, 16], "texture": "#2"}, + "down": {"uv": [7, 13, 10, 16], "texture": "#2"} + } + }, + { + "from": [14, 3, 3], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 11, 3]}, + "faces": { + "north": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "east": {"uv": [11, 11, 16, 16], "texture": "#1"}, + "south": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "west": {"uv": [6, 11, 11, 16], "texture": "#1"}, + "up": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "down": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 11, 3]}, + "faces": { + "north": {"uv": [13, 2.5, 12, 7.5], "texture": "#1"}, + "east": {"uv": [6, 11, 11, 16], "texture": "#1"}, + "south": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "west": {"uv": [11, 11, 16, 16], "texture": "#1"}, + "up": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"}, + "down": {"uv": [12, 2.5, 13, 7.5], "texture": "#1"} + } + }, + { + "from": [2, 4, 4], + "to": [14, 12, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 4]}, + "faces": { + "north": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "south": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "up": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"}, + "down": {"uv": [10, 7, 14, 10], "rotation": 90, "texture": "#2"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, -90, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine.json b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine.json new file mode 100644 index 0000000..6f8cab4 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine.json @@ -0,0 +1,137 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine", + "3": "createdieselgenerators:block/diesel_engine_big", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [8, 0, 0], + "to": [18, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "west": {"uv": [6.5, 8, 14.5, 10], "texture": "#3"}, + "up": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2, 0, 0], + "to": [8, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "west": {"uv": [14, 8, 16, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 14, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [12, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "south": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "west": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 4, 0], + "to": [4, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "east": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "south": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [4, 4, 1], + "to": [12, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 4, 7, 8], "texture": "#3"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 7, 4], "texture": "#3"}, + "up": {"uv": [11, 7, 7, 0], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 7, 7, 14], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2.75, 7.5, 3], + "to": [1.25, 13.5, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [-2.75, 7.5, 9], + "to": [1.25, 13.5, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 3], + "to": [18.75, 13.5, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 9], + "to": [18.75, 13.5, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on.json b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on.json new file mode 100644 index 0000000..76d5444 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on.json @@ -0,0 +1,137 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine_on", + "3": "createdieselgenerators:block/diesel_engine_big", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [8, 0, 0], + "to": [18, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "west": {"uv": [6.5, 8, 14.5, 10], "texture": "#3"}, + "up": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2, 0, 0], + "to": [8, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "west": {"uv": [14, 8, 16, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 14, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [12, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "south": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "west": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 4, 0], + "to": [4, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "east": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "south": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [4, 4, 1], + "to": [12, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 4, 7, 8], "texture": "#3"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 7, 4], "texture": "#3"}, + "up": {"uv": [11, 7, 7, 0], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 7, 7, 14], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2.75, 7.5, 3], + "to": [1.25, 13.5, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [-2.75, 7.5, 9], + "to": [1.25, 13.5, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 3], + "to": [18.75, 13.5, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 9], + "to": [18.75, 13.5, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on_pipe.json b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on_pipe.json new file mode 100644 index 0000000..b26248f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_on_pipe.json @@ -0,0 +1,137 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine_on", + "3": "createdieselgenerators:block/diesel_engine_big_pipe", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [8, 0, 0], + "to": [18, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "west": {"uv": [6.5, 8, 14.5, 10], "texture": "#3"}, + "up": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2, 0, 0], + "to": [8, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "west": {"uv": [14, 8, 16, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 14, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [12, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "south": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "west": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 4, 0], + "to": [4, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "east": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "south": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [4, 4, 1], + "to": [12, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 4, 7, 8], "texture": "#3"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 7, 4], "texture": "#3"}, + "up": {"uv": [11, 7, 7, 0], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 7, 7, 14], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2.75, 7.5, 3], + "to": [1.25, 13.5, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [-2.75, 7.5, 9], + "to": [1.25, 13.5, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 3], + "to": [18.75, 13.5, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 9], + "to": [18.75, 13.5, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_pipe.json b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_pipe.json new file mode 100644 index 0000000..27e1a98 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/large_diesel_engine_pipe.json @@ -0,0 +1,137 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine", + "3": "createdieselgenerators:block/diesel_engine_big_pipe", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [8, 0, 0], + "to": [18, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "west": {"uv": [6.5, 8, 14.5, 10], "texture": "#3"}, + "up": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 11, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2, 0, 0], + "to": [8, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "east": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "west": {"uv": [14, 8, 16, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 8, 6, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 12, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [6, 8, 14, 16], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [12, 4, 0], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "south": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "west": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [0, 4, 0], + "to": [4, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "east": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "south": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [4, 4, 1], + "to": [12, 12, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 4, 7, 8], "texture": "#3"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 0, 7, 4], "texture": "#3"}, + "up": {"uv": [11, 7, 7, 0], "rotation": 180, "texture": "#3"}, + "down": {"uv": [11, 7, 7, 14], "rotation": 180, "texture": "#3"} + } + }, + { + "from": [-2.75, 7.5, 3], + "to": [1.25, 13.5, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [-2.75, 7.5, 9], + "to": [1.25, 13.5, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 3], + "to": [18.75, 13.5, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 9], + "to": [18.75, 13.5, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/block/plant_oil.json b/src/main/resources/assets/createdieselgenerators/models/block/plant_oil.json new file mode 100644 index 0000000..1fe221d --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/block/plant_oil.json @@ -0,0 +1,5 @@ +{ + "textures": { + "particle": "createdieselgenerators:fluid/plant_oil_still" + } +} diff --git a/src/main/resources/assets/createdieselgenerators/models/item/basin_lid.json b/src/main/resources/assets/createdieselgenerators/models/item/basin_lid.json new file mode 100644 index 0000000..87a3af4 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/basin_lid.json @@ -0,0 +1,3 @@ +{ + "parent": "createdieselgenerators:block/basin_lid" +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/item/biodiesel_bucket.json b/src/main/resources/assets/createdieselgenerators/models/item/biodiesel_bucket.json new file mode 100644 index 0000000..8d3558b --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/biodiesel_bucket.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "createdieselgenerators:item/biodiesel_bucket" + } +} diff --git a/src/main/resources/assets/createdieselgenerators/models/item/diesel_engine.json b/src/main/resources/assets/createdieselgenerators/models/item/diesel_engine.json new file mode 100644 index 0000000..a90cc6b --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/diesel_engine.json @@ -0,0 +1,166 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine", + "4": "create:block/axis", + "5": "create:block/axis_top", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 4, 16], + "faces": { + "north": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "east"}, + "south": {"uv": [8, 10, 16, 12], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 8, 16, 10], "texture": "#2", "cullface": "west"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#2"}, + "down": {"uv": [8, 0, 16, 8], "texture": "#2", "cullface": "down"} + } + }, + { + "from": [0, 3, 3], + "to": [4, 10, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [0, 3, 9], + "to": [4, 10, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [1.5, 8, 3]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 3], + "to": [15, 11, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 9], + "to": [15, 11, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7.5, 8]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "east": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 13], "texture": "#2"}, + "west": {"uv": [2, 9.5, 0, 13], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [11, 4, 0], + "to": [13, 13, 16], + "faces": { + "north": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "south": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "up": {"uv": [0, 9.5, 8, 8.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [3, 4, 0], + "to": [5, 13, 16], + "faces": { + "north": {"uv": [6, 11.5, 7, 16], "texture": "#2", "cullface": "north"}, + "east": {"uv": [8, 1.5, 16, 6], "texture": "#2"}, + "south": {"uv": [2, 11.5, 3, 16], "texture": "#2", "cullface": "south"}, + "west": {"uv": [0, 0, 8, 4.5], "texture": "#2"}, + "up": {"uv": [0, 5.5, 8, 4.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 11, 0], + "to": [11, 13, 16], + "faces": { + "north": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 11.5, 6, 12.5], "texture": "#2", "cullface": "south"}, + "up": {"uv": [0, 8.5, 8, 5.5], "rotation": 90, "texture": "#2"}, + "down": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 4, 0], + "to": [11, 5, 16], + "faces": { + "north": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [3, 15.5, 6, 16], "texture": "#2", "cullface": "south"}, + "up": {"uv": [8, 2.5, 16, 5.5], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [5, 5, 2], + "to": [11, 11, 15], + "faces": { + "north": {"uv": [7, 13, 10, 16], "texture": "#2", "cullface": "north"}, + "south": {"uv": [7, 13, 10, 16], "texture": "#2"} + } + }, + { + "from": [6, 6, 0], + "to": [10, 10, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 10, 10], "texture": "#5"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#4"}, + "south": {"uv": [6, 6, 10, 10], "texture": "#5"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#4"}, + "up": {"uv": [6, 0, 10, 16], "texture": "#4"}, + "down": {"uv": [6, 0, 10, 16], "texture": "#4"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [-180, 90, -180], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/item/engine_piston.json b/src/main/resources/assets/createdieselgenerators/models/item/engine_piston.json new file mode 100644 index 0000000..d8bfa24 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/engine_piston.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "createdieselgenerators:item/engine_piston" + } +} diff --git a/src/main/resources/assets/createdieselgenerators/models/item/ethanol_bucket.json b/src/main/resources/assets/createdieselgenerators/models/item/ethanol_bucket.json new file mode 100644 index 0000000..b589639 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/ethanol_bucket.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "createdieselgenerators:item/ethanol_bucket" + } +} diff --git a/src/main/resources/assets/createdieselgenerators/models/item/large_diesel_engine.json b/src/main/resources/assets/createdieselgenerators/models/item/large_diesel_engine.json new file mode 100644 index 0000000..656b87b --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/large_diesel_engine.json @@ -0,0 +1,180 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "2": "createdieselgenerators:block/diesel_engine", + "3": "createdieselgenerators:block/diesel_engine_big", + "4": "create:block/axis_top", + "particle": "createdieselgenerators:block/diesel_engine" + }, + "elements": [ + { + "from": [-2, 0, 0], + "to": [8, 4, 16], + "faces": { + "north": {"uv": [5, 14, 0, 16], "texture": "#3"}, + "east": {"uv": [6.5, 8, 14.5, 10], "texture": "#3"}, + "south": {"uv": [0, 12, 5, 14], "texture": "#3"}, + "west": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [6, 8, 11, 16], "texture": "#3"}, + "down": {"uv": [6, 8, 11, 16], "texture": "#3"} + } + }, + { + "from": [8, 0, 0], + "to": [18, 4, 16], + "faces": { + "north": {"uv": [0, 14, 5, 16], "texture": "#3"}, + "east": {"uv": [14, 8, 16, 16], "rotation": 90, "texture": "#3"}, + "south": {"uv": [5, 12, 0, 14], "texture": "#3"}, + "west": {"uv": [16, 8, 14, 16], "rotation": 90, "texture": "#3"}, + "up": {"uv": [11, 8, 6, 16], "texture": "#3"}, + "down": {"uv": [11, 8, 6, 16], "texture": "#3"} + } + }, + { + "from": [0, 12, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "east": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "south": {"uv": [0, 6, 8, 8], "texture": "#3"}, + "west": {"uv": [0, 0, 8, 2], "texture": "#3"}, + "up": {"uv": [8, 0, 16, 8], "texture": "#3"}, + "down": {"uv": [6, 8, 14, 16], "texture": "#3"} + } + }, + { + "from": [0, 4, 0], + "to": [4, 12, 16], + "faces": { + "north": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "east": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "south": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "texture": "#3"} + } + }, + { + "from": [12, 4, 0], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [6, 8, 4, 12], "texture": "#3"}, + "east": {"uv": [0, 2, 8, 6], "texture": "#3"}, + "south": {"uv": [4, 8, 6, 12], "texture": "#3"}, + "west": {"uv": [7, 10, 15, 14], "texture": "#3"}, + "up": {"uv": [0, 0, 2, 8], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 8], "texture": "#3"} + } + }, + { + "from": [4, 4, 0], + "to": [12, 12, 15], + "faces": { + "north": {"uv": [2, 1, 6, 5], "texture": "#3"}, + "east": {"uv": [0, 0, 7, 4], "texture": "#3"}, + "south": {"uv": [0, 8, 4, 12], "texture": "#3"}, + "west": {"uv": [0, 4, 7, 8], "texture": "#3"}, + "up": {"uv": [11, 7, 7, 0], "texture": "#3"}, + "down": {"uv": [11, 7, 7, 14], "texture": "#3"} + } + }, + { + "from": [-2.75, 7.5, 3], + "to": [1.25, 13.5, 7], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [-2.75, 7.5, 9], + "to": [1.25, 13.5, 13], + "rotation": {"angle": 45, "axis": "z", "origin": [-0.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 3], + "to": [18.75, 13.5, 7], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 5]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [10, 12, 12, 14], "texture": "#2"} + } + }, + { + "from": [14.75, 7.5, 9], + "to": [18.75, 13.5, 13], + "rotation": {"angle": -45, "axis": "z", "origin": [16.75, 10.5, 11]}, + "faces": { + "north": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "east": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "south": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "west": {"uv": [0, 9.5, 2, 12.5], "texture": "#2"}, + "up": {"uv": [2, 9.5, 4, 11.5], "texture": "#2"} + } + }, + { + "from": [6, 6, 14], + "to": [10, 10, 16], + "rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 15]}, + "faces": { + "north": {"uv": [6, 6, 10, 10], "texture": "#4"}, + "east": {"uv": [6, 6, 8, 10], "texture": "#4"}, + "south": {"uv": [6, 6, 10, 10], "texture": "#4"}, + "west": {"uv": [6, 6, 8, 10], "texture": "#4"}, + "up": {"uv": [6, 6, 10, 8], "texture": "#4"}, + "down": {"uv": [6, 6, 10, 8], "texture": "#4"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "scale": [0.5, 0.5, 0.5] + }, + "head": { + "rotation": [0, 180, 0] + }, + "fixed": { + "rotation": [0, 90, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/createdieselgenerators/models/item/plant_oil_bucket.json b/src/main/resources/assets/createdieselgenerators/models/item/plant_oil_bucket.json new file mode 100644 index 0000000..b88fba3 --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/models/item/plant_oil_bucket.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "createdieselgenerators:item/plant_oil_bucket" + } +} diff --git a/src/main/resources/assets/createdieselgenerators/ponder/basin_fermenting_station.nbt b/src/main/resources/assets/createdieselgenerators/ponder/basin_fermenting_station.nbt new file mode 100644 index 0000000..4e37364 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/ponder/basin_fermenting_station.nbt differ diff --git a/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine.nbt b/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine.nbt new file mode 100644 index 0000000..42bc887 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine.nbt differ diff --git a/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine_black.nbt b/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine_black.nbt new file mode 100644 index 0000000..8e41bdc Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/ponder/diesel_engine_black.nbt differ diff --git a/src/main/resources/assets/createdieselgenerators/ponder/large_diesel_engine.nbt b/src/main/resources/assets/createdieselgenerators/ponder/large_diesel_engine.nbt new file mode 100644 index 0000000..a5abcd9 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/ponder/large_diesel_engine.nbt differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid.png b/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid.png new file mode 100644 index 0000000..764bd4a Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid_top.png b/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid_top.png new file mode 100644 index 0000000..5a24db1 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/basin_lid_top.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine.png b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine.png new file mode 100644 index 0000000..abf48ec Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big.png b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big.png new file mode 100644 index 0000000..3a38d45 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big_pipe.png b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big_pipe.png new file mode 100644 index 0000000..600c8ea Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_big_pipe.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png new file mode 100644 index 0000000..fcc4bae Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/block/diesel_engine_on.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/block/gauge.png b/src/main/resources/assets/createdieselgenerators/textures/block/gauge.png new file mode 100644 index 0000000..3a4bc7e Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/block/gauge.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png new file mode 100644 index 0000000..81f80f4 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png new file mode 100644 index 0000000..0766911 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/biodiesel_still.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png new file mode 100644 index 0000000..adb3569 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png new file mode 100644 index 0000000..901545c Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/ethanol_still.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png new file mode 100644 index 0000000..78a9b59 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_flow.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png new file mode 100644 index 0000000..f5cb3d0 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png.mcmeta b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png.mcmeta new file mode 100644 index 0000000..24f9c2f --- /dev/null +++ b/src/main/resources/assets/createdieselgenerators/textures/fluid/plant_oil_still.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 1 + } +} diff --git a/src/main/resources/assets/createdieselgenerators/textures/item/biodiesel_bucket.png b/src/main/resources/assets/createdieselgenerators/textures/item/biodiesel_bucket.png new file mode 100644 index 0000000..f81c5f2 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/item/biodiesel_bucket.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/item/engine_piston.png b/src/main/resources/assets/createdieselgenerators/textures/item/engine_piston.png new file mode 100644 index 0000000..2cba5ef Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/item/engine_piston.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/item/ethanol_bucket.png b/src/main/resources/assets/createdieselgenerators/textures/item/ethanol_bucket.png new file mode 100644 index 0000000..9c7db7d Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/item/ethanol_bucket.png differ diff --git a/src/main/resources/assets/createdieselgenerators/textures/item/plant_oil_bucket.png b/src/main/resources/assets/createdieselgenerators/textures/item/plant_oil_bucket.png new file mode 100644 index 0000000..7ae3ec6 Binary files /dev/null and b/src/main/resources/assets/createdieselgenerators/textures/item/plant_oil_bucket.png differ diff --git a/src/main/resources/createde_icon.png b/src/main/resources/createde_icon.png new file mode 100644 index 0000000..781916a Binary files /dev/null and b/src/main/resources/createde_icon.png differ diff --git a/src/main/resources/data/createdieselgenerators/loot_tables/blocks/basin_lid.json b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/basin_lid.json new file mode 100644 index 0000000..4b8c2e8 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/basin_lid.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "createdieselgenerators:basin_lid" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/loot_tables/blocks/diesel_engine.json b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/diesel_engine.json new file mode 100644 index 0000000..fb6e8c3 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/diesel_engine.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "createdieselgenerators:diesel_engine" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/loot_tables/blocks/large_diesel_engine.json b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/large_diesel_engine.json new file mode 100644 index 0000000..a9ac46a --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/loot_tables/blocks/large_diesel_engine.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "createdieselgenerators:large_diesel_engine" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/apple.json b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/apple.json new file mode 100644 index 0000000..1d491d8 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/apple.json @@ -0,0 +1,15 @@ +{ + "type": "createdieselgenerators:basin_fermenting", + "ingredients": [ + { + "item": "minecraft:apple" + } + ], + "processingTime": 180, + "results": [ + { + "fluid": "createdieselgenerators:ethanol", + "amount": 50 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/potato.json b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/potato.json new file mode 100644 index 0000000..8cbeddf --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/potato.json @@ -0,0 +1,15 @@ +{ + "type": "createdieselgenerators:basin_fermenting", + "ingredients": [ + { + "item": "minecraft:potato" + } + ], + "processingTime": 180, + "results": [ + { + "fluid": "createdieselgenerators:ethanol", + "amount": 25 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/sugar.json b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/sugar.json new file mode 100644 index 0000000..f491435 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/basin_fermenting/sugar.json @@ -0,0 +1,15 @@ +{ + "type": "createdieselgenerators:basin_fermenting", + "ingredients": [ + { + "item": "minecraft:sugar" + } + ], + "processingTime": 180, + "results": [ + { + "fluid": "createdieselgenerators:ethanol", + "amount": 25 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/compacting/plant_oil.json b/src/main/resources/data/createdieselgenerators/recipes/compacting/plant_oil.json new file mode 100644 index 0000000..8be0240 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/compacting/plant_oil.json @@ -0,0 +1,14 @@ +{ + "type": "create:compacting", + "ingredients": [ + { + "tag": "forge:seeds" + } + ], + "results": [ + { + "fluid": "createdieselgenerators:plant_oil", + "amount": 100 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/crafting/basin_lid.json b/src/main/resources/data/createdieselgenerators/recipes/crafting/basin_lid.json new file mode 100644 index 0000000..812b239 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/crafting/basin_lid.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " C ", + "AAA" + ], + "key": { + "A": { + "item": "create:andesite_alloy" + }, + "C": { + "item": "minecraft:clock" + } + }, + "result": { + "item": "createdieselgenerators:basin_lid" + } +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/crafting/diesel_engine.json b/src/main/resources/data/createdieselgenerators/recipes/crafting/diesel_engine.json new file mode 100644 index 0000000..68a4960 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/crafting/diesel_engine.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "#Q#", + "#G#", + "OSO" + ], + "key": { + "#": { + "item": "createdieselgenerators:engine_piston" + }, + "Q": { + "item": "minecraft:flint_and_steel" + }, + "G": { + "item": "create:brass_block" + }, + "O": { + "item": "create:sturdy_sheet" + }, + "S": { + "item": "create:fluid_pipe" + } + }, + "result": { + "item": "createdieselgenerators:diesel_engine" + } +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/crafting/engine_piston.json b/src/main/resources/data/createdieselgenerators/recipes/crafting/engine_piston.json new file mode 100644 index 0000000..78ccf1c --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/crafting/engine_piston.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "Q# ", + "#G ", + " S" + ], + "key": { + "#": { + "tag": "forge:plates/iron" + }, + "Q": { + "item": "create:andesite_alloy" + }, + "G": { + "item": "create:shaft" + }, + "S": { + "tag": "forge:nuggets/zinc" + } + }, + "result": { + "item": "createdieselgenerators:engine_piston", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/crafting/large_diesel_engine.json b/src/main/resources/data/createdieselgenerators/recipes/crafting/large_diesel_engine.json new file mode 100644 index 0000000..c252fdb --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/crafting/large_diesel_engine.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "#Q#", + "SGS", + "OBO" + ], + "key": { + "#": { + "item": "create:andesite_alloy" + }, + "Q": { + "item": "minecraft:flint_and_steel" + }, + "G": { + "item": "createdieselgenerators:diesel_engine" + }, + "O": { + "item": "create:sturdy_sheet" + }, + "S": { + "tag": "forge:plates/brass" + }, + "B": { + "item": "create:precision_mechanism" + } + }, + "result": { + "item": "createdieselgenerators:large_diesel_engine" + } +} \ No newline at end of file diff --git a/src/main/resources/data/createdieselgenerators/recipes/mixing/biodiesel.json b/src/main/resources/data/createdieselgenerators/recipes/mixing/biodiesel.json new file mode 100644 index 0000000..a9c33c4 --- /dev/null +++ b/src/main/resources/data/createdieselgenerators/recipes/mixing/biodiesel.json @@ -0,0 +1,19 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "fluid": "createdieselgenerators:plant_oil", + "amount": 100 + }, + { + "fluid": "createdieselgenerators:ethanol", + "amount": 100 + } + ], + "results": [ + { + "fluid": "createdieselgenerators:biodiesel", + "amount": 200 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/fluids/ethanol.json b/src/main/resources/data/forge/tags/fluids/ethanol.json new file mode 100644 index 0000000..a856233 --- /dev/null +++ b/src/main/resources/data/forge/tags/fluids/ethanol.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "createdieselgenerators:ethanol" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/fluids/fuel.json b/src/main/resources/data/forge/tags/fluids/fuel.json new file mode 100644 index 0000000..e6895e9 --- /dev/null +++ b/src/main/resources/data/forge/tags/fluids/fuel.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "createdieselgenerators:biodiesel" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/tags/fluids/plantoil.json b/src/main/resources/data/forge/tags/fluids/plantoil.json new file mode 100644 index 0000000..c35e5dc --- /dev/null +++ b/src/main/resources/data/forge/tags/fluids/plantoil.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "createdieselgenerators:plant_oil" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json new file mode 100644 index 0000000..95f3a6a --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "createdieselgenerators:diesel_engine" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..6f2f48b --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,8 @@ +{ + "pack": { + "description": "examplemod resources", + "pack_format": 9, + "forge:resource_pack_format": 8, + "forge:data_pack_format": 9 + } +}