Jump to content

Spring

Members
  • Posts

    93
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    China

Recent Profile Visitors

16307 profile views

Spring's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Does nobody know? I just need a little opinion
  2. Could not find mezz.jei:jei-1.21-common-api:19.0.0.11_mapped_parchment_2024.06.23-1.21. Searched in the following locations: - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/mezz/jei/jei-1.21-common-api/19.0.0.11_mapped_parchment_2024.06.23-1.21/jei-1.21-common-api-19.0.0.11_mapped_parchment_2024.06.23-1.21.pom - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/mezz/jei/jei-1.21-common-api/19.0.0.11_mapped_parchment_2024.06.23-1.21/jei-1.21-common-api-19.0.0.11_mapped_parchment_2024.06.23-1.21.jar Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html Could not find software.bernie.geckolib:geckolib-forge-1.21:4.5.6_mapped_parchment_2024.06.23-1.21. Searched in the following locations: - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/software/bernie/geckolib/geckolib-forge-1.21/4.5.6_mapped_parchment_2024.06.23-1.21/geckolib-forge-1.21-4.5.6_mapped_parchment_2024.06.23-1.21.pom - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/software/bernie/geckolib/geckolib-forge-1.21/4.5.6_mapped_parchment_2024.06.23-1.21/geckolib-forge-1.21-4.5.6_mapped_parchment_2024.06.23-1.21.jar Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html Don't worry about anything else, I know not, it's just these two
  3. Hello guys, I am currently upgrading my Minecraft to 1.21. It was originally 1.20.1, but after replacing the laptop, I am unable to download the dependencies. This is a problem that has never occurred before, and I cannot find the problem. Please help me! # Sets default memory used for gradle commands. Can be overridden by user or command line properties. # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false forge_version=51.0.18 jei_version=19.0.0.11 jade_id=5072729 mixin_version=0.8.5 patchouli=84-FORGE geckolib=4.5.6 # The Minecraft version must agree with the Forge version to get a valid artifact minecraft_version=1.21 minecraft_version_range=[1.21,1.22) # The Forge version range can use any version of Forge as bounds or match the loader version range forge_version_range=[0,) # The loader version range can only use the major version of Forge/FML as bounds loader_version_range=[0,) # The mapping channel to use for mappings. # The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"]. # Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin. # # | Channel | Version | | # |-----------|----------------------|--------------------------------------------------------------------------------| # | official | MCVersion | Official field/method names from Mojang mapping files | # | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official | # # You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. # See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md # # Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge. # Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started mapping_channel=parchment # The mapping version to query from the mapping channel. # This must match the format required by the mapping channel. mapping_version=2024.06.23-1.21 mod_id=chinacraft # The human-readable display name for the mod. mod_name=ChinaCraft # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=All Rights Reserved # The mod version. See https://semver.org/ mod_version=1.21-3.0.0 # 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 mod_group_id=ocean.spring.chinacraft # The authors of the mod. This is a simple text string that is used for display purposes in the mod list. mod_authors=Spring # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. mod_description=中国风Mod,以中国传统的食物、武器、盔甲、工具、神化元素为主内容的中国特色主义模组。 pluginManagement { repositories { gradlePluginPortal() maven { name = 'MinecraftForge' url = 'https://maven.minecraftforge.net/' } maven { url = 'https://maven.parchmentmc.org' } maven { url = 'https://repo.spongepowered.org/repository/maven-public/' } } } plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' } plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0.24,6.2)' id 'org.parchmentmc.librarian.forgegradle' version '1.+' } version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 21 to end users in 1.20.5+, so your mod should target Java 21. java.toolchain.languageVersion = JavaLanguageVersion.of(21) println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { // The mappings can be changed at any time and must be in the following format. // Channel: Version: // official MCVersion Official field/method names from Mojang mapping files // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official // // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: mapping_channel, version: mapping_version // mappings channel: 'parchment', version: '2024.04.16-1.20.6' // Tell FG to not automtically create the reobf tasks, as we now use Official mappings at runtime, If you don't use them at dev time then you'll have to fix your reobf yourself. reobf = false // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. // In most cases, it is not necessary to enable. // enableEclipsePrepareRuns = true // enableIdeaPrepareRuns = true // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. // It is REQUIRED to be set to true for this template to function. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html copyIdeResources = true // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. // The folder name can be set on a run configuration using the "folderName" property. // By default, the folder name of a run configuration is the name of the Gradle project containing it. // generateRunFolders = true // This property enables access transformers for use in development. // They will be applied to the Minecraft artifact. // The access transformer file can be anywhere in the project. // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. // This default location is a best practice to automatically put the file in the right place in the final jar. // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { // applies to all the run configs below configureEach { workingDirectory project.file('run') // Recommended logging data for a userdev environment // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' // Recommended logging level for the console // You can set various levels here. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } // This run config launches GameTestServer and runs all registered gametests, then exits. // By default, the server will crash when no gametests are provided. // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { // example of overriding the workingDirectory set in configureEach above workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } // Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { maven { // location of the maven that hosts JEI files name = "Progwml6 maven" url = "https://dvs1.progwml6.com/files/maven/" } maven { // location of a maven mirror for JEI files, as a fallback name = "ModMaven" url = "https://modmaven.dev" } maven { url "https://www.cursemaven.com" content { includeGroup "curse.maven" } } maven { name = 'GeckoLib' url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' content { includeGroup("software.bernie.geckolib") } } maven { // location of the maven that hosts JEI files since January 2023 name = "Jared's maven" url = "https://maven.blamejared.com/" } } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // 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}")) // implementation fg.deobf("curse.maven:jade-324717:${jade_id}") annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor" compileOnly fg.deobf("vazkii.patchouli:Patchouli:${minecraft_version}-${patchouli}:api") runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${minecraft_version}-${patchouli}") implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib}") implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } } // This block of code expands all declared replace properties in the specified resource targets. // A missing property will result in an error. Properties are expanded using ${} Groovy notation. // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html tasks.named('processResources', ProcessResources).configure { var replaceProperties = [ minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range, forge_version: forge_version, forge_version_range: forge_version_range, loader_version_range: loader_version_range, mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, mod_authors: mod_authors, mod_description: mod_description, ] inputs.properties replaceProperties filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { expand replaceProperties + [project: project] } } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors ]) } } // Example configuration to allow publishing using the maven-publish plugin publishing { publications { register('mavenJava', MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } eclipse { // Run everytime eclipse builds the code //autoBuildTasks genEclipseRuns // Run when importing the project synchronizationTasks 'genEclipseRuns' } // Merge the resources and classes into the same directory. // This is done because java expects modules to be in a single directory. // And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem // This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later. sourceSets.each { def dir = layout.buildDirectory.dir("sourcesSets/$it.name") it.output.resourcesDir = dir it.java.destinationDirectory = dir }
  4. Maybe I didn't express my problem well. But now it has been solved. This line of code is compiled incorrectly. But I did。 public class AddItemTagModifier extends LootModifier { public static final Codec<CompoundTag> TAG_CODEC = Codec.PASSTHROUGH.comapFlatMap((convert) -> { Tag tag = convert.convert(NbtOps.INSTANCE).getValue(); String replace = tag.toString().replace("'", ""); CompoundTag compoundtag = null; try { compoundtag = TagParser.parseTag(replace); } catch (CommandSyntaxException e) { e.printStackTrace(); } return DataResult.success(compoundtag); }, (value) -> new Dynamic<>(NbtOps.INSTANCE, value)); private final Item item; private final CompoundTag compoundTag; public static final Supplier<Codec<AddItemTagModifier>> CODEC = Suppliers.memoize(() -> RecordCodecBuilder.create(inst -> codecStart(inst) .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(m -> m.item)) .and(TAG_CODEC.fieldOf("nbt").forGetter(m -> m.compoundTag)) .apply(inst, AddItemTagModifier::new))); protected AddItemTagModifier(LootItemCondition[] conditionsIn, Item item, CompoundTag compoundTag) { super(conditionsIn); this.item = item; this.compoundTag = compoundTag; } @Override protected @NotNull ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) { if (context.getRandom().nextFloat() >= 0.4f) { ItemStack out = new ItemStack(item); if (compoundTag != null) { out.setTag(compoundTag); } generatedLoot.add(out); } return generatedLoot; } @Override public Codec<? extends IGlobalLootModifier> codec() { return CODEC.get(); } It works very well !
  5. public class AddItemModifier extends LootModifier { private final Item item; private final CompoundTag compoundTag; public static final Supplier<Codec<AddItemModifier>> CODEC = Suppliers.memoize(() -> RecordCodecBuilder.create(inst -> codecStart(inst) .and(ForgeRegistries.ITEMS.getCodec().fieldOf("item").forGetter(m -> m.item)) //I didn't find anything about CompoundTag in ForgeRegistries? ForgeRegistries.BIOMES be replaced with? .and(ForgeRegistries.BIOMES.getCodec().fieldOf("nbt").forGetter(m -> m.compoundTag)) .apply(inst, AddItemModifier::new))); protected AddItemModifier(LootItemCondition[] conditionsIn, Item item, CompoundTag compoundTag) { super(conditionsIn); this.item = item; this.compoundTag = compoundTag; } @Override protected @NotNull ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) { if (context.getRandom().nextFloat() >= 0.4f) { ItemStack out = new ItemStack(item); if (compoundTag != null) { out.setTag(compoundTag); } generatedLoot.add(new ItemStack(item)); } return generatedLoot; } @Override public Codec<? extends IGlobalLootModifier> codec() { return CODEC.get(); } } loot_modifiers folder { "type": "chinacraft:add_item", "conditions": [ { "condition": "forge:loot_table_id", "loot_table_id": "minecraft:chests/nether_bridge" } ], "item": "patchouli:guide_book", "nbt": "{\"patchouli:book\":\"chinacraft:mencius\"}" } thank you !
  6. How do I overwrite Entity # changeDimension? I want to remove this. unRide(); method
  7. bamboo_jungle
  8. There is only one world available variable, how to find the biome in the world?
  9. solved: event.getGeneration().addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModConfiguredFeatures.LIGHTNING_BAMBOO_SAPLING);
  10. like this: Entity entity = event.getEntity(); if (entity.isAlive() && entity instanceof ZombieEntity) { ZombieEntity zombie = (ZombieEntity) entity; // TODO ... event.setCanceled(true); } Cancel zombie spawn
  11. i use: public static void generatePlant(final BiomeLoadingEvent event) { if (event.getName() != null) { IForgeRegistry<Biome> biomes = ForgeRegistries.BIOMES; for (Biome biome : biomes) { if (biome == biomes.getValue(new ResourceLocation("bamboo_jungle"))) { BiomeGenerationSettings.Builder builder = new BiomeGenerationSettings.Builder() .surfaceBuilder(ConfiguredSurfaceBuilders.GRASS); builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, ModConfiguredFeatures.LIGHTNING_BAMBOO_SAPLING); builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.BAMBOO_VEGETATION); } } } } But he didn't work
  12. 1.16.5
  13. I want to generate some plants in the bamboo biome, but bamboo does not seem to be a biome? If I want to generate custom plants in the bamboo forest, what should I do, can this be achieved? Or another way. Delete the bamboo biome and generate it by me I found the registration bamboo biome in the BiomeRegistry class. What should I do next, any suggestions?
  14. I want to do certain things when the weather changes, such as generating some plants. Is there such an event? I didn't find it. If not, is there a recommended way to implement it? thanks
  15. block bench: my entity model,export use java model private final ModelRenderer renderer; public SkyLanternModel() { texWidth = 16; texHeight = 16; renderer = new ModelRenderer(this); renderer.setPos(0.0F, 18.0F, 0.0F); renderer.texOffs(3, 3).addBox(-5.0F, -8.5F, -5.0F, 10.0F, 0.0F, 10.0F, 0.0F, false); renderer.texOffs(0, 25).addBox(-5.5F, -8.0F, -5.5F, 11.0F, 0.0F, 11.0F, 0.0F, false); renderer.texOffs(0, 0).addBox(-6.0F, -7.5F, -6.0F, 12.0F, 13.0F, 12.0F, 0.0F, false); } @Override public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { } @Override public void renderToBuffer(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { renderer.render(matrixStack, buffer, packedLight, packedOverlay); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.xRot = x; modelRenderer.yRot = y; modelRenderer.zRot = z; } There is a problem with his rendering, how to make it work
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.