This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // I like to commit example versions of the generated config files in the root /examples/ folder of a mod src repo | |
| // this task automates that process | |
| // run it whenever you update the mods configs, or hook it up to trigger off some other task in the workflow | |
| tasks.register('syncExampleConfigs') { | |
| group = 'documentation' | |
| description = 'Copies generated example config files from run/config/ into examples/.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| id 'java-library' | |
| id 'maven-publish' | |
| id 'net.neoforged.moddev' version '2.0.141' | |
| id 'idea' | |
| // ... add this plugin | |
| id 'com.modrinth.minotaur' version '2.8.7' apply false | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import net.darkhax.curseforgegradle.TaskPublishCurseForge | |
| plugins { | |
| id 'java-library' | |
| id 'maven-publish' | |
| id 'net.neoforged.moddev' version '2.0.141' | |
| id 'idea' | |
| id 'net.darkhax.curseforgegradle' version '1.1.25' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| ROOT = r"C:\Users\USER\MyFiles\mc121" | |
| OLD = """tasks.named('wrapper', Wrapper).configure { | |
| // Define wrapper values here so as to not have to always do so when updating gradlew.properties. | |
| // Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with | |
| // documentation attached on cursor hover of gradle classes and methods. However, this comes with increased | |
| // file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards. | |
| // (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0. read https://gist.github.com/ChampionAsh5357/cf818acc53ffea6f4387fe28c2977d56 | |
| 1. download https://files.minecraftforge.net/net/minecraftforge/forge/index_1.20.1.html | |
| 2. copy gradle files&folders | |
| 3. update settings.gradle plugin | |
| plugins { | |
| id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' | |
| } | |
| 4. update meta-inf normal changes along with | |
| version="${mod_version}" #mandatory | |
| 5. pack mcmeta (optional) "pack_format": 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void setup(final FMLCommonSetupEvent event) { | |
| event.enqueueWork(() -> { | |
| CauldronInteraction WASH_PEEL = (state, level, pos, player, hand, stack) -> { | |
| if (stack.is(Items.POTATO)) { | |
| //replace all the item, be generous. we could instead stack.shrink and drop just one | |
| player.setItemInHand(hand, new ItemStack(PotatoModRegistry.PEELED.get(), stack.getCount())); | |
| LayeredCauldronBlock.lowerFillLevel(state, level, pos); | |
| return InteractionResult.sidedSuccess(level.isClientSide); | |
| } | |
| return InteractionResult.PASS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "multipart": [ | |
| { "apply": { "model": "tinylightbulbs:block/part_base" }}, | |
| { "when": { "color": "black" }, | |
| "apply": { "model": "tinylightbulbs:block/bulb_black", "uvlock": true } | |
| }, | |
| { "when": { "color": "blue" }, | |
| "apply": { "model": "tinylightbulbs:block/bulb_blue", "uvlock": true } | |
| }, | |
| { "when": { "color": "brown" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clone new copy of source code, dont use a 1.18 workspace. | |
| IE make new root folder C:\code\mc119 | |
| git clone git@github.com:Lothrazar/ForgeTemplate.git | |
| Download forge mdk zip. we will need the following files. | |
| https://files.minecraftforge.net/net/minecraftforge/forge/index_1.19.html | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // PUBLIC DOMAIN | |
| public static void extractFluidFromBlock(Level level, BlockPos posTarget, IFluidHandler tank) { | |
| //fills always gonna be one bucket but we dont know what type yet | |
| //test if its a source block, or a waterlogged block | |
| BlockState targetState = level.getBlockState(posTarget); | |
| FluidState fluidState = level.getFluidState(posTarget); | |
| if (targetState.hasProperty(BlockStateProperties.WATERLOGGED) && targetState.getValue(BlockStateProperties.WATERLOGGED) == true) { | |
| //for waterlogged it is hardcoded to water | |
| int simFill = tank.fill(new FluidStack(new FluidStack(Fluids.WATER, FluidAttributes.BUCKET_VOLUME), FluidAttributes.BUCKET_VOLUME), FluidAction.SIMULATE); | |
| if (simFill == FluidAttributes.BUCKET_VOLUME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| matchBlocks=stone_bricks mossy_stone_bricks cracked_stone_bricks oak_planks spruce_planks acacia_planks birch_planks dark_oak_planks jungle_planks warped_planks crimson_planks polished_blackstone_bricks cracked_polished_blackstone_bricks purpur_block cobblestone end_stone polished_diorite polished_granite polished_andesite diorite granite andesite stone bricks nether_bricks sandstone cut_sandstone smooth_sandstone white_concrete orange_concrete magenta_concrete light_blue_concrete yellow_concrete lime_concrete pink_concrete gray_concrete light_gray_concrete cyan_concrete purple_concrete blue_concrete brown_concrete green_concrete red_concrete black_concrete terracotta white_terracotta orange_terracotta magenta_terracotta light_blue_terracotta yellow_terracotta lime_terracotta pink_terracotta gray_terracotta light_gray_terracotta cyan_terracotta purple_terracotta blue_terracotta brown_terracotta green_terracotta red_terracotta black_terracotta | |
| connectBlocks=end_stone_bricks | |
| method=overlay | |
| tiles=0-16 | |
| connect= |
NewerOlder