Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
DavidDGTNT | 8434b4ef40 |
15
build.gradle
15
build.gradle
|
@ -26,7 +26,7 @@ minecraft {
|
|||
// 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
|
||||
// Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
|
||||
//
|
||||
// Use non-default mappings at your own risk. They may not always work.
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
|
@ -118,8 +118,7 @@ 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.
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
|
||||
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
|
||||
// flatDir {
|
||||
// dir 'libs'
|
||||
// }
|
||||
|
@ -133,11 +132,10 @@ dependencies {
|
|||
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
||||
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_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
|
||||
|
||||
// Example mod dependency using a mod jar from ./libs with a flat dir repository
|
||||
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
|
||||
|
@ -191,7 +189,6 @@ tasks.named('jar', Jar).configure {
|
|||
// dependsOn 'reobfJar'
|
||||
// }
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish plugin
|
||||
publishing {
|
||||
publications {
|
||||
register('mavenJava', MavenPublication) {
|
||||
|
|
|
@ -7,17 +7,17 @@ org.gradle.daemon=false
|
|||
## Environment Properties
|
||||
|
||||
# The Minecraft version must agree with the Forge version to get a valid artifact
|
||||
minecraft_version=1.19.4
|
||||
minecraft_version=1.19.2
|
||||
# The Minecraft version range can use any release version of Minecraft as bounds.
|
||||
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
|
||||
# as they do not follow standard versioning conventions.
|
||||
minecraft_version_range=[1.19.4,1.20)
|
||||
minecraft_version_range=[1.19.2,1.20)
|
||||
# The Forge version must agree with the Minecraft version to get a valid artifact
|
||||
forge_version=45.3.0
|
||||
forge_version=43.4.0
|
||||
# The Forge version range can use any version of Forge as bounds or match the loader version range
|
||||
forge_version_range=[45,)
|
||||
forge_version_range=[43,)
|
||||
# The loader version range can only use the major version of Forge/FML as bounds
|
||||
loader_version_range=[45,)
|
||||
loader_version_range=[43,)
|
||||
# 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.
|
||||
|
@ -35,7 +35,7 @@ loader_version_range=[45,)
|
|||
mapping_channel=official
|
||||
# The mapping version to query from the mapping channel.
|
||||
# This must match the format required by the mapping channel.
|
||||
mapping_version=1.19.4
|
||||
mapping_version=1.19.2
|
||||
|
||||
|
||||
## Mod Properties
|
||||
|
@ -48,7 +48,7 @@ mod_name=String Tools
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=GNU GPLv3
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=1.0.0-1.19.4
|
||||
mod_version=1.0.0-1.19.2
|
||||
# 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
|
||||
|
|
|
@ -2,9 +2,7 @@ package me.daviddgtnt.stringtools;
|
|||
|
||||
import net.minecraft.world.item.*;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.CreativeModeTabEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
|
@ -19,12 +17,12 @@ public class Main
|
|||
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
|
||||
public static final RegistryObject<Item> STRING_STICK = ITEMS.register("string_stick", () -> new Item(new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_SWORD = ITEMS.register("string_sword", () -> new SwordItem(StringToolMaterial.INSTANCE, 4, 1.6F, new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_PICKAXE = ITEMS.register("string_pickaxe", () -> new PickaxeItem(StringToolMaterial.INSTANCE, 2, 2.4F, new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_AXE = ITEMS.register("string_axe", () -> new AxeItem(StringToolMaterial.INSTANCE, 7.0F, 0.8F, new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_SHOVEL = ITEMS.register("string_shovel", () -> new ShovelItem(StringToolMaterial.INSTANCE, 2.5F, 1.0F, new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_HOE = ITEMS.register("string_hoe", () -> new HoeItem(StringToolMaterial.INSTANCE, 1, 1.0F, new Item.Properties()));
|
||||
public static final RegistryObject<Item> STRING_STICK = ITEMS.register("string_stick", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||
public static final RegistryObject<Item> STRING_SWORD = ITEMS.register("string_sword", () -> new SwordItem(StringToolMaterial.INSTANCE, 4, 1.6F, new Item.Properties().tab(CreativeModeTab.TAB_COMBAT)));
|
||||
public static final RegistryObject<Item> STRING_PICKAXE = ITEMS.register("string_pickaxe", () -> new PickaxeItem(StringToolMaterial.INSTANCE, 2, 2.4F, new Item.Properties().tab(CreativeModeTab.TAB_TOOLS)));
|
||||
public static final RegistryObject<Item> STRING_AXE = ITEMS.register("string_axe", () -> new AxeItem(StringToolMaterial.INSTANCE, 7.0F, 0.8F, new Item.Properties().tab(CreativeModeTab.TAB_TOOLS)));
|
||||
public static final RegistryObject<Item> STRING_SHOVEL = ITEMS.register("string_shovel", () -> new ShovelItem(StringToolMaterial.INSTANCE, 2.5F, 1.0F, new Item.Properties().tab(CreativeModeTab.TAB_TOOLS)));
|
||||
public static final RegistryObject<Item> STRING_HOE = ITEMS.register("string_hoe", () -> new HoeItem(StringToolMaterial.INSTANCE, 1, 1.0F, new Item.Properties().tab(CreativeModeTab.TAB_TOOLS)));
|
||||
|
||||
public Main()
|
||||
{
|
||||
|
@ -33,25 +31,7 @@ public class Main
|
|||
// Register the Deferred Register to the mod event bus so items get registered
|
||||
ITEMS.register(modEventBus);
|
||||
|
||||
modEventBus.addListener(this::buildContents);
|
||||
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void buildContents(CreativeModeTabEvent.BuildContents event) {
|
||||
if (event.getTab() == CreativeModeTabs.INGREDIENTS) {
|
||||
event.accept(STRING_STICK);
|
||||
}
|
||||
if (event.getTab() == CreativeModeTabs.COMBAT) {
|
||||
event.accept(STRING_SWORD);
|
||||
event.accept(STRING_AXE);
|
||||
}
|
||||
if (event.getTab() == CreativeModeTabs.TOOLS_AND_UTILITIES) {
|
||||
event.accept(STRING_PICKAXE);
|
||||
event.accept(STRING_AXE);
|
||||
event.accept(STRING_SHOVEL);
|
||||
event.accept(STRING_HOE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
"pack": {
|
||||
"description": {
|
||||
"text": "${mod_id} resources"
|
||||
},
|
||||
"forge:server_data_pack_format": 12,
|
||||
"pack_format": 13
|
||||
}
|
||||
}
|
||||
"pack": {
|
||||
"description": "${mod_id} resources",
|
||||
"pack_format": 9,
|
||||
"forge:resource_pack_format": 9,
|
||||
"forge:data_pack_format": 10
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue