diff --git a/assets/bulb.afdesign b/assets/bulb.afdesign new file mode 100644 index 0000000..8449655 Binary files /dev/null and b/assets/bulb.afdesign differ diff --git a/textures/ethereal_glass.afdesign b/assets/ethereal_glass.afdesign similarity index 100% rename from textures/ethereal_glass.afdesign rename to assets/ethereal_glass.afdesign diff --git a/assets/fiber_glass.afdesign b/assets/fiber_glass.afdesign new file mode 100644 index 0000000..9421a20 Binary files /dev/null and b/assets/fiber_glass.afdesign differ diff --git a/assets/insolator.aup3 b/assets/insolator.aup3 new file mode 100644 index 0000000..02dfa3a Binary files /dev/null and b/assets/insolator.aup3 differ diff --git a/assets/insolator.bbmodel b/assets/insolator.bbmodel new file mode 100644 index 0000000..5f5e8f8 --- /dev/null +++ b/assets/insolator.bbmodel @@ -0,0 +1 @@ +{"meta":{"format_version":"4.5","model_format":"java_block","box_uv":false},"name":"insolator","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":128,"height":128},"elements":[{"name":"Base","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,0,0],"to":[16,3,16],"autouv":0,"color":3,"origin":[0,0,0],"faces":{"north":{"uv":[48,22,64,25],"texture":1},"east":{"uv":[48,25,64,28],"texture":1},"south":{"uv":[48,28,64,31],"texture":1},"west":{"uv":[48,31,64,34],"texture":1},"up":{"uv":[16,16,0,0],"texture":1},"down":{"uv":[16,16,0,32],"texture":1}},"type":"cube","uuid":"ec7b51fd-2b8c-c663-8799-7c4fa81cab03"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[14,3,0],"to":[16,5,2],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[0,63,2,65],"texture":1},"east":{"uv":[2,63,4,65],"texture":1},"south":{"uv":[4,63,6,65],"texture":1},"west":{"uv":[6,63,8,65],"texture":1},"up":{"uv":[10,65,8,63],"texture":1},"down":{"uv":[12,63,10,65],"texture":1}},"type":"cube","uuid":"3e6cabb1-2493-fa1e-48d9-d49f278f788d"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,3,0],"to":[2,5,2],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[12,63,14,65],"texture":1},"east":{"uv":[14,63,16,65],"texture":1},"south":{"uv":[16,63,18,65],"texture":1},"west":{"uv":[18,63,20,65],"texture":1},"up":{"uv":[22,65,20,63],"texture":1},"down":{"uv":[66,0,64,2],"texture":1}},"type":"cube","uuid":"39877e08-622f-d331-745b-40b57200d9bc"},{"name":"Slab","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,3,5],"to":[16,5,16],"autouv":0,"color":6,"origin":[0,0,0],"faces":{"north":{"uv":[48,46,64,48],"texture":1},"east":{"uv":[0,61,11,63],"texture":1},"south":{"uv":[48,48,64,50],"texture":1},"west":{"uv":[11,61,22,63],"texture":1},"up":{"uv":[48,43,32,32],"texture":1},"down":{"uv":[48,43,32,54],"texture":1}},"type":"cube","uuid":"92e76067-a130-32dc-cc3c-fe0ead3acd07"},{"name":"Top","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,5,0],"to":[16,7,16],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[48,50,64,52],"texture":1},"east":{"uv":[48,52,64,54],"texture":1},"south":{"uv":[32,54,48,56],"texture":1},"west":{"uv":[48,54,64,56],"texture":1},"up":{"uv":[32,16,16,0],"texture":1},"down":{"uv":[32,16,16,32],"texture":1}},"type":"cube","uuid":"edea3534-02d0-cc72-8166-110c4016de56"},{"name":"Top","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,9,0],"to":[16,11,16],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[32,56,48,58],"texture":1},"east":{"uv":[48,56,64,58],"texture":1},"south":{"uv":[32,58,48,60],"texture":1},"west":{"uv":[48,58,64,60],"texture":1},"up":{"uv":[16,48,0,32],"texture":1},"down":{"uv":[48,0,32,16],"texture":1}},"type":"cube","uuid":"1611d947-de60-1d03-3732-8c0d6d37b201"},{"name":"Slab","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,7,5],"to":[16,9,16],"autouv":0,"color":6,"origin":[0,0,0],"faces":{"north":{"uv":[0,59,16,61],"texture":1},"east":{"uv":[22,62,33,64],"texture":1},"south":{"uv":[16,59,32,61],"texture":1},"west":{"uv":[33,62,44,64],"texture":1},"up":{"uv":[16,59,0,48],"texture":1},"down":{"uv":[64,0,48,11],"texture":1}},"type":"cube","uuid":"f06dce17-200f-aeab-75ef-05be045239c8"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,7,0],"to":[2,9,2],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[64,2,66,4],"texture":1},"east":{"uv":[64,4,66,6],"texture":1},"south":{"uv":[64,6,66,8],"texture":1},"west":{"uv":[64,8,66,10],"texture":1},"up":{"uv":[66,12,64,10],"texture":1},"down":{"uv":[66,12,64,14],"texture":1}},"type":"cube","uuid":"14037ab3-a9ec-ba32-c28d-33953db96160"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[14,7,0],"to":[16,9,2],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[64,14,66,16],"texture":1},"east":{"uv":[64,16,66,18],"texture":1},"south":{"uv":[64,18,66,20],"texture":1},"west":{"uv":[64,20,66,22],"texture":1},"up":{"uv":[24,66,22,64],"texture":1},"down":{"uv":[66,22,64,24],"texture":1}},"type":"cube","uuid":"4168c1a0-1e6c-4124-270c-486d569394dc"},{"name":"Top","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,13,0],"to":[16,16,16],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[48,34,64,37],"texture":1},"east":{"uv":[48,37,64,40],"texture":1},"south":{"uv":[48,40,64,43],"texture":1},"west":{"uv":[48,43,64,46],"texture":1},"up":{"uv":[32,48,16,32],"texture":1},"down":{"uv":[48,16,32,32],"texture":1}},"type":"cube","uuid":"e8abf09c-166c-80ac-24b5-9d04b5741c51"},{"name":"Slab","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,11,5],"to":[16,13,16],"autouv":0,"color":6,"origin":[0,0,0],"faces":{"north":{"uv":[32,60,48,62],"texture":1},"east":{"uv":[44,62,55,64],"texture":1},"south":{"uv":[48,60,64,62],"texture":1},"west":{"uv":[55,62,66,64],"texture":1},"up":{"uv":[64,22,48,11],"texture":1},"down":{"uv":[32,48,16,59],"texture":1}},"type":"cube","uuid":"39ad2956-62ce-126e-6cb5-db1be7ce428e"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,11,0],"to":[2,13,2],"autouv":0,"color":9,"origin":[0,0,0],"faces":{"north":{"uv":[24,64,26,66],"texture":1},"east":{"uv":[64,24,66,26],"texture":1},"south":{"uv":[26,64,28,66],"texture":1},"west":{"uv":[64,26,66,28],"texture":1},"up":{"uv":[30,66,28,64],"texture":1},"down":{"uv":[66,28,64,30],"texture":1}},"type":"cube","uuid":"94b33a17-6575-4de9-773e-ca7bc82454ba"},{"name":"Leg","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[14,11,0],"to":[16,13,2],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[30,64,32,66],"texture":1},"east":{"uv":[64,30,66,32],"texture":1},"south":{"uv":[32,64,34,66],"texture":1},"west":{"uv":[64,32,66,34],"texture":1},"up":{"uv":[36,66,34,64],"texture":1},"down":{"uv":[66,34,64,36],"texture":1}},"type":"cube","uuid":"9bba7129-903e-904f-c9e3-1e64e8ec469e"}],"outliner":["e8abf09c-166c-80ac-24b5-9d04b5741c51","ec7b51fd-2b8c-c663-8799-7c4fa81cab03",{"name":"Layer 1","origin":[0,0,0],"color":0,"uuid":"74b78a1f-32ef-3b5f-4abe-c8d615957e39","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["edea3534-02d0-cc72-8166-110c4016de56","92e76067-a130-32dc-cc3c-fe0ead3acd07","39877e08-622f-d331-745b-40b57200d9bc","3e6cabb1-2493-fa1e-48d9-d49f278f788d"]},{"name":"Layer 2","origin":[0,0,0],"color":0,"uuid":"fa1ff6e3-31d7-f4f6-3b98-deeb8fb25ea0","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["1611d947-de60-1d03-3732-8c0d6d37b201","f06dce17-200f-aeab-75ef-05be045239c8","14037ab3-a9ec-ba32-c28d-33953db96160","4168c1a0-1e6c-4124-270c-486d569394dc"]},{"name":"Layer 3","origin":[0,0,0],"color":0,"uuid":"1ece0f1d-3a23-ff3a-db6a-ae2147320ed7","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["39ad2956-62ce-126e-6cb5-db1be7ce428e","94b33a17-6575-4de9-773e-ca7bc82454ba","9bba7129-903e-904f-c9e3-1e64e8ec469e"]}],"textures":[{"path":"/Users/blakerain/dev/bans-minecraft/utamacraft/assets/textures/insolator.png","name":"insolator.png","folder":"","namespace":"assets","id":"5","particle":false,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"dd56ed8d-5422-da91-161f-0be06269ac02","relative_path":"../textures/insolator.png","source":"data:image/png;base64,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"},{"path":"/Users/blakerain/dev/bans-minecraft/utamacraft/assets/textures/insolator_active.png","name":"insolator_active.png","folder":"","namespace":"assets","id":"1","particle":true,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"5aa85ef4-77db-57b2-f39d-a2cb08b97f7d","relative_path":"../textures/insolator_active.png","source":"data:image/png;base64,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"}],"display":{"thirdperson_righthand":{"scale":[0.25,0.25,0.25]},"thirdperson_lefthand":{"scale":[0.25,0.25,0.25]},"firstperson_righthand":{"rotation":[0,105,0],"scale":[0.75,0.75,0.75]},"firstperson_lefthand":{"rotation":[0,105,0],"scale":[0.75,0.75,0.75]},"ground":{"scale":[0.5,0.5,0.5]},"gui":{"rotation":[21,137,0],"scale":[0.66,0.66,0.66]},"fixed":{"scale":[1,1,0.5]}}} \ No newline at end of file diff --git a/assets/insolator_gui.afdesign b/assets/insolator_gui.afdesign new file mode 100644 index 0000000..ffd0969 Binary files /dev/null and b/assets/insolator_gui.afdesign differ diff --git a/textures/logo.blend b/assets/logo.blend similarity index 100% rename from textures/logo.blend rename to assets/logo.blend diff --git a/assets/pcb.afdesign b/assets/pcb.afdesign new file mode 100644 index 0000000..a5b77cc Binary files /dev/null and b/assets/pcb.afdesign differ diff --git a/textures/player_peripheral.afdesign b/assets/player_peripheral.afdesign similarity index 100% rename from textures/player_peripheral.afdesign rename to assets/player_peripheral.afdesign diff --git a/assets/raw_tungsten.afdesign b/assets/raw_tungsten.afdesign new file mode 100644 index 0000000..ef286e8 Binary files /dev/null and b/assets/raw_tungsten.afdesign differ diff --git a/textures/textures/dirt.png b/assets/textures/dirt.png similarity index 100% rename from textures/textures/dirt.png rename to assets/textures/dirt.png diff --git a/textures/textures/grass_block_side.png b/assets/textures/grass_block_side.png similarity index 100% rename from textures/textures/grass_block_side.png rename to assets/textures/grass_block_side.png diff --git a/textures/textures/grass_block_top.png b/assets/textures/grass_block_top.png similarity index 100% rename from textures/textures/grass_block_top.png rename to assets/textures/grass_block_top.png diff --git a/assets/textures/insolator.png b/assets/textures/insolator.png new file mode 100644 index 0000000..9cb116d Binary files /dev/null and b/assets/textures/insolator.png differ diff --git a/assets/textures/insolator_active.png b/assets/textures/insolator_active.png new file mode 100644 index 0000000..285cb94 Binary files /dev/null and b/assets/textures/insolator_active.png differ diff --git a/textures/tinted_ethereal_glass.afdesign b/assets/tinted_ethereal_glass.afdesign similarity index 100% rename from textures/tinted_ethereal_glass.afdesign rename to assets/tinted_ethereal_glass.afdesign diff --git a/assets/tungsten_block.afdesign b/assets/tungsten_block.afdesign new file mode 100644 index 0000000..0496d48 Binary files /dev/null and b/assets/tungsten_block.afdesign differ diff --git a/assets/tungsten_ingot.afdesign b/assets/tungsten_ingot.afdesign new file mode 100644 index 0000000..881c7d4 Binary files /dev/null and b/assets/tungsten_ingot.afdesign differ diff --git a/build.gradle b/build.gradle index f6687dd..cb4bc37 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ plugins { id 'eclipse' id 'maven-publish' id 'net.minecraftforge.gradle' version '6.0.+' + id 'org.parchmentmc.librarian.forgegradle' version '1.+' } wrapper { @@ -121,9 +122,6 @@ minecraft { 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' @@ -135,6 +133,16 @@ repositories { includeGroup("org.squiddev") } } + + maven { + // location of the maven that hosts JEI files since January 2023 + name = "Jared's maven" + url = "https://maven.blamejared.com/" + } + + maven { + url 'https://modmaven.dev/' + } } dependencies { @@ -143,25 +151,17 @@ dependencies { // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - // 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 + // compile against the JEI API but do not include it at runtime + compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")) + compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")) + // at runtime, use the full JEI jar for Forge + runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")) - // Examples using mod jars from ./libs - // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") + // CC:Tweaked API + implementation(fg.deobf("org.squiddev:cc-tweaked-${minecraft_version}:${cct_version}")) - // For more info... - // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html - // http://www.gradle.org/docs/current/userguide/dependency_management.html - - // Vanilla (i.e. for multi-loader systems) -// compileOnly("cc.tweaked:cc-tweaked-${minecraft_version}-common-api:${cct_version}") - - // Forge Gradle -// compileOnly("cc.tweaked:cc-tweaked-${minecraft_version}-core-api:${cct_version}") -// compileOnly(fg.deobf("cc.tweaked:cc-tweaked-${minecraft_version}-forge-api:${cct_version}")) - implementation fg.deobf("org.squiddev:cc-tweaked-${minecraft_version}:${cct_version}") + // Mekanism: useful for testing energy and so on. + runtimeOnly(fg.deobf("mekanism:Mekanism:${minecraft_version}-${mekanism_version}")) } // This task will expand all declared properties from Gradle (gradle.properties) in the specified resource targets. diff --git a/gradle.properties b/gradle.properties index 3f38298..3398636 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,15 +30,19 @@ loader_version_range=[41,) # # Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge. # Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started -mapping_channel=official +mapping_channel=parchment # The mapping version to query from the mapping channel. # This must match the format required by the mapping channel. -mapping_version=1.19.2 +mapping_version=2022.11.27-1.19.2 ## Dependency Properties # The version of CC:Tweaked we're building against cct_version=1.101.3 +# The version of JEI that we're building against +jei_version=11.6.0.1015 +# The version of Mekanism we use when testing +mekanism_version=10.3.8.477 ## Mod Properties @@ -50,7 +54,7 @@ mod_name=Utamacraft Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT License # The mod version. See https://semver.org/ -mod_version=0.1.1-1.19 +mod_version=0.2.0-1.19 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/settings.gradle b/settings.gradle index 3703f36..8867a6d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,5 +2,6 @@ pluginManagement { repositories { gradlePluginPortal() maven { url = 'https://maven.minecraftforge.net/' } + maven { url = 'https://maven.parchmentmc.org' } } } \ No newline at end of file diff --git a/src/main/java/net/banutama/utamacraft/Utamacraft.java b/src/main/java/net/banutama/utamacraft/Utamacraft.java index 3d366fb..505002f 100644 --- a/src/main/java/net/banutama/utamacraft/Utamacraft.java +++ b/src/main/java/net/banutama/utamacraft/Utamacraft.java @@ -2,9 +2,17 @@ package net.banutama.utamacraft; import com.mojang.logging.LogUtils; +import net.banutama.utamacraft.block.custom.InsolatorBlock; +import net.banutama.utamacraft.block.custom.ModBlocks; +import net.banutama.utamacraft.block.entity.ModBlockEntities; import net.banutama.utamacraft.item.ModItems; -import net.banutama.utamacraft.block.ModBlocks; +import net.banutama.utamacraft.networking.ModMessages; +import net.banutama.utamacraft.recipe.ModRecipes; +import net.banutama.utamacraft.screen.InsolatorScreen; +import net.banutama.utamacraft.screen.ModMenuTypes; +import net.banutama.utamacraft.sound.ModSounds; +import net.minecraft.client.gui.screens.MenuScreens; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -28,19 +36,27 @@ public class Utamacraft { ModItems.register(bus); ModBlocks.register(bus); + ModBlockEntities.register(bus); CCRegistration.register(bus); + ModMenuTypes.register(bus); + ModSounds.register(bus); + ModRecipes.register(bus); bus.addListener(this::commonSetup); MinecraftForge.EVENT_BUS.register(this); } private void commonSetup(final FMLCommonSetupEvent event) { + event.enqueueWork(() -> { + ModMessages.register(); + }); } @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ModEvents { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { + MenuScreens.register(ModMenuTypes.INSOLATOR_MENU.get(), InsolatorScreen::new); } } } diff --git a/src/main/java/net/banutama/utamacraft/block/EtherealGlass.java b/src/main/java/net/banutama/utamacraft/block/custom/EtherealGlassBlock.java similarity index 84% rename from src/main/java/net/banutama/utamacraft/block/EtherealGlass.java rename to src/main/java/net/banutama/utamacraft/block/custom/EtherealGlassBlock.java index 02835f7..f9c25d1 100644 --- a/src/main/java/net/banutama/utamacraft/block/EtherealGlass.java +++ b/src/main/java/net/banutama/utamacraft/block/custom/EtherealGlassBlock.java @@ -1,4 +1,4 @@ -package net.banutama.utamacraft.block; +package net.banutama.utamacraft.block.custom; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; @@ -23,17 +23,17 @@ import org.jetbrains.annotations.Nullable; import java.util.List; -public class EtherealGlass extends GlassBlock { - public EtherealGlass() { +public class EtherealGlassBlock extends GlassBlock { + public EtherealGlassBlock() { super(getProperties()); } private static Block.Properties getProperties() { return Block.Properties.copy(Blocks.GLASS) - .isValidSpawn(EtherealGlass::blockSpawning) - .isRedstoneConductor(EtherealGlass::notSolid) - .isSuffocating(EtherealGlass::notSolid) - .isViewBlocking(EtherealGlass::notSolid); + .isValidSpawn(EtherealGlassBlock::blockSpawning) + .isRedstoneConductor(EtherealGlassBlock::notSolid) + .isSuffocating(EtherealGlassBlock::notSolid) + .isViewBlocking(EtherealGlassBlock::notSolid); } @Override diff --git a/src/main/java/net/banutama/utamacraft/block/custom/InsolatorBlock.java b/src/main/java/net/banutama/utamacraft/block/custom/InsolatorBlock.java new file mode 100644 index 0000000..db49a4e --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/block/custom/InsolatorBlock.java @@ -0,0 +1,138 @@ +package net.banutama.utamacraft.block.custom; + +import net.banutama.utamacraft.block.entity.InsolatorBlockEntity; +import net.banutama.utamacraft.block.entity.ModBlockEntities; +import net.banutama.utamacraft.sound.ModSounds; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.RandomSource; +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.block.*; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +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.Material; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraftforge.network.NetworkHooks; +import org.jetbrains.annotations.Nullable; + +public class InsolatorBlock extends BaseEntityBlock { + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + private static VoxelShape SHAPE = + Block.box(0, 0, 0, 16, 16, 16); + + public InsolatorBlock() { + super(getProperties()); + registerDefaultState(this.getStateDefinition().any().setValue(FACING, Direction.NORTH).setValue(ACTIVE, false)); + } + + private static Block.Properties getProperties() { + return Block.Properties.of(Material.METAL) + .strength(6.0f) + .requiresCorrectToolForDrops() + .noOcclusion() + .lightLevel(state -> state.getValue(ACTIVE) ? 15 : 0); + } + + @Override + public VoxelShape getShape(BlockState state, BlockGetter getter, BlockPos pos, CollisionContext context) { + return SHAPE; + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); + } + + @Override + public BlockState rotate(BlockState state, Rotation rotation) { + return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState state, Mirror mirror) { + return state.rotate(mirror.getRotation(state.getValue(FACING))); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(FACING, ACTIVE); + } + + @Override + public RenderShape getRenderShape(BlockState pState) { + return RenderShape.MODEL; + } + + @Override + public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) { + if (!pState.is(pNewState.getBlock())) { + BlockEntity blockEntity = pLevel.getBlockEntity(pPos); + if (blockEntity instanceof InsolatorBlockEntity insolator) { + if (pLevel instanceof ServerLevel) { + insolator.drops(); + } + + pLevel.updateNeighbourForOutputSignal(pPos, this); + } + } + + super.onRemove(pState, pLevel, pPos, pNewState, pIsMoving); + } + + @Override + public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { + if (!pLevel.isClientSide()) { + BlockEntity blockEntity = pLevel.getBlockEntity(pPos); + if (blockEntity instanceof InsolatorBlockEntity insolatorEntity) { + NetworkHooks.openScreen((ServerPlayer)pPlayer, insolatorEntity, pPos); + } else { + throw new IllegalStateException("Our container provider is missing"); + } + } + + return InteractionResult.sidedSuccess(pLevel.isClientSide()); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { + return new InsolatorBlockEntity(pPos, pState); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level pLevel, BlockState pState, BlockEntityType pBlockEntityType) { + return pLevel.isClientSide ? null : createTickerHelper(pBlockEntityType, ModBlockEntities.INSOLATOR.get(), InsolatorBlockEntity::serverTick); + } + + @Override + public void animateTick(BlockState pState, Level pLevel, BlockPos pPos, RandomSource pRandom) { + if (pState.getValue(ACTIVE)) { + if (pRandom.nextDouble() < 1.0d) { + pLevel.playLocalSound( + pPos.getX() + 0.5, pPos.getY() + 0.5, pPos.getZ() + 0.5, + ModSounds.INSOLATOR.get(), SoundSource.BLOCKS, 0.1f, 1.0f, false); + } + } + } +} diff --git a/src/main/java/net/banutama/utamacraft/block/ModBlocks.java b/src/main/java/net/banutama/utamacraft/block/custom/ModBlocks.java similarity index 63% rename from src/main/java/net/banutama/utamacraft/block/ModBlocks.java rename to src/main/java/net/banutama/utamacraft/block/custom/ModBlocks.java index f37ad84..3b4975f 100644 --- a/src/main/java/net/banutama/utamacraft/block/ModBlocks.java +++ b/src/main/java/net/banutama/utamacraft/block/custom/ModBlocks.java @@ -1,13 +1,18 @@ -package net.banutama.utamacraft.block; +package net.banutama.utamacraft.block.custom; import java.util.function.Supplier; import net.banutama.utamacraft.Utamacraft; +import net.banutama.utamacraft.block.custom.EtherealGlassBlock; +import net.banutama.utamacraft.block.custom.TintedEtherealGlassBlock; +import net.banutama.utamacraft.block.custom.InsolatorBlock; import net.banutama.utamacraft.item.ModCreativeModeTab; import net.banutama.utamacraft.item.ModItems; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.material.Material; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; @@ -19,9 +24,16 @@ public class ModBlocks { DeferredRegister.create(ForgeRegistries.BLOCKS, Utamacraft.MOD_ID); public static final RegistryObject ETHEREAL_GLASS = - registerBlock("ethereal_glass", EtherealGlass::new); + registerBlock("ethereal_glass", EtherealGlassBlock::new); public static final RegistryObject TINTED_ETHEREAL_GLASS = - registerBlock("tinted_ethereal_glass", TintedEtherealGlass::new); + registerBlock("tinted_ethereal_glass", TintedEtherealGlassBlock::new); + public static final RegistryObject TUNGSTEN_BLOCK = + registerBlock("tungsten_block", + () -> new Block(BlockBehaviour.Properties.of(Material.METAL) + .strength(12.0f) + .requiresCorrectToolForDrops())); + public static final RegistryObject INSOLATOR = + registerBlock("insolator", InsolatorBlock::new); private static RegistryObject registerBlock(String name, Supplier block) { RegistryObject registered_block = BLOCKS.register(name, block); diff --git a/src/main/java/net/banutama/utamacraft/block/TintedEtherealGlass.java b/src/main/java/net/banutama/utamacraft/block/custom/TintedEtherealGlassBlock.java similarity index 78% rename from src/main/java/net/banutama/utamacraft/block/TintedEtherealGlass.java rename to src/main/java/net/banutama/utamacraft/block/custom/TintedEtherealGlassBlock.java index b91b4d7..d3561df 100644 --- a/src/main/java/net/banutama/utamacraft/block/TintedEtherealGlass.java +++ b/src/main/java/net/banutama/utamacraft/block/custom/TintedEtherealGlassBlock.java @@ -1,10 +1,10 @@ -package net.banutama.utamacraft.block; +package net.banutama.utamacraft.block.custom; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockState; -public class TintedEtherealGlass extends EtherealGlass { +public class TintedEtherealGlassBlock extends EtherealGlassBlock { @Override public int getLightBlock(BlockState state, BlockGetter world, BlockPos pos) { return world.getMaxLightLevel(); diff --git a/src/main/java/net/banutama/utamacraft/block/entity/InsolatorBlockEntity.java b/src/main/java/net/banutama/utamacraft/block/entity/InsolatorBlockEntity.java new file mode 100644 index 0000000..65fb2e9 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/block/entity/InsolatorBlockEntity.java @@ -0,0 +1,365 @@ +package net.banutama.utamacraft.block.entity; + +import com.mojang.logging.LogUtils; +import net.banutama.utamacraft.block.custom.InsolatorBlock; +import net.banutama.utamacraft.networking.ModMessages; +import net.banutama.utamacraft.networking.packet.EnergySyncPacket; +import net.banutama.utamacraft.networking.packet.FluidSyncPacket; +import net.banutama.utamacraft.networking.packet.ItemStackSyncPacket; +import net.banutama.utamacraft.recipe.InsolatorRecipe; +import net.banutama.utamacraft.screen.InsolatorMenu; +import net.banutama.utamacraft.util.ModEnergyStorage; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.Containers; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerData; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.items.ItemStackHandler; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; + +import java.util.Optional; + +public class InsolatorBlockEntity extends BlockEntity implements MenuProvider, EnergySyncPacket.EnergySyncReceiver, FluidSyncPacket.FluidSyncReceiver, ItemStackSyncPacket.ItemStackSyncReceiver { + private static final Logger LOGGER = LogUtils.getLogger(); + + private final ItemStackHandler itemHandler = new ItemStackHandler(3) { + @Override + protected void onContentsChanged(int slot) { + setChanged(); + if (level != null && !level.isClientSide()) { + ModMessages.sendToClients(new ItemStackSyncPacket(this, worldPosition)); + } + } + + @Override + public boolean isItemValid(int slot, @NotNull ItemStack stack) { + return switch (slot) { + case 0 -> stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).isPresent(); + case 1 -> true; + case 2 -> false; + default -> super.isItemValid(slot, stack); + }; + } + }; + + @Override + public void receiveItemStack(NonNullList stacks) { + for (int slot = 0; slot < stacks.size(); ++slot) { + itemHandler.setStackInSlot(slot, stacks.get(slot)); + } + } + + private static final int ENERGY_REQUIRED = 32; + private final ModEnergyStorage energyStorage = new ModEnergyStorage(60000, 256) { + @Override + public void onEnergyChanged() { + setChanged(); + ModMessages.sendToClients(new EnergySyncPacket(energy, capacity, getBlockPos())); + } + }; + + public IEnergyStorage getEnergyStorage() { + return this.energyStorage; + } + + @Override + public void receiveEnergySync(int energy, int capacity) { + energyStorage.setEnergy(energy); + } + + private final FluidTank fluidTank = new FluidTank(64000) { + @Override + protected void onContentsChanged() { + setChanged(); + if (level != null && !level.isClientSide()) { + ModMessages.sendToClients(new FluidSyncPacket(fluid, worldPosition)); + } + } + + @Override + public boolean isFluidValid(FluidStack stack) { + return stack.getFluid() == Fluids.WATER; + } + }; + + public FluidStack getFluidStack() { + return fluidTank.getFluid(); + } + + @Override + public void receiveFluidSync(FluidStack fluid) { + fluidTank.setFluid(fluid); + } + + private LazyOptional lazyItemHandler = LazyOptional.empty(); + private LazyOptional lazyEnergyStorage = LazyOptional.empty(); + private LazyOptional lazyFluidHandler = LazyOptional.empty(); + + protected final ContainerData data; + private int progress = 0; + private int maxProgress = 500; + private boolean active = false; + + public InsolatorBlockEntity(BlockPos pPos, BlockState pBlockState) { + super(ModBlockEntities.INSOLATOR.get(), pPos, pBlockState); + this.data = new ContainerData() { + @Override + public int get(int pIndex) { + return switch (pIndex) { + case 0 -> InsolatorBlockEntity.this.progress; + case 1 -> InsolatorBlockEntity.this.maxProgress; + case 2 -> InsolatorBlockEntity.this.active ? 1 : 0; + default -> 0; + }; + } + + @Override + public void set(int pIndex, int pValue) { + switch (pIndex) { + case 0 -> InsolatorBlockEntity.this.progress = pValue; + case 1 -> InsolatorBlockEntity.this.maxProgress = pValue; + case 2 -> InsolatorBlockEntity.this.active = pValue != 0; + } + } + + @Override + public int getCount() { + return 3; + } + }; + } + + @Override + public @NotNull Component getDisplayName() { + return Component.translatable("block_entity.utamacraft.insolator"); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(int pContainerId, @NotNull Inventory pPlayerInventory, @NotNull Player pPlayer) { + ModMessages.sendToClients(new EnergySyncPacket(this.energyStorage.getEnergyStored(), this.energyStorage.getMaxEnergyStored(), getBlockPos())); + ModMessages.sendToClients(new FluidSyncPacket(this.fluidTank.getFluid(), getBlockPos())); + return new InsolatorMenu(pContainerId, pPlayerInventory, this, this.data); + } + + @Override + public @NotNull LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { + if (cap == ForgeCapabilities.ENERGY) { + return lazyEnergyStorage.cast(); + } + + if (cap == ForgeCapabilities.ITEM_HANDLER) { + return lazyItemHandler.cast(); + } + + if (cap == ForgeCapabilities.FLUID_HANDLER) { + return lazyFluidHandler.cast(); + } + + return super.getCapability(cap, side); + } + + @Override + public void onLoad() { + super.onLoad(); + lazyItemHandler = LazyOptional.of(() -> itemHandler); + lazyEnergyStorage = LazyOptional.of(() -> energyStorage); + lazyFluidHandler = LazyOptional.of(() -> fluidTank); + } + + @Override + public void invalidateCaps() { + super.invalidateCaps(); + lazyItemHandler.invalidate(); + lazyEnergyStorage.invalidate(); + lazyFluidHandler.invalidate(); + } + + @Override + protected void saveAdditional(CompoundTag nbt) { + nbt.put("inventory", itemHandler.serializeNBT()); + nbt.putInt("insolator.progress", progress); + nbt.putInt("insolator.energy", energyStorage.getEnergyStored()); + fluidTank.writeToNBT(nbt); + super.saveAdditional(nbt); + } + + @Override + public void load(@NotNull CompoundTag nbt) { + super.load(nbt); + itemHandler.deserializeNBT(nbt.getCompound("inventory")); + progress = nbt.getInt("insolator.progress"); + energyStorage.setEnergy(nbt.getInt("insolator.energy")); + fluidTank.readFromNBT(nbt); + } + + public void drops() { + SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); + for (int slot = 0; slot < itemHandler.getSlots(); ++slot) { + inventory.setItem(slot, itemHandler.getStackInSlot(slot)); + } + + if (this.level != null) { + Containers.dropContents(this.level, this.worldPosition, inventory); + } else { + LOGGER.warn("Unable to drop inventory contents due to lack of level"); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, InsolatorBlockEntity entity) { + if (level.isClientSide()) { + return; + } + + boolean newActive; + + if (entity.canCraft().isPresent() && entity.hasEnoughEnergy()) { + ++entity.progress; + newActive = true; + entity.energyStorage.extractEnergy(ENERGY_REQUIRED, false); + setChanged(level, pos, state); + + if (entity.progress >= entity.maxProgress) { + entity.craftItem(); + } + } else { + entity.resetProgress(); + newActive = false; + setChanged(level, pos, state); + } + + if (newActive != entity.active) { + entity.active = newActive; + state = state.setValue(InsolatorBlock.ACTIVE, newActive); + level.setBlock(pos, state, 3); + } + + ItemStack fluid = entity.itemHandler.getStackInSlot(0); + if (fluid.getCount() > 0) { + fluid.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).ifPresent(handler -> { + // Remove as much as we need, but no more than a bucket + int amount = Math.min(entity.fluidTank.getSpace(), 1000); + + // Simulate removal of that amount from the IFluidHandlerItem + FluidStack stack = handler.drain(amount, IFluidHandler.FluidAction.SIMULATE); + + // Ensure that the fluid we would use is valid + if (entity.fluidTank.isFluidValid(stack)) { + // Remove the amount of fluid from the IFluidHandlerItem + stack = handler.drain(amount, IFluidHandler.FluidAction.EXECUTE); + // Fill our fluid tank with the fluid stack we drained from the IFluidHandlerItem + entity.fluidTank.fill(stack, IFluidHandler.FluidAction.EXECUTE); + // Extract the current item from the fluid slot? TODO: Should this be when empty? + entity.itemHandler.extractItem(0, 1, false); + entity.itemHandler.insertItem(0, handler.getContainer(), false); + } + }); + } + } + + private void resetProgress() { + this.progress = 0; + } + + private void craftItem() { + Optional recipe = canCraft(); + if (recipe.isEmpty()) { + return; + } + + // Drain the amount of fluid specified in our recipe from the fluid tank + fluidTank.drain(recipe.get().getFluid().getAmount(), IFluidHandler.FluidAction.EXECUTE); + + // Remove an item from the input slot. + itemHandler.extractItem(1, 1, false); + + // Insert the recipe output in to the output slot. + ItemStack output = itemHandler.getStackInSlot(2); + if (output.isEmpty()) { + itemHandler.setStackInSlot(2, recipe.get().getResultItem().copy()); + } else { + output.grow(recipe.get().getResultItem().getCount()); + } + + resetProgress(); + } + + private boolean hasEnoughEnergy() { + return energyStorage.getEnergyStored() >= ENERGY_REQUIRED * maxProgress; + } + + private Optional canCraft() { + Optional recipe = getRecipe(); + if (recipe.isEmpty()) { +// LOGGER.info("Insolator cannot find recipe"); + return Optional.empty(); + } + + // Make sure that the correct fluid is in the tank. + if (!fluidTank.getFluid().equals(recipe.get().getFluid())) { +// LOGGER.info("Insolator does not have correct fluid; contains {}, expected {}", +// fluidTank.getFluid().getFluid(), recipe.get().getFluid().getFluid()); + return Optional.empty(); + } + + // Ensure that we have enough fluid + if (fluidTank.getFluidAmount() < recipe.get().getFluid().getAmount()) { +// LOGGER.info("Insolator has {} of fluid; recipe requires {}", fluidTank.getFluidAmount(), recipe.get().getFluid().getAmount()); + return Optional.empty(); + } + + ItemStack output = itemHandler.getStackInSlot(2); + + // If the output isn't empty, and the item in the output is different to the output of the recipe, we cannot process. + if (!output.isEmpty() && output.getItem() != recipe.get().getResultItem().getItem()) { +// LOGGER.info("Cannot run insolator, as output item is not the same as the recipe output"); + return Optional.empty(); + } + + // Make sure that the output is not saturated. + if (output.getCount() + recipe.get().getResultItem().getCount() > output.getMaxStackSize()) { +// LOGGER.info("Cannot run insolator, as output of {} items exceeds maximum of {}", output.getCount(), output.getMaxStackSize()); + return Optional.empty(); + } + + return recipe; + } + + private Optional getRecipe() { + if (level == null) { + return Optional.empty(); + } + + SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); + for (int slot = 0; slot < itemHandler.getSlots(); ++slot) { + inventory.setItem(slot, itemHandler.getStackInSlot(slot)); + } + + return level.getRecipeManager() + .getRecipeFor(InsolatorRecipe.Type.INSTANCE, inventory, level); + } +} diff --git a/src/main/java/net/banutama/utamacraft/block/entity/ModBlockEntities.java b/src/main/java/net/banutama/utamacraft/block/entity/ModBlockEntities.java new file mode 100644 index 0000000..4b3806f --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/block/entity/ModBlockEntities.java @@ -0,0 +1,22 @@ +package net.banutama.utamacraft.block.entity; + +import net.banutama.utamacraft.Utamacraft; +import net.banutama.utamacraft.block.custom.ModBlocks; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModBlockEntities { + public static final DeferredRegister> BLOCK_ENTITIES = + DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, Utamacraft.MOD_ID); + + public static final RegistryObject> INSOLATOR = + BLOCK_ENTITIES.register("insolator", () -> + BlockEntityType.Builder.of(InsolatorBlockEntity::new, ModBlocks.INSOLATOR.get()).build(null)); + + public static void register(IEventBus bus) { + BLOCK_ENTITIES.register(bus); + } +} diff --git a/src/main/java/net/banutama/utamacraft/item/ModItems.java b/src/main/java/net/banutama/utamacraft/item/ModItems.java index 110028c..0645336 100644 --- a/src/main/java/net/banutama/utamacraft/item/ModItems.java +++ b/src/main/java/net/banutama/utamacraft/item/ModItems.java @@ -13,9 +13,18 @@ public class ModItems { public static final RegistryObject LOGO = ITEMS.register("utamacraft_logo", () -> new Item(new Item.Properties())); - public static final RegistryObject PLAYER_PERIPHERAL = ITEMS.register("player_peripheral", PlayerPeripheralItem::new); + public static final RegistryObject TUNGSTEN_INGOT = + ITEMS.register("tungsten_ingot", () -> new Item(new Item.Properties().tab(ModCreativeModeTab.TAB))); + public static final RegistryObject RAW_TUNGSTEN = + ITEMS.register("raw_tungsten", () -> new Item(new Item.Properties().tab(ModCreativeModeTab.TAB))); + public static final RegistryObject FIBER_GLASS = + ITEMS.register("fiber_glass", () -> new Item(new Item.Properties().tab(ModCreativeModeTab.TAB))); + public static final RegistryObject PCB = + ITEMS.register("pcb", () -> new Item(new Item.Properties().tab(ModCreativeModeTab.TAB))); + public static final RegistryObject BULB = + ITEMS.register("bulb", () -> new Item(new Item.Properties().tab(ModCreativeModeTab.TAB))); public static void register(IEventBus eventBus) { ITEMS.register(eventBus); diff --git a/src/main/java/net/banutama/utamacraft/networking/ModMessages.java b/src/main/java/net/banutama/utamacraft/networking/ModMessages.java new file mode 100644 index 0000000..fb5f306 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/networking/ModMessages.java @@ -0,0 +1,55 @@ +package net.banutama.utamacraft.networking; + +import net.banutama.utamacraft.Utamacraft; +import net.banutama.utamacraft.networking.packet.EnergySyncPacket; +import net.banutama.utamacraft.networking.packet.FluidSyncPacket; +import net.banutama.utamacraft.networking.packet.ItemStackSyncPacket; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkRegistry; +import net.minecraftforge.network.PacketDistributor; +import net.minecraftforge.network.simple.SimpleChannel; + +public class ModMessages { + public static SimpleChannel INSTANCE; + + public static void register() { + INSTANCE = NetworkRegistry.ChannelBuilder + .named(new ResourceLocation(Utamacraft.MOD_ID, "messages")) + .networkProtocolVersion(() -> "1.0") + .clientAcceptedVersions(s -> true) + .serverAcceptedVersions(s -> true) + .simpleChannel(); + + INSTANCE.messageBuilder(EnergySyncPacket.class, 0x0001, NetworkDirection.PLAY_TO_CLIENT) + .encoder(EnergySyncPacket::toBytes) + .decoder(EnergySyncPacket::new) + .consumerMainThread(EnergySyncPacket::handle) + .add(); + + INSTANCE.messageBuilder(FluidSyncPacket.class, 0x0002, NetworkDirection.PLAY_TO_CLIENT) + .encoder(FluidSyncPacket::toBytes) + .decoder(FluidSyncPacket::new) + .consumerMainThread(FluidSyncPacket::handle) + .add(); + + INSTANCE.messageBuilder(ItemStackSyncPacket.class, 0x0003, NetworkDirection.PLAY_TO_CLIENT) + .encoder(ItemStackSyncPacket::toBytes) + .decoder(ItemStackSyncPacket::new) + .consumerMainThread(ItemStackSyncPacket::handle) + .add(); + } + + public static void sendToServer(T message) { + INSTANCE.sendToServer(message); + } + + public static void sendToPlayer(T message, ServerPlayer player) { + INSTANCE.send(PacketDistributor.PLAYER.with(() -> player), message); + } + + public static void sendToClients(T message) { + INSTANCE.send(PacketDistributor.ALL.noArg(), message); + } +} diff --git a/src/main/java/net/banutama/utamacraft/networking/packet/BasePacket.java b/src/main/java/net/banutama/utamacraft/networking/packet/BasePacket.java new file mode 100644 index 0000000..477cc40 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/networking/packet/BasePacket.java @@ -0,0 +1,11 @@ +package net.banutama.utamacraft.networking.packet; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; + +import java.util.function.Supplier; + +public abstract class BasePacket { + public abstract void toBytes(FriendlyByteBuf buf); + public abstract boolean handle(Supplier supplier); +} diff --git a/src/main/java/net/banutama/utamacraft/networking/packet/EnergySyncPacket.java b/src/main/java/net/banutama/utamacraft/networking/packet/EnergySyncPacket.java new file mode 100644 index 0000000..26be4fe --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/networking/packet/EnergySyncPacket.java @@ -0,0 +1,73 @@ +package net.banutama.utamacraft.networking.packet; + +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.network.NetworkEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Supplier; + +public class EnergySyncPacket extends BasePacket { + private final int energy; + private final int capacity; + private final BlockPos pos; + + public EnergySyncPacket(int energy, int capacity, BlockPos pos) { + this.energy = energy; + this.capacity = capacity; + this.pos = pos; + } + + public EnergySyncPacket(@NotNull FriendlyByteBuf buf) { + this.energy = buf.readInt(); + this.capacity = buf.readInt(); + this.pos = buf.readBlockPos(); + } + + @Override + public void toBytes(@NotNull FriendlyByteBuf buf) { + buf.writeInt(energy); + buf.writeInt(capacity); + buf.writeBlockPos(pos); + } + + @Override + public boolean handle(@NotNull Supplier supplier) { + NetworkEvent.Context context = supplier.get(); + context.enqueueWork(() -> { + Level level = Minecraft.getInstance().level; + if (level == null) { + return; + } + + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity instanceof EnergySyncReceiver energyReceiver) { + energyReceiver.receiveEnergySync(energy, capacity); + + Player player = Minecraft.getInstance().player; + if (player == null) { + return; + } + + if (player.containerMenu instanceof EnergySyncReceiverMenu menu && + menu.getBlockEntity().getBlockPos().equals(pos)) { + menu.receiveEnergySync(energy, capacity); + } + } + }); + + return true; + } + + public interface EnergySyncReceiver { + void receiveEnergySync(int energy, int capacity); + } + + public interface EnergySyncReceiverMenu extends EnergySyncReceiver { + BlockEntity getBlockEntity(); + } +} diff --git a/src/main/java/net/banutama/utamacraft/networking/packet/FluidSyncPacket.java b/src/main/java/net/banutama/utamacraft/networking/packet/FluidSyncPacket.java new file mode 100644 index 0000000..e0e4344 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/networking/packet/FluidSyncPacket.java @@ -0,0 +1,70 @@ +package net.banutama.utamacraft.networking.packet; + +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.network.NetworkEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Supplier; + +public class FluidSyncPacket extends BasePacket { + private final FluidStack fluid; + private final BlockPos pos; + + public FluidSyncPacket(FluidStack fluid, BlockPos pos) { + this.fluid = fluid; + this.pos = pos; + } + + public FluidSyncPacket(@NotNull FriendlyByteBuf buf) { + this.fluid = buf.readFluidStack(); + this.pos = buf.readBlockPos(); + } + + @Override + public void toBytes(@NotNull FriendlyByteBuf buf) { + buf.writeFluidStack(fluid); + buf.writeBlockPos(pos); + } + + @Override + public boolean handle(@NotNull Supplier supplier) { + NetworkEvent.Context context = supplier.get(); + context.enqueueWork(() -> { + Level level = Minecraft.getInstance().level; + if (level == null) { + return; + } + + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity instanceof FluidSyncReceiver fluidSyncReceiver) { + fluidSyncReceiver.receiveFluidSync(fluid.copy()); + + Player player = Minecraft.getInstance().player; + if (player == null) { + return; + } + + if (player.containerMenu instanceof FluidSyncReceiverMenu menu && + menu.getBlockEntity().getBlockPos().equals(pos)) { + menu.receiveFluidSync(fluid); + } + } + }); + + return true; + } + + public interface FluidSyncReceiver { + void receiveFluidSync(FluidStack fluid); + } + + public interface FluidSyncReceiverMenu extends FluidSyncReceiver { + BlockEntity getBlockEntity(); + } +} diff --git a/src/main/java/net/banutama/utamacraft/networking/packet/ItemStackSyncPacket.java b/src/main/java/net/banutama/utamacraft/networking/packet/ItemStackSyncPacket.java new file mode 100644 index 0000000..493496e --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/networking/packet/ItemStackSyncPacket.java @@ -0,0 +1,73 @@ +package net.banutama.utamacraft.networking.packet; + +import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.network.NetworkEvent; +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +public class ItemStackSyncPacket extends BasePacket { + private final NonNullList stacks; + private final BlockPos pos; + + public ItemStackSyncPacket(NonNullList stacks, BlockPos pos) { + this.stacks = stacks; + this.pos = pos; + } + + public ItemStackSyncPacket(IItemHandler handler, BlockPos pos) { + this.stacks = NonNullList.create(); + for (int slot = 0; slot < handler.getSlots(); ++slot) { + this.stacks.add(handler.getStackInSlot(slot)); + } + + this.pos = pos; + } + + public ItemStackSyncPacket(@NotNull FriendlyByteBuf buf) { + List stacks = buf.readCollection(ArrayList::new, FriendlyByteBuf::readItem); + this.stacks = NonNullList.withSize(stacks.size(), ItemStack.EMPTY); + for (int slot = 0; slot < stacks.size(); ++slot) { + this.stacks.set(slot, stacks.get(slot)); + } + + this.pos = buf.readBlockPos(); + } + + @Override + public void toBytes(FriendlyByteBuf buf) { + buf.writeCollection(this.stacks, FriendlyByteBuf::writeItem); + buf.writeBlockPos(pos); + } + + @Override + public boolean handle(@NotNull Supplier supplier) { + NetworkEvent.Context context = supplier.get(); + context.enqueueWork(() -> { + Level level = Minecraft.getInstance().level; + if (level == null) { + return; + } + + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity instanceof ItemStackSyncReceiver receiver) { + receiver.receiveItemStack(stacks); + } + }); + + return true; + } + + public interface ItemStackSyncReceiver { + void receiveItemStack(NonNullList handler); + } +} diff --git a/src/main/java/net/banutama/utamacraft/recipe/InsolatorRecipe.java b/src/main/java/net/banutama/utamacraft/recipe/InsolatorRecipe.java new file mode 100644 index 0000000..6d4a2c7 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/recipe/InsolatorRecipe.java @@ -0,0 +1,108 @@ +package net.banutama.utamacraft.recipe; + +import com.google.gson.JsonObject; +import com.mojang.serialization.JsonOps; +import net.banutama.utamacraft.Utamacraft; +import net.minecraft.core.NonNullList; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.*; +import net.minecraft.world.level.Level; +import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class InsolatorRecipe implements Recipe { + private final ResourceLocation id; + private final ItemStack output; + private final Ingredient input; + private final FluidStack fluid; + + public InsolatorRecipe(ResourceLocation id, ItemStack output, Ingredient input, FluidStack fluid) { + this.id = id; + this.output = output; + this.input = input; + this.fluid = fluid; + } + + @Override + public boolean matches(@NotNull SimpleContainer pContainer, @NotNull Level pLevel) { + if (pLevel.isClientSide()) { + return false; + } + + return input.test(pContainer.getItem(1)); + } + + @Override + public @NotNull ItemStack assemble(@NotNull SimpleContainer pContainer) { + return output; + } + + @Override + public boolean canCraftInDimensions(int pWidth, int pHeight) { + return true; + } + + public FluidStack getFluid() { + return fluid; + } + + @Override + public @NotNull ItemStack getResultItem() { + return output.copy(); + } + + @Override + public @NotNull ResourceLocation getId() { + return id; + } + + @Override + public @NotNull RecipeSerializer getSerializer() { + return Serializer.INSTANCE; + } + + @Override + public @NotNull RecipeType getType() { + return Type.INSTANCE; + } + + public static class Type implements RecipeType { + public static final Type INSTANCE = new Type(); + public static final String ID = "insolator"; + private Type() { + } + } + + public static class Serializer implements RecipeSerializer { + public static final Serializer INSTANCE = new Serializer(); + public static final ResourceLocation ID = new ResourceLocation(Utamacraft.MOD_ID, "insolator"); + + @Override + public @NotNull InsolatorRecipe fromJson(@NotNull ResourceLocation pRecipeId, @NotNull JsonObject pSerializedRecipe) { + ItemStack output = ShapedRecipe.itemStackFromJson(GsonHelper.getAsJsonObject(pSerializedRecipe, "output")); + Ingredient input = Ingredient.fromJson(pSerializedRecipe.getAsJsonObject("input")); + FluidStack fluid = FluidStack.CODEC.decode(JsonOps.INSTANCE, pSerializedRecipe.get("fluid")).result().orElseThrow().getFirst(); + return new InsolatorRecipe(pRecipeId, output, input, fluid); + } + + @Override + public @Nullable InsolatorRecipe fromNetwork(@NotNull ResourceLocation pRecipeId, @NotNull FriendlyByteBuf pBuffer) { + ItemStack output = pBuffer.readItem(); + Ingredient input = Ingredient.fromNetwork(pBuffer); + FluidStack fluid = pBuffer.readFluidStack(); + return new InsolatorRecipe(pRecipeId, output, input, fluid); + } + + @Override + public void toNetwork(@NotNull FriendlyByteBuf pBuffer, @NotNull InsolatorRecipe pRecipe) { + pBuffer.writeItemStack(pRecipe.output, false); + pRecipe.input.toNetwork(pBuffer); + pBuffer.writeFluidStack(pRecipe.fluid); + } + } +} diff --git a/src/main/java/net/banutama/utamacraft/recipe/ModRecipes.java b/src/main/java/net/banutama/utamacraft/recipe/ModRecipes.java new file mode 100644 index 0000000..ad04392 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/recipe/ModRecipes.java @@ -0,0 +1,20 @@ +package net.banutama.utamacraft.recipe; + +import net.banutama.utamacraft.Utamacraft; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModRecipes { + public static final DeferredRegister> SERIALIZERS = + DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, Utamacraft.MOD_ID); + + public static final RegistryObject> INSOLATOR_SERIALIZER = + SERIALIZERS.register("insolator", () -> InsolatorRecipe.Serializer.INSTANCE); + + public static void register(IEventBus bus) { + SERIALIZERS.register(bus); + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/InsolatorMenu.java b/src/main/java/net/banutama/utamacraft/screen/InsolatorMenu.java new file mode 100644 index 0000000..b511033 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/InsolatorMenu.java @@ -0,0 +1,164 @@ +package net.banutama.utamacraft.screen; + +import com.mojang.logging.LogUtils; +import net.banutama.utamacraft.block.custom.ModBlocks; +import net.banutama.utamacraft.block.entity.InsolatorBlockEntity; +import net.banutama.utamacraft.networking.packet.EnergySyncPacket; +import net.banutama.utamacraft.networking.packet.FluidSyncPacket; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.*; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.items.SlotItemHandler; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; + +public class InsolatorMenu extends AbstractContainerMenu implements FluidSyncPacket.FluidSyncReceiverMenu, EnergySyncPacket.EnergySyncReceiverMenu { + private static final Logger LOGGER = LogUtils.getLogger(); + public final InsolatorBlockEntity blockEntity; + private final Level level; + private final ContainerData data; + private FluidStack fluid; + private int energy = 0; + private int capacity = 0; + + public InsolatorMenu(int id, Inventory inventory, FriendlyByteBuf extraData) { + this(id, inventory, inventory.player.level.getBlockEntity(extraData.readBlockPos()), new SimpleContainerData(3)); + } + + public InsolatorMenu(int id, Inventory inventory, BlockEntity entity, ContainerData data) { + super(ModMenuTypes.INSOLATOR_MENU.get(), id); + + if (entity instanceof InsolatorBlockEntity insolator) { + checkContainerSize(inventory, 3); + this.level = inventory.player.level; + this.data = data; + this.blockEntity = insolator; + this.fluid = insolator.getFluidStack(); + this.energy = insolator.getEnergyStorage().getEnergyStored(); + this.capacity = insolator.getEnergyStorage().getMaxEnergyStored(); + + addPlayerInventory(inventory); + addPlayerHotbar(inventory); + + this.blockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(handler -> { + this.addSlot(new SlotItemHandler(handler, 0, 12, 15)); + this.addSlot(new SlotItemHandler(handler, 1, 86, 15)); + this.addSlot(new SlotItemHandler(handler, 2, 86, 60)); + }); + + addDataSlots(data); + } else { + throw new IllegalArgumentException("Block entity must be an InsolatorBlockEntity"); + } + } + + @Override + public void receiveFluidSync(FluidStack fluid) { + this.fluid = fluid; + } + + @Override + public void receiveEnergySync(int energy, int capacity) { + this.energy = energy; + this.capacity = capacity; + } + + @Override + public BlockEntity getBlockEntity() { + return blockEntity; + } + + public FluidStack getFluid() { + return fluid; + } + + public int getEnergy() { + return energy; + } + + public int getEnergyCapacity() { + return capacity; + } + + public boolean isCrafting() { + return data.get(2) == 1; + } + + public float getScaledProgress() { + int progress = this.data.get(0); + int maxProgress = this.data.get(1); + + return maxProgress != 0 && progress != 0 ? (float)progress / (float)maxProgress : 0; + } + + @Override + public boolean stillValid(@NotNull Player player) { + return stillValid(ContainerLevelAccess.create(level, blockEntity.getBlockPos()), player, ModBlocks.INSOLATOR.get()); + } + + private static final int HOTBAR_SLOT_COUNT = 9; + + private static final int PLAYER_INVENTORY_ROW_COUNT = 3; + private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; + private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_ROW_COUNT * PLAYER_INVENTORY_COLUMN_COUNT; + + private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; + private static final int TILE_ENTITY_START_SLOT = VANILLA_SLOT_COUNT; + private static final int TILE_ENTITY_SLOT_COUNT = 3; + + @Override + public @NotNull ItemStack quickMoveStack(@NotNull Player player, int index) { + Slot source = slots.get(index); + if (!source.hasItem()) { + return ItemStack.EMPTY; + } + + ItemStack sourceStack = source.getItem(); + ItemStack sourceCopy = sourceStack.copy(); + + if (index < VANILLA_SLOT_COUNT) { + // This is a vanilla container slot, so merge the stack into the tile inventory. + if (!moveItemStackTo(sourceStack, TILE_ENTITY_START_SLOT, TILE_ENTITY_START_SLOT + TILE_ENTITY_SLOT_COUNT, false)) { + return ItemStack.EMPTY; + } + } else if (index < TILE_ENTITY_START_SLOT + TILE_ENTITY_SLOT_COUNT) { + // This is a tile-entity slot, so merge the stack into the players inventory. + if (!moveItemStackTo(sourceStack, 0, VANILLA_SLOT_COUNT, false)) { + return ItemStack.EMPTY; + } + } else { + LOGGER.error("Invalid slot index {}", index); + return ItemStack.EMPTY; + } + + // If the stack size is zero, the entire stack was moved, so set the slot contents to null. + if (sourceStack.getCount() == 0) { + source.set(ItemStack.EMPTY); + } else { + source.setChanged(); + } + + source.onTake(player, sourceStack); + return sourceCopy; + } + + private void addPlayerInventory(Inventory inventory) { + for (int row = 0; row < PLAYER_INVENTORY_ROW_COUNT; ++row) { + for (int col = 0; col < PLAYER_INVENTORY_COLUMN_COUNT; ++col) { + this.addSlot(new Slot(inventory, col + row * 9 + 9, 8 + col * 18, 86 + row * 18)); + } + } + } + + private void addPlayerHotbar(Inventory inventory) { + for (int slot = 0; slot < HOTBAR_SLOT_COUNT; ++slot) { + this.addSlot(new Slot(inventory, slot, 8 + slot * 18, 144)); + } + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/InsolatorScreen.java b/src/main/java/net/banutama/utamacraft/screen/InsolatorScreen.java new file mode 100644 index 0000000..ef31900 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/InsolatorScreen.java @@ -0,0 +1,116 @@ +package net.banutama.utamacraft.screen; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; +import net.banutama.utamacraft.Utamacraft; +import net.banutama.utamacraft.screen.utils.FluidSprite; +import net.banutama.utamacraft.screen.utils.MouseUtils; +import net.banutama.utamacraft.screen.utils.TiledSprite; +import net.banutama.utamacraft.screen.utils.TooltipUtils; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + +import java.util.List; +import java.util.Optional; + +public class InsolatorScreen extends AbstractContainerScreen { + private static final ResourceLocation TEXTURE = + new ResourceLocation(Utamacraft.MOD_ID, "textures/gui/insolator_gui.png"); + + public InsolatorScreen(InsolatorMenu menu, Inventory inventory, Component component) { + super(menu, inventory, component); + inventoryLabelY += 5; + } + + @Override + protected void renderBg(@NotNull PoseStack stack, float partialTick, int mouseX, int mouseY) { + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); + RenderSystem.setShaderTexture(0, TEXTURE); + + int x = (width - imageWidth) / 2; + int y = (height - imageHeight) / 2; + blit(stack, x, y, 0, 0, imageWidth, imageHeight); + renderBulb(stack, x, y); + renderProgressArrow(stack, x, y); + renderFluid(stack, x + 33, y + 16); + renderEnergy(stack, x + 46, y + 16); + } + + @Override + protected void renderLabels(@NotNull PoseStack pPoseStack, int pMouseX, int pMouseY) { + int x = (width - imageWidth) / 2; + int y = (height - imageHeight) / 2; + + if (MouseUtils.isMouseOver(pMouseX, pMouseY, x + 32, y + 15, 11, 61)) { + List components = TooltipUtils.getFluidTooltip(menu.getFluid(), 64000); + renderTooltip(pPoseStack, components, Optional.empty(), + pMouseX - x, pMouseY - y); + } + + if (MouseUtils.isMouseOver(pMouseX, pMouseY, x + 45, y + 15, 11, 61)) { + List components = TooltipUtils.getEnergyTooltip(getMenu().getEnergy(), getMenu().getEnergyCapacity()); + renderTooltip(pPoseStack, components, Optional.empty(), pMouseX - x, pMouseY - y); + } + } + + private void renderEnergy(@NotNull PoseStack stack, int x, int y) { + if (menu.getEnergy() <= 0 || menu.getEnergyCapacity() <= 0) { + return; + } + + final int ENERGY_HEIGHT = 60; + int stored = (int)(ENERGY_HEIGHT * ((float)menu.getEnergy() / (float)menu.getEnergyCapacity())); + fillGradient(stack, x, y + (ENERGY_HEIGHT - stored), x + 9, y + 60, 0xffb51500, 0xff600b00); + } + + private void renderFluid(@NotNull PoseStack stack, int x, int y) { + FluidStack fluid = menu.getFluid(); + if (fluid.getFluid().isSame(Fluids.EMPTY)) { + return; + } + + final int FLUID_HEIGHT = 60; + + TextureAtlasSprite sprite = FluidSprite.getStillFluidSprite(fluid); + int tint = FluidSprite.getTint(fluid); + int amount = fluid.getAmount(); + int scaled = Math.min(FLUID_HEIGHT, Math.max(amount > 0 ? 1 : 0, (amount * FLUID_HEIGHT) / 64000)); + + RenderSystem.enableBlend(); + stack.pushPose(); + stack.translate(x, y, 0); + + TiledSprite.drawTiledSprite(stack, 9, FLUID_HEIGHT, tint, scaled, sprite, 16); + + stack.popPose(); + RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f); + RenderSystem.disableBlend(); + } + + private void renderProgressArrow(PoseStack stack, int x, int y) { + if (menu.isCrafting()) { + blit(stack, x + 90, y + 33, 176, 0, 8, (int)(25.0f * menu.getScaledProgress())); + } + } + + private void renderBulb(PoseStack stack, int x, int y) { + if (menu.isCrafting()) { + blit(stack, x + 67, y + 38, 176, 25, 9, 14); + } + } + + @Override + public void render(@NotNull PoseStack stack, int mouseX, int mouseY, float delta) { + renderBackground(stack); + super.render(stack, mouseX, mouseY, delta); + renderTooltip(stack, mouseX, mouseY); + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/ModMenuTypes.java b/src/main/java/net/banutama/utamacraft/screen/ModMenuTypes.java new file mode 100644 index 0000000..477eaa6 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/ModMenuTypes.java @@ -0,0 +1,27 @@ +package net.banutama.utamacraft.screen; + +import net.banutama.utamacraft.Utamacraft; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.MenuType; +import net.minecraftforge.common.extensions.IForgeMenuType; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.network.IContainerFactory; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModMenuTypes { + public static final DeferredRegister> MENUS = + DeferredRegister.create(ForgeRegistries.MENU_TYPES, Utamacraft.MOD_ID); + + public static final RegistryObject> INSOLATOR_MENU = + registerMenuType("insolator_menu", InsolatorMenu::new); + + private static RegistryObject> registerMenuType(String name, IContainerFactory factory) { + return MENUS.register(name, () -> IForgeMenuType.create(factory)); + } + + public static void register(IEventBus bus) { + MENUS.register(bus); + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/utils/FluidSprite.java b/src/main/java/net/banutama/utamacraft/screen/utils/FluidSprite.java new file mode 100644 index 0000000..505b771 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/utils/FluidSprite.java @@ -0,0 +1,29 @@ +package net.banutama.utamacraft.screen.utils; + +import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.inventory.InventoryMenu; +import net.minecraft.world.level.material.Fluid; +import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; +import net.minecraftforge.fluids.FluidStack; + +public class FluidSprite { + public static int getTint(FluidStack fluid) { + return IClientFluidTypeExtensions.of(fluid.getFluid()).getTintColor(fluid); + } + + public static void setColorFromTint(int tint) { + float a = ((tint >> 24) & 0xff) / 255.0f; + float r = ((tint >> 16) & 0xff) / 255.0f; + float g = ((tint >> 8) & 0xff) / 255.0f; + float b = (tint & 0xff) / 255.0f; + RenderSystem.setShaderColor(r, g, b, a); + } + + public static TextureAtlasSprite getStillFluidSprite(FluidStack fluid) { + ResourceLocation texture = IClientFluidTypeExtensions.of(fluid.getFluid()).getStillTexture(fluid); + return Minecraft.getInstance().getTextureAtlas(InventoryMenu.BLOCK_ATLAS).apply(texture); + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/utils/MouseUtils.java b/src/main/java/net/banutama/utamacraft/screen/utils/MouseUtils.java new file mode 100644 index 0000000..c5ca47b --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/utils/MouseUtils.java @@ -0,0 +1,7 @@ +package net.banutama.utamacraft.screen.utils; + +public class MouseUtils { + public static boolean isMouseOver(double mouseX, double mouseY, int x, int y, int w, int h) { + return mouseX >= x && mouseX <= x + w && mouseY >= y && mouseY <= y + h; + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/utils/TiledSprite.java b/src/main/java/net/banutama/utamacraft/screen/utils/TiledSprite.java new file mode 100644 index 0000000..fcd29f0 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/utils/TiledSprite.java @@ -0,0 +1,60 @@ +package net.banutama.utamacraft.screen.utils; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.*; +import com.mojang.math.Matrix4f; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.client.renderer.texture.TextureAtlasSprite; +import net.minecraft.world.inventory.InventoryMenu; + +public class TiledSprite { + public static void drawTiledSprite(PoseStack stack, int tiledWidth, int tiledHeight, int tint, int scaledAmount, TextureAtlasSprite sprite, int textureSize) { + RenderSystem.setShaderTexture(0, InventoryMenu.BLOCK_ATLAS); + Matrix4f m = stack.last().pose(); + FluidSprite.setColorFromTint(tint); + + int xTileCount = tiledWidth / textureSize; + int xRemainder = tiledWidth - (xTileCount * textureSize); + int yTileCount = scaledAmount / textureSize; + int yRemainder = scaledAmount - (yTileCount * textureSize); + + for (int xTile = 0; xTile <= xTileCount; ++xTile) { + for (int yTile = 0; yTile <= yTileCount; ++yTile) { + int width = (xTile == xTileCount) ? xRemainder : textureSize; + if (width <= 0) { + continue; + } + + int height = (yTile == yTileCount) ? yRemainder : textureSize; + if (height <= 0) { + continue; + } + + int x = xTile * textureSize; + int y = tiledHeight - ((yTile + 1) * textureSize); + drawTextureWithMasking(m, x, y, sprite, textureSize - height, textureSize - width, 100); + } + } + } + + private static void drawTextureWithMasking(Matrix4f m, float x, float y, TextureAtlasSprite sprite, int maskTop, int maskRight, float z) { + float u0 = sprite.getU0(); + float u1 = sprite.getU1(); + float v0 = sprite.getV0(); + float v1 = sprite.getV1(); + + u1 = u1 - (maskRight / 16.0f * (u1 - u0)); + v1 = v1 - (maskTop / 16.0f * (v1 - v0)); + + RenderSystem.setShader(GameRenderer::getPositionTexShader); + + Tesselator tesselator = Tesselator.getInstance(); + BufferBuilder builder = tesselator.getBuilder(); + builder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); + builder.vertex(m, x, y + 16, z).uv(u0, v1).endVertex(); + builder.vertex(m, x + 16 - maskRight, y + 16, z).uv(u1, v1).endVertex(); + builder.vertex(m, x + 16 - maskRight, y + maskTop, z).uv(u1, v0).endVertex(); + builder.vertex(m, x, y + maskTop, z).uv(u0, v0).endVertex(); + tesselator.end(); + } +} diff --git a/src/main/java/net/banutama/utamacraft/screen/utils/TooltipUtils.java b/src/main/java/net/banutama/utamacraft/screen/utils/TooltipUtils.java new file mode 100644 index 0000000..9fd7558 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/screen/utils/TooltipUtils.java @@ -0,0 +1,71 @@ +package net.banutama.utamacraft.screen.utils; + +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; +import org.jetbrains.annotations.NotNull; + +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +public class TooltipUtils { + private static final NumberFormat nf = NumberFormat.getIntegerInstance(); + + private static @NotNull List startFluidTooltip(@NotNull FluidStack stack) { + List tooltip = new ArrayList<>(); + + Fluid fluid = stack.getFluid(); + if (fluid.isSame(Fluids.EMPTY)) { + tooltip.add(Component.translatable("tooltip.utamacraft.fluid.empty") + .withStyle(ChatFormatting.ITALIC) + .withStyle(ChatFormatting.GRAY)); + return tooltip; + } + + tooltip.add(stack.getDisplayName()); + return tooltip; + } + + public static @NotNull List getFluidTooltip(@NotNull FluidStack stack, int capacity) { + List tooltip = startFluidTooltip(stack); + + int amount = stack.getAmount(); + int mb = (amount * 1000) / FluidType.BUCKET_VOLUME; + + tooltip.add(Component.translatable("tooltip.utamacraft.fluid.amount.with_capacity", + nf.format(mb), nf.format(capacity)) + .withStyle(ChatFormatting.GRAY)); + + return tooltip; + } + + public static @NotNull List getFluidTooltip(@NotNull FluidStack stack) { + List tooltip = startFluidTooltip(stack); + + int amount = stack.getAmount(); + int mb = (amount * 1000) / FluidType.BUCKET_VOLUME; + + tooltip.add(Component.translatable("tooltip.utamacraft.fluid.amount", nf.format(mb)) + .withStyle(ChatFormatting.GRAY)); + + return tooltip; + } + + public static @NotNull List getEnergyTooltip(int energy) { + return List.of(Component.translatable("tooltip.utamacraft.energy.amount", + nf.format(energy)).withStyle(ChatFormatting.GRAY)); + } + + public static @NotNull List getEnergyTooltip(int energy, int capacity) { + return List.of( + Component.translatable(("tooltip.utamacraft.energy")), + Component.translatable("tooltip.utamacraft.energy.amount.with_capacity", + nf.format(energy), nf.format(capacity)).withStyle(ChatFormatting.GRAY)); + } +} diff --git a/src/main/java/net/banutama/utamacraft/sound/ModSounds.java b/src/main/java/net/banutama/utamacraft/sound/ModSounds.java new file mode 100644 index 0000000..6535e3c --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/sound/ModSounds.java @@ -0,0 +1,22 @@ +package net.banutama.utamacraft.sound; + +import net.banutama.utamacraft.Utamacraft; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + + +public class ModSounds { + public static final DeferredRegister SOUNDS = + DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, Utamacraft.MOD_ID); + + public static final RegistryObject INSOLATOR = + SOUNDS.register("insolator", () -> new SoundEvent(new ResourceLocation(Utamacraft.MOD_ID, "insolator"))); + + public static void register(IEventBus eventBus) { + SOUNDS.register(eventBus); + } +} diff --git a/src/main/java/net/banutama/utamacraft/util/ModEnergyStorage.java b/src/main/java/net/banutama/utamacraft/util/ModEnergyStorage.java new file mode 100644 index 0000000..1de5b76 --- /dev/null +++ b/src/main/java/net/banutama/utamacraft/util/ModEnergyStorage.java @@ -0,0 +1,36 @@ +package net.banutama.utamacraft.util; + +import net.minecraftforge.energy.EnergyStorage; + +public abstract class ModEnergyStorage extends EnergyStorage { + public ModEnergyStorage(int capacity, int maxTransfer) { + super(capacity, maxTransfer); + } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) { + int extracted = super.extractEnergy(maxExtract, simulate); + if (extracted != 0) { + onEnergyChanged(); + } + + return extracted; + } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate) { + int received = super.receiveEnergy(maxReceive, simulate); + if (received != 0) { + onEnergyChanged(); + } + + return received; + } + + public int setEnergy(int energy) { + this.energy = energy; + return energy; + } + + public abstract void onEnergyChanged(); +} diff --git a/src/main/resources/assets/utamacraft/blockstates/insolator.json b/src/main/resources/assets/utamacraft/blockstates/insolator.json new file mode 100644 index 0000000..03e299e --- /dev/null +++ b/src/main/resources/assets/utamacraft/blockstates/insolator.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=north,active=false": { + "model": "utamacraft:block/insolator" + }, + "facing=north,active=true": { + "model": "utamacraft:block/insolator_active" + }, + "facing=east,active=false": { + "model": "utamacraft:block/insolator", + "y": 90 + }, + "facing=east,active=true": { + "model": "utamacraft:block/insolator_active", + "y": 90 + }, + "facing=south,active=false": { + "model": "utamacraft:block/insolator", + "y": 180 + }, + "facing=south,active=true": { + "model": "utamacraft:block/insolator_active", + "y": 180 + }, + "facing=west,active=false": { + "model": "utamacraft:block/insolator", + "y": 270 + }, + "facing=west,active=true": { + "model": "utamacraft:block/insolator_active", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/blockstates/tungsten_block.json b/src/main/resources/assets/utamacraft/blockstates/tungsten_block.json new file mode 100644 index 0000000..1a6e311 --- /dev/null +++ b/src/main/resources/assets/utamacraft/blockstates/tungsten_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "utamacraft:block/tungsten_block" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/lang/en_us.json b/src/main/resources/assets/utamacraft/lang/en_us.json index 7118e55..7c2fb10 100644 --- a/src/main/resources/assets/utamacraft/lang/en_us.json +++ b/src/main/resources/assets/utamacraft/lang/en_us.json @@ -1,10 +1,26 @@ { "block.utamacraft.ethereal_glass": "Ethereal Glass", + "block.utamacraft.insolator": "Insolator", "block.utamacraft.tinted_ethereal_glass": "Tinted Ethereal Glass", + "block.utamacraft.tungsten_block": "Tungsten Block", + "block_entity.utamacraft.insolator": "Insolator", + "item.utamacraft.bulb": "Bulb", + "item.utamacraft.fiber_glass": "Fiberglass", + "item.utamacraft.insolator": "Insolator", + "item.utamacraft.pcb": "Printed Circuit Board", "item.utamacraft.player_peripheral": "Player peripheral", + "item.utamacraft.raw_tungsten": "Raw Tungsten", + "item.utamacraft.tungsten_block": "Tungsten Block", + "item.utamacraft.tungsten_ingot": "Tungsten Ingot", "item.utamacraft.utamacraft_logo": "Utamacraft", "itemGroup.utamacraft_tab": "Utamacraft", + "tooltip.utamacraft.energy": "Energy", + "tooltip.utamacraft.energy.amount": "%s FE", + "tooltip.utamacraft.energy.amount.with_capacity": "%s / %s FE", "tooltip.utamacraft.ethereal_glass": "Glass that is not solid to players", + "tooltip.utamacraft.fluid.empty": "Empty", + "tooltip.utamacraft.fluid.amount": "%s mB", + "tooltip.utamacraft.fluid.amount.with_capacity": "%s / %s mB", "tooltip.utamacraft.tinted_ethereal_glass": "Glass that is not solid to players and blocks light", "turtle.utamacraft.player_turtle": "Player" } diff --git a/src/main/resources/assets/utamacraft/models/block/insolator.json b/src/main/resources/assets/utamacraft/models/block/insolator.json new file mode 100644 index 0000000..8a300f8 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/block/insolator.json @@ -0,0 +1,226 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [128, 128], + "textures": { + "5": "utamacraft:block/insolator" + }, + "elements": [ + { + "name": "Top", + "from": [0, 13, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [6, 4.25, 8, 4.625], "texture": "#5"}, + "east": {"uv": [6, 4.625, 8, 5], "texture": "#5"}, + "south": {"uv": [6, 5, 8, 5.375], "texture": "#5"}, + "west": {"uv": [6, 5.375, 8, 5.75], "texture": "#5"}, + "up": {"uv": [4, 6, 2, 4], "texture": "#5"}, + "down": {"uv": [6, 2, 4, 4], "texture": "#5"} + } + }, + { + "name": "Base", + "from": [0, 0, 0], + "to": [16, 3, 16], + "faces": { + "north": {"uv": [6, 2.75, 8, 3.125], "texture": "#5"}, + "east": {"uv": [6, 3.125, 8, 3.5], "texture": "#5"}, + "south": {"uv": [6, 3.5, 8, 3.875], "texture": "#5"}, + "west": {"uv": [6, 3.875, 8, 4.25], "texture": "#5"}, + "up": {"uv": [2, 2, 0, 0], "texture": "#5"}, + "down": {"uv": [2, 2, 0, 4], "texture": "#5"} + } + }, + { + "name": "Top", + "from": [0, 5, 0], + "to": [16, 7, 16], + "faces": { + "north": {"uv": [6, 6.25, 8, 6.5], "texture": "#5"}, + "east": {"uv": [6, 6.5, 8, 6.75], "texture": "#5"}, + "south": {"uv": [4, 6.75, 6, 7], "texture": "#5"}, + "west": {"uv": [6, 6.75, 8, 7], "texture": "#5"}, + "up": {"uv": [4, 2, 2, 0], "texture": "#5"}, + "down": {"uv": [4, 2, 2, 4], "texture": "#5"} + } + }, + { + "name": "Slab", + "from": [0, 3, 5], + "to": [16, 5, 16], + "faces": { + "north": {"uv": [6, 5.75, 8, 6], "texture": "#5"}, + "east": {"uv": [0, 7.625, 1.375, 7.875], "texture": "#5"}, + "south": {"uv": [6, 6, 8, 6.25], "texture": "#5"}, + "west": {"uv": [1.375, 7.625, 2.75, 7.875], "texture": "#5"}, + "up": {"uv": [6, 5.375, 4, 4], "texture": "#5"}, + "down": {"uv": [6, 5.375, 4, 6.75], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [0, 3, 0], + "to": [2, 5, 2], + "faces": { + "north": {"uv": [1.5, 7.875, 1.75, 8.125], "texture": "#5"}, + "east": {"uv": [1.75, 7.875, 2, 8.125], "texture": "#5"}, + "south": {"uv": [2, 7.875, 2.25, 8.125], "texture": "#5"}, + "west": {"uv": [2.25, 7.875, 2.5, 8.125], "texture": "#5"}, + "up": {"uv": [2.75, 8.125, 2.5, 7.875], "texture": "#5"}, + "down": {"uv": [8.25, 0, 8, 0.25], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [14, 3, 0], + "to": [16, 5, 2], + "faces": { + "north": {"uv": [0, 7.875, 0.25, 8.125], "texture": "#5"}, + "east": {"uv": [0.25, 7.875, 0.5, 8.125], "texture": "#5"}, + "south": {"uv": [0.5, 7.875, 0.75, 8.125], "texture": "#5"}, + "west": {"uv": [0.75, 7.875, 1, 8.125], "texture": "#5"}, + "up": {"uv": [1.25, 8.125, 1, 7.875], "texture": "#5"}, + "down": {"uv": [1.5, 7.875, 1.25, 8.125], "texture": "#5"} + } + }, + { + "name": "Top", + "from": [0, 9, 0], + "to": [16, 11, 16], + "faces": { + "north": {"uv": [4, 7, 6, 7.25], "texture": "#5"}, + "east": {"uv": [6, 7, 8, 7.25], "texture": "#5"}, + "south": {"uv": [4, 7.25, 6, 7.5], "texture": "#5"}, + "west": {"uv": [6, 7.25, 8, 7.5], "texture": "#5"}, + "up": {"uv": [2, 6, 0, 4], "texture": "#5"}, + "down": {"uv": [6, 0, 4, 2], "texture": "#5"} + } + }, + { + "name": "Slab", + "from": [0, 7, 5], + "to": [16, 9, 16], + "faces": { + "north": {"uv": [0, 7.375, 2, 7.625], "texture": "#5"}, + "east": {"uv": [2.75, 7.75, 4.125, 8], "texture": "#5"}, + "south": {"uv": [2, 7.375, 4, 7.625], "texture": "#5"}, + "west": {"uv": [4.125, 7.75, 5.5, 8], "texture": "#5"}, + "up": {"uv": [2, 7.375, 0, 6], "texture": "#5"}, + "down": {"uv": [8, 0, 6, 1.375], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [0, 7, 0], + "to": [2, 9, 2], + "faces": { + "north": {"uv": [8, 0.25, 8.25, 0.5], "texture": "#5"}, + "east": {"uv": [8, 0.5, 8.25, 0.75], "texture": "#5"}, + "south": {"uv": [8, 0.75, 8.25, 1], "texture": "#5"}, + "west": {"uv": [8, 1, 8.25, 1.25], "texture": "#5"}, + "up": {"uv": [8.25, 1.5, 8, 1.25], "texture": "#5"}, + "down": {"uv": [8.25, 1.5, 8, 1.75], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [14, 7, 0], + "to": [16, 9, 2], + "faces": { + "north": {"uv": [8, 1.75, 8.25, 2], "texture": "#5"}, + "east": {"uv": [8, 2, 8.25, 2.25], "texture": "#5"}, + "south": {"uv": [8, 2.25, 8.25, 2.5], "texture": "#5"}, + "west": {"uv": [8, 2.5, 8.25, 2.75], "texture": "#5"}, + "up": {"uv": [3, 8.25, 2.75, 8], "texture": "#5"}, + "down": {"uv": [8.25, 2.75, 8, 3], "texture": "#5"} + } + }, + { + "name": "Slab", + "from": [0, 11, 5], + "to": [16, 13, 16], + "faces": { + "north": {"uv": [4, 7.5, 6, 7.75], "texture": "#5"}, + "east": {"uv": [5.5, 7.75, 6.875, 8], "texture": "#5"}, + "south": {"uv": [6, 7.5, 8, 7.75], "texture": "#5"}, + "west": {"uv": [6.875, 7.75, 8.25, 8], "texture": "#5"}, + "up": {"uv": [8, 2.75, 6, 1.375], "texture": "#5"}, + "down": {"uv": [4, 6, 2, 7.375], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [0, 11, 0], + "to": [2, 13, 2], + "faces": { + "north": {"uv": [3, 8, 3.25, 8.25], "texture": "#5"}, + "east": {"uv": [8, 3, 8.25, 3.25], "texture": "#5"}, + "south": {"uv": [3.25, 8, 3.5, 8.25], "texture": "#5"}, + "west": {"uv": [8, 3.25, 8.25, 3.5], "texture": "#5"}, + "up": {"uv": [3.75, 8.25, 3.5, 8], "texture": "#5"}, + "down": {"uv": [8.25, 3.5, 8, 3.75], "texture": "#5"} + } + }, + { + "name": "Leg", + "from": [14, 11, 0], + "to": [16, 13, 2], + "faces": { + "north": {"uv": [3.75, 8, 4, 8.25], "texture": "#5"}, + "east": {"uv": [8, 3.75, 8.25, 4], "texture": "#5"}, + "south": {"uv": [4, 8, 4.25, 8.25], "texture": "#5"}, + "west": {"uv": [8, 4, 8.25, 4.25], "texture": "#5"}, + "up": {"uv": [4.5, 8.25, 4.25, 8], "texture": "#5"}, + "down": {"uv": [8.25, 4.25, 8, 4.5], "texture": "#5"} + } + } + ], + "display": { + "thirdperson_righthand": { + "scale": [0.25, 0.25, 0.25] + }, + "thirdperson_lefthand": { + "scale": [0.25, 0.25, 0.25] + }, + "firstperson_righthand": { + "rotation": [0, 105, 0], + "scale": [0.75, 0.75, 0.75] + }, + "firstperson_lefthand": { + "rotation": [0, 105, 0], + "scale": [0.75, 0.75, 0.75] + }, + "ground": { + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [21, 137, 0], + "scale": [0.66, 0.66, 0.66] + }, + "fixed": { + "scale": [1, 1, 0.5] + } + }, + "groups": [ + 0, + 1, + { + "name": "Layer 1", + "origin": [0, 0, 0], + "color": 0, + "children": [2, 3, 4, 5] + }, + { + "name": "Layer 2", + "origin": [0, 0, 0], + "color": 0, + "children": [6, 7, 8, 9] + }, + { + "name": "Layer 3", + "origin": [0, 0, 0], + "color": 0, + "children": [10, 11, 12] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/block/insolator_active.json b/src/main/resources/assets/utamacraft/models/block/insolator_active.json new file mode 100644 index 0000000..e8b78a7 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/block/insolator_active.json @@ -0,0 +1,6 @@ +{ + "parent": "utamacraft:block/insolator", + "textures": { + "5": "utamacraft:block/insolator_active" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/block/tungsten_block.json b/src/main/resources/assets/utamacraft/models/block/tungsten_block.json new file mode 100644 index 0000000..ed00a09 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/block/tungsten_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "utamacraft:block/tungsten_block" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/bulb.json b/src/main/resources/assets/utamacraft/models/item/bulb.json new file mode 100644 index 0000000..2050f91 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/bulb.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "utamacraft:item/bulb" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/fiber_glass.json b/src/main/resources/assets/utamacraft/models/item/fiber_glass.json new file mode 100644 index 0000000..be730c1 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/fiber_glass.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "utamacraft:item/fiber_glass" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/insolator.json b/src/main/resources/assets/utamacraft/models/item/insolator.json new file mode 100644 index 0000000..a1633bd --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/insolator.json @@ -0,0 +1,3 @@ +{ + "parent": "utamacraft:block/insolator" +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/pcb.json b/src/main/resources/assets/utamacraft/models/item/pcb.json new file mode 100644 index 0000000..5d851af --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/pcb.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "utamacraft:item/pcb" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/raw_tungsten.json b/src/main/resources/assets/utamacraft/models/item/raw_tungsten.json new file mode 100644 index 0000000..83a972f --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/raw_tungsten.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "utamacraft:item/raw_tungsten" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/tungsten_block.json b/src/main/resources/assets/utamacraft/models/item/tungsten_block.json new file mode 100644 index 0000000..9cd2e96 --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/tungsten_block.json @@ -0,0 +1,3 @@ +{ + "parent": "utamacraft:block/tungsten_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/models/item/tungsten_ingot.json b/src/main/resources/assets/utamacraft/models/item/tungsten_ingot.json new file mode 100644 index 0000000..882dc2a --- /dev/null +++ b/src/main/resources/assets/utamacraft/models/item/tungsten_ingot.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "utamacraft:item/tungsten_ingot" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/sounds.json b/src/main/resources/assets/utamacraft/sounds.json new file mode 100644 index 0000000..1f119f5 --- /dev/null +++ b/src/main/resources/assets/utamacraft/sounds.json @@ -0,0 +1,8 @@ +{ + "insolator": { + "category": "block", + "sounds": [ + "utamacraft:insolator" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/utamacraft/sounds/insolator.ogg b/src/main/resources/assets/utamacraft/sounds/insolator.ogg new file mode 100644 index 0000000..89c7969 Binary files /dev/null and b/src/main/resources/assets/utamacraft/sounds/insolator.ogg differ diff --git a/src/main/resources/assets/utamacraft/textures/block/insolator.png b/src/main/resources/assets/utamacraft/textures/block/insolator.png new file mode 100644 index 0000000..9cb116d Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/block/insolator.png differ diff --git a/src/main/resources/assets/utamacraft/textures/block/insolator_active.png b/src/main/resources/assets/utamacraft/textures/block/insolator_active.png new file mode 100644 index 0000000..285cb94 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/block/insolator_active.png differ diff --git a/src/main/resources/assets/utamacraft/textures/block/tungsten_block.png b/src/main/resources/assets/utamacraft/textures/block/tungsten_block.png new file mode 100644 index 0000000..b7f99f3 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/block/tungsten_block.png differ diff --git a/src/main/resources/assets/utamacraft/textures/gui/insolator_gui.png b/src/main/resources/assets/utamacraft/textures/gui/insolator_gui.png new file mode 100644 index 0000000..0383083 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/gui/insolator_gui.png differ diff --git a/src/main/resources/assets/utamacraft/textures/item/bulb.png b/src/main/resources/assets/utamacraft/textures/item/bulb.png new file mode 100644 index 0000000..845c134 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/item/bulb.png differ diff --git a/src/main/resources/assets/utamacraft/textures/item/fiber_glass.png b/src/main/resources/assets/utamacraft/textures/item/fiber_glass.png new file mode 100644 index 0000000..f63aec9 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/item/fiber_glass.png differ diff --git a/src/main/resources/assets/utamacraft/textures/item/pcb.png b/src/main/resources/assets/utamacraft/textures/item/pcb.png new file mode 100644 index 0000000..0d5038f Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/item/pcb.png differ diff --git a/src/main/resources/assets/utamacraft/textures/item/raw_tungsten.png b/src/main/resources/assets/utamacraft/textures/item/raw_tungsten.png new file mode 100644 index 0000000..0df34a1 Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/item/raw_tungsten.png differ diff --git a/src/main/resources/assets/utamacraft/textures/item/tungsten_ingot.png b/src/main/resources/assets/utamacraft/textures/item/tungsten_ingot.png new file mode 100644 index 0000000..e4ca3cd Binary files /dev/null and b/src/main/resources/assets/utamacraft/textures/item/tungsten_ingot.png differ diff --git a/src/main/resources/data/utamacraft/recipes/bulb.json b/src/main/resources/data/utamacraft/recipes/bulb.json new file mode 100644 index 0000000..ef86910 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/bulb.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "#T#", + " C " + ], + "key": { + "#": { + "item": "minecraft:glass" + }, + "T": { + "item": "utamacraft:tungsten_ingot" + }, + "C": { + "item": "minecraft:copper_ingot" + } + }, + "result": { + "item": "utamacraft:bulb", + "count": 1 + } +} diff --git a/src/main/resources/data/utamacraft/recipes/fiber_glass.json b/src/main/resources/data/utamacraft/recipes/fiber_glass.json new file mode 100644 index 0000000..b477ddf --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/fiber_glass.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SK", + "KS" + ], + "key": { + "S": { + "item": "minecraft:sugar_cane" + }, + "K": { + "item": "minecraft:kelp" + } + }, + "result": { + "item": "utamacraft:fiber_glass", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator.json b/src/main/resources/data/utamacraft/recipes/insolator.json new file mode 100644 index 0000000..dfc5a4c --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "TCT", + "TB ", + "sPs" + ], + "key": { + "T": { + "item": "utamacraft:tungsten_ingot" + }, + "C": { + "item": "minecraft:copper_ingot" + }, + "B": { + "item": "utamacraft:bulb" + }, + "P": { + "item": "utamacraft:pcb" + }, + "s": { + "item": "minecraft:stone_slab" + } + }, + "result": { + "item": "utamacraft:insolator", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_leaves.json new file mode 100644 index 0000000..3f1d326 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:acacia_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:acacia_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_sapling.json new file mode 100644 index 0000000..39d7f9c --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_acacia_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:acacia_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:acacia_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_allium.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_allium.json new file mode 100644 index 0000000..3532bec --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_allium.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:allium" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:allium", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea.json new file mode 100644 index 0000000..6c03dc3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:azalea" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:azalea", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea_leaves.json new file mode 100644 index 0000000..425a2c9 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azalea_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:azalea_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:azalea_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azure_bluet.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azure_bluet.json new file mode 100644 index 0000000..581f71f --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_azure_bluet.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:azure_bluet" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:azure_bluet", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_bamboo.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_bamboo.json new file mode 100644 index 0000000..0803477 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_bamboo.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:bamboo" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:bamboo", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_beetroot_seeds.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_beetroot_seeds.json new file mode 100644 index 0000000..ed82f12 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_beetroot_seeds.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:beetroot_seeds" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:beetroot_seeds", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_big_dripleaf.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_big_dripleaf.json new file mode 100644 index 0000000..9e5cff7 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_big_dripleaf.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:big_dripleaf" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:big_dripleaf", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_leaves.json new file mode 100644 index 0000000..a765835 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:birch_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:birch_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_sapling.json new file mode 100644 index 0000000..db2e0a3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_birch_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:birch_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:birch_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_blue_orchid.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_blue_orchid.json new file mode 100644 index 0000000..7f99013 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_blue_orchid.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:blue_orchid" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:blue_orchid", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_brown_mushroom.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_brown_mushroom.json new file mode 100644 index 0000000..dc8b257 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_brown_mushroom.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:brown_mushroom" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:brown_mushroom", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cactus.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cactus.json new file mode 100644 index 0000000..3cf79a6 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cactus.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:cactus" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:cactus", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_chorus_flower.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_chorus_flower.json new file mode 100644 index 0000000..d13dd16 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_chorus_flower.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:chorus_flower" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:chorus_flower", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cornflower.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cornflower.json new file mode 100644 index 0000000..f4f5ba0 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_cornflower.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:cornflower" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:cornflower", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_fungus.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_fungus.json new file mode 100644 index 0000000..d724cf3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_fungus.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:crimson_fungus" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:crimson_fungus", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_roots.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_roots.json new file mode 100644 index 0000000..94548e6 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_crimson_roots.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:crimson_roots" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:crimson_roots", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dandelion.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dandelion.json new file mode 100644 index 0000000..93e24d6 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dandelion.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:dandelion" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:dandelion", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_leaves.json new file mode 100644 index 0000000..e57f76c --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:dark_oak_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:dark_oak_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_sapling.json new file mode 100644 index 0000000..6b3c538 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_dark_oak_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:dark_oak_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:dark_oak_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_fern.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_fern.json new file mode 100644 index 0000000..0e94feb --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_fern.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:fern" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:fern", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea.json new file mode 100644 index 0000000..be441e7 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:flowering_azalea" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:flowering_azalea", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea_leaves.json new file mode 100644 index 0000000..e1181b0 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_flowering_azalea_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:flowering_azalea_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:flowering_azalea_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_glow_lichen.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_glow_lichen.json new file mode 100644 index 0000000..ff50280 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_glow_lichen.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:glow_lichen" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:glow_lichen", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_grass.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_grass.json new file mode 100644 index 0000000..8c9a844 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_grass.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:grass" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:grass", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_hanging_roots.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_hanging_roots.json new file mode 100644 index 0000000..b046f1e --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_hanging_roots.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:hanging_roots" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:hanging_roots", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_leaves.json new file mode 100644 index 0000000..82f30b8 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:jungle_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:jungle_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_sapling.json new file mode 100644 index 0000000..cf3af1b --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_jungle_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:jungle_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:jungle_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_kelp.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_kelp.json new file mode 100644 index 0000000..aeb08e9 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_kelp.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:kelp" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:kelp", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_large_fern.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_large_fern.json new file mode 100644 index 0000000..ddc86a2 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_large_fern.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:large_fern" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:large_fern", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lilac.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lilac.json new file mode 100644 index 0000000..bb62e49 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lilac.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:lilac" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:lilac", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lily_of_the_valley.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lily_of_the_valley.json new file mode 100644 index 0000000..88e3567 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_lily_of_the_valley.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:lily_of_the_valley" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:lily_of_the_valley", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_mangrove_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_mangrove_leaves.json new file mode 100644 index 0000000..b5eaa4e --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_mangrove_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:mangrove_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:mangrove_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_melon.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_melon.json new file mode 100644 index 0000000..2489afb --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_melon.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:melon" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:melon", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_block.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_block.json new file mode 100644 index 0000000..ccb18f6 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_block.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:moss_block" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:moss_block", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_carpet.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_carpet.json new file mode 100644 index 0000000..362a84a --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_moss_carpet.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:moss_carpet" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:moss_carpet", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_sprouts.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_sprouts.json new file mode 100644 index 0000000..0b59aaa --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_sprouts.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:nether_sprouts" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:nether_sprouts", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_wart.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_wart.json new file mode 100644 index 0000000..05beedd --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_nether_wart.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:nether_wart" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:nether_wart", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_leaves.json new file mode 100644 index 0000000..6d58338 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:oak_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:oak_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_sapling.json new file mode 100644 index 0000000..ef34ede --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oak_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:oak_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:oak_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_orange_tulip.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_orange_tulip.json new file mode 100644 index 0000000..31ba277 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_orange_tulip.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:orange_tulip" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:orange_tulip", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_organge_tulip.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_organge_tulip.json new file mode 100644 index 0000000..55908c3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_organge_tulip.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:organge_tulip" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:organge_tulip", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oxeye_daisy.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oxeye_daisy.json new file mode 100644 index 0000000..a7f0248 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_oxeye_daisy.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:oxeye_daisy" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:oxeye_daisy", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_peony.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_peony.json new file mode 100644 index 0000000..b94a4fc --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_peony.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:peony" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:peony", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pink_tulip.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pink_tulip.json new file mode 100644 index 0000000..e3a109a --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pink_tulip.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:pink_tulip" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:pink_tulip", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_poppy.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_poppy.json new file mode 100644 index 0000000..400001f --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_poppy.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:poppy" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:poppy", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_potato.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_potato.json new file mode 100644 index 0000000..8a054b7 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_potato.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:potato" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:potato", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pumpkin.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pumpkin.json new file mode 100644 index 0000000..84953d3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_pumpkin.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:pumpkin" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:pumpkin", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_mushroom.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_mushroom.json new file mode 100644 index 0000000..9a9d870 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_mushroom.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:red_mushroom" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:red_mushroom", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_tulip.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_tulip.json new file mode 100644 index 0000000..137f2b9 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_red_tulip.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:red_tulip" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:red_tulip", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_rose_bush.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_rose_bush.json new file mode 100644 index 0000000..6ca490b --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_rose_bush.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:rose_bush" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:rose_bush", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sea_pickle.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sea_pickle.json new file mode 100644 index 0000000..59998f3 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sea_pickle.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:sea_pickle" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:sea_pickle", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_seagrass.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_seagrass.json new file mode 100644 index 0000000..d1991df --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_seagrass.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:seagrass" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:seagrass", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_short_grass.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_short_grass.json new file mode 100644 index 0000000..11869e8 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_short_grass.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:short_grass" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:short_grass", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_small_dripleaf.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_small_dripleaf.json new file mode 100644 index 0000000..25e171e --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_small_dripleaf.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:small_dripleaf" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:small_dripleaf", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spore_blossom.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spore_blossom.json new file mode 100644 index 0000000..d9af8f2 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spore_blossom.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:spore_blossom" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:spore_blossom", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_leaves.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_leaves.json new file mode 100644 index 0000000..ded4be1 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_leaves.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:spruce_leaves" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:spruce_leaves", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_sapling.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_sapling.json new file mode 100644 index 0000000..d9bc9c9 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_spruce_sapling.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:spruce_sapling" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:spruce_sapling", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sugar_cane.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sugar_cane.json new file mode 100644 index 0000000..5e3736d --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sugar_cane.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:sugar_cane" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:sugar_cane", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sunflower.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sunflower.json new file mode 100644 index 0000000..224fa2d --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_sunflower.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:sunflower" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:sunflower", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_tall_grass.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_tall_grass.json new file mode 100644 index 0000000..847795a --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_tall_grass.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:tall_grass" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:tall_grass", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_twisting_vines.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_twisting_vines.json new file mode 100644 index 0000000..35c796a --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_twisting_vines.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:twisting_vines" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:twisting_vines", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_vine.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_vine.json new file mode 100644 index 0000000..ae9917b --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_vine.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:vine" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:vine", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_fungus.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_fungus.json new file mode 100644 index 0000000..dda4c1b --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_fungus.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:warped_fungus" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:warped_fungus", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_roots.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_roots.json new file mode 100644 index 0000000..1a76a4c --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_warped_roots.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:warped_roots" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:warped_roots", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_weeping_vines.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_weeping_vines.json new file mode 100644 index 0000000..229e663 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_weeping_vines.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:weeping_vines" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:weeping_vines", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wheat_seeds.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wheat_seeds.json new file mode 100644 index 0000000..af4c6a9 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wheat_seeds.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:wheat_seeds" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:wheat_seeds", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_white_tulip.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_white_tulip.json new file mode 100644 index 0000000..984bed2 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_white_tulip.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:white_tulip" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:white_tulip", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wither_rose.json b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wither_rose.json new file mode 100644 index 0000000..b2a6515 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/insolator_minecraft_wither_rose.json @@ -0,0 +1,14 @@ +{ + "type": "utamacraft:insolator", + "input": { + "item": "minecraft:wither_rose" + }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { + "item": "minecraft:wither_rose", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/pcb.json b/src/main/resources/data/utamacraft/recipes/pcb.json new file mode 100644 index 0000000..9c0b1cc --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/pcb.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "FF", + "CG" + ], + "key": { + "F": { + "item": "utamacraft:fiber_glass" + }, + "C": { + "item": "minecraft:copper_ingot" + }, + "G": { + "item": "minecraft:gold_ingot" + } + }, + "result": { + "item": "utamacraft:pcb", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/tungsten_block.json b/src/main/resources/data/utamacraft/recipes/tungsten_block.json new file mode 100644 index 0000000..3e0e63a --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/tungsten_block.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "TTT", + "TTT", + "TTT" + ], + "key": { + "T": { + "item": "utamacraft:tungsten_ingot" + } + }, + "result": { + "item": "utamacraft:tungsten_block" + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/tungsten_from_block.json b/src/main/resources/data/utamacraft/recipes/tungsten_from_block.json new file mode 100644 index 0000000..6351bff --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/tungsten_from_block.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "utamacraft:tungsten_block" + } + ], + "result": { + "item": "utamacraft:tungsten_ingot", + "count": 9 + } +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_blasting.json b/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_blasting.json new file mode 100644 index 0000000..82e2e67 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_blasting.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:blasting", + "cookingtime": 200, + "experience": 1.0, + "group": "tungsten", + "ingredient": { + "item": "utamacraft:raw_tungsten" + }, + "result": "utamacraft:tungsten_ingot" +} \ No newline at end of file diff --git a/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_smelting.json b/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_smelting.json new file mode 100644 index 0000000..c069c67 --- /dev/null +++ b/src/main/resources/data/utamacraft/recipes/tungsten_ingot_from_raw_smelting.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smelting", + "cookingtime": 400, + "experience": 1.0, + "group": "tungsten", + "ingredient": { + "item": "utamacraft:raw_tungsten" + }, + "result": "utamacraft:tungsten_ingot" +} \ No newline at end of file diff --git a/tools/generate-insolator-recipes.py b/tools/generate-insolator-recipes.py new file mode 100644 index 0000000..ab746f2 --- /dev/null +++ b/tools/generate-insolator-recipes.py @@ -0,0 +1,91 @@ +import json + +ITEMS = [ + "minecraft:acacia_leaves", + "minecraft:acacia_sapling", + "minecraft:allium", + "minecraft:azalea", + "minecraft:azalea_leaves", + "minecraft:azure_bluet", + "minecraft:bamboo", + "minecraft:beetroot_seeds", + "minecraft:big_dripleaf", + "minecraft:birch_leaves", + "minecraft:birch_sapling", + "minecraft:blue_orchid", + "minecraft:brown_mushroom", + "minecraft:cactus", + "minecraft:chorus_flower", + "minecraft:cornflower", + "minecraft:crimson_fungus", + "minecraft:crimson_roots", + "minecraft:dandelion", + "minecraft:dark_oak_leaves", + "minecraft:dark_oak_sapling", + "minecraft:fern", + "minecraft:flowering_azalea", + "minecraft:flowering_azalea_leaves", + "minecraft:glow_lichen", + "minecraft:grass", + "minecraft:hanging_roots", + "minecraft:jungle_leaves", + "minecraft:jungle_sapling", + "minecraft:large_fern", + "minecraft:lilac", + "minecraft:lily_of_the_valley", + "minecraft:kelp", + "minecraft:mangrove_leaves", + "minecraft:melon", + "minecraft:moss_block", + "minecraft:moss_carpet", + "minecraft:nether_sprouts", + "minecraft:nether_wart", + "minecraft:oak_leaves", + "minecraft:oak_sapling", + "minecraft:orange_tulip", + "minecraft:oxeye_daisy", + "minecraft:peony", + "minecraft:pink_tulip", + "minecraft:poppy", + "minecraft:potato", + "minecraft:pumpkin", + "minecraft:red_mushroom", + "minecraft:red_tulip", + "minecraft:rose_bush", + "minecraft:sea_pickle", + "minecraft:seagrass", + "minecraft:short_grass", + "minecraft:small_dripleaf", + "minecraft:spore_blossom", + "minecraft:spruce_leaves", + "minecraft:spruce_sapling", + "minecraft:sugar_cane", + "minecraft:sunflower", + "minecraft:tall_grass", + "minecraft:twisting_vines", + "minecraft:vine", + "minecraft:warped_fungus", + "minecraft:warped_roots", + "minecraft:weeping_vines", + "minecraft:wheat_seeds", + "minecraft:white_tulip", + "minecraft:wither_rose", + # "minecraft:cherry_leaves", TODO: 1.20 + # "minecraft:cherry_sapling", TODO: 1.20 + # "minecraft:pink_petals", TODO: 1.20 + # "minecraft:pitcher_plant", TODO: 1.20 + # "minecraft:torchflower", TODO: 1.20 +] + +for item in ITEMS: + namespace, item_name = item.split(":") + with open(f"src/main/resources/data/utamacraft/recipes/insolator_{namespace}_{item_name}.json", "w") as fp: + fp.write(json.dumps({ + "type": "utamacraft:insolator", + "input": { "item": item }, + "fluid": { + "FluidName": "minecraft:water", + "Amount": 500 + }, + "output": { "item": item, "count": 2 } + }, indent=2)) diff --git a/updates.json b/updates.json index cc96893..d756fab 100644 --- a/updates.json +++ b/updates.json @@ -1,6 +1,7 @@ { "homepage": "https://git.blakerain.com/bans-minecraft/utamacraft", "1.19.2": { + "0.2.0-1.19": "Added insolator and fire pendant", "0.1.1-1.19": "Fix player peripheral and add missing recipe", "0.1.0-1.19": "Added tinted ethereal glass", "0.0.1-1.19": "Initial release"