Skip to content

Commit

Permalink
feat(version): ported to mc 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
D4RKAR117 committed Jun 14, 2024
1 parent 03c4300 commit 17db961
Show file tree
Hide file tree
Showing 64 changed files with 1,170 additions and 957 deletions.
2 changes: 1 addition & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ neogradle.subsystems.devLogin.enabled=true
# Environment Properties
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
# The Minecraft version must agree with the Neo version to get a valid artifact
minecraft_version=1.20.6
minecraft_version=1.21
# 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.20.6,1.21)
minecraft_version_range=[1.21.0,1.22)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=20.6.115
neo_version=21.0.6-beta
# The Neo version range can use any version of Neo as bounds
neo_version_range=[20.6,)
neo_version_range=[21.0.0-beta,)
# The loader version range can only use the major version of FML as bounds
loader_version_range=[2,)
loader_version_range=[4,)

## Mod Properties

Expand All @@ -36,7 +36,7 @@ mod_name=Cog Works Engineering
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=PolyFormPerimeter-1.0
# The mod version. See https://semver.org/
mod_version=0.6.0
mod_version=0.7.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
Expand All @@ -49,5 +49,5 @@ mod_description=Elevate your Minecraft experience with Cog Works Engineering, a
## Dependencies

# Gecko Lib
gecko_lib_version=4.5.3
gecko_lib_version_range=[4.5.3,)
gecko_lib_version=4.5.5
gecko_lib_version_range=[4.5.5,)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.6 2024-05-21T19:25:09.0198765 Registries
// 1.21 2024-06-14T16:49:27.9419898 Registries
adcf5416695709d219ce4d7b4f0d1a94c5a92660 data/cog_works/neoforge/biome_modifier/add_bauxite_ore.json
2328028e3096181713afde51f1b8e89b5451da2d data/cog_works/neoforge/biome_modifier/add_beryllium_ore.json
a5a60db791361deb2d92496d42ccaff99ae3aad3 data/cog_works/neoforge/biome_modifier/add_cadmium_ore.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// 1.20.6 2024-05-21T19:25:09.0183766 Tags for minecraft:block mod id cog_works
1a6573827671e3b60d4bd14599a5d96c8563dea4 data/c/tags/blocks/ores.json
8e78287246125b0e18a4f086e00f37fc8298ae00 data/c/tags/blocks/ores/bauxite.json
11945b728eda841b521980d792506977f8dbf17c data/c/tags/blocks/ores/beryllium.json
396e65747bfbe9848f20769e5d38f6d6bf84bbb9 data/c/tags/blocks/ores/cadmium.json
f04e22f9c2f5c29fc0cc8699adb7f0acd81dc3dd data/c/tags/blocks/ores/chromium.json
49280ece99a4c033b7b2592e7caaf4a5fcd52b8f data/c/tags/blocks/ores/cobalt.json
005adf3e8dd399322ebfa268dd0456c8e3fa7e2f data/c/tags/blocks/ores/graphite.json
3c034f3c93e22ad55a8a866c121b3842ce2faec2 data/c/tags/blocks/ores/iridium.json
ffd6d649f2a2d1802403a3e37a1d8b13675ba556 data/c/tags/blocks/ores/lithium.json
bf66cc2d3e867ce1d51ede15360e8c198462eff4 data/c/tags/blocks/ores/manganese.json
32103ef4930c1b109015d7935915b3e1395ca3ec data/c/tags/blocks/ores/molybdenum.json
2a308644fd36140101992c68bb57fcb95b613e98 data/c/tags/blocks/ores/nickel.json
09161043b33d44b42b9077c21e350b9899db271a data/c/tags/blocks/ores/osmium.json
2a258de4ef8ad588238b3efd22b580e5477b922d data/c/tags/blocks/ores/palladium.json
d3b67ae304dff1fb62d7e632ec75032c7c782f7e data/c/tags/blocks/ores/platinum.json
a8510c24f9b54ea46af72a7399de3ff8760a7d1e data/c/tags/blocks/ores/thorium.json
9f9d51638d1ea8f13ea7fbd36206eb7237cc5702 data/c/tags/blocks/ores/titanium.json
df7a2272e210bac05c0b10236534f1eca9df90c4 data/c/tags/blocks/ores/tungsten.json
e969c8e005ba656c14fda7b1210e549a8dcbdcd1 data/c/tags/blocks/ores/uranium.json
ed0917989c8fd94ba75bc921f5f99e2e5686efb9 data/c/tags/blocks/ores/vanadium.json
47e3c5be8aa6bc35900fc081ac0cc19bfeaabe78 data/c/tags/blocks/ores/zinc.json
95b15bada0ff3c70f5531af5624fc1290a96caaf data/minecraft/tags/blocks/mineable/pickaxe.json
0588128a1c4b038372348beb255961e587767064 data/minecraft/tags/blocks/needs_diamond_tool.json
2ef2283a7b8467e0556eeaeb65a99432d3618cf4 data/minecraft/tags/blocks/needs_iron_tool.json
// 1.21 2024-06-14T16:49:27.9379848 Tags for minecraft:block mod id cog_works
1a6573827671e3b60d4bd14599a5d96c8563dea4 data/c/tags/block/ores.json
8e78287246125b0e18a4f086e00f37fc8298ae00 data/c/tags/block/ores/bauxite.json
11945b728eda841b521980d792506977f8dbf17c data/c/tags/block/ores/beryllium.json
396e65747bfbe9848f20769e5d38f6d6bf84bbb9 data/c/tags/block/ores/cadmium.json
f04e22f9c2f5c29fc0cc8699adb7f0acd81dc3dd data/c/tags/block/ores/chromium.json
49280ece99a4c033b7b2592e7caaf4a5fcd52b8f data/c/tags/block/ores/cobalt.json
005adf3e8dd399322ebfa268dd0456c8e3fa7e2f data/c/tags/block/ores/graphite.json
3c034f3c93e22ad55a8a866c121b3842ce2faec2 data/c/tags/block/ores/iridium.json
ffd6d649f2a2d1802403a3e37a1d8b13675ba556 data/c/tags/block/ores/lithium.json
bf66cc2d3e867ce1d51ede15360e8c198462eff4 data/c/tags/block/ores/manganese.json
32103ef4930c1b109015d7935915b3e1395ca3ec data/c/tags/block/ores/molybdenum.json
2a308644fd36140101992c68bb57fcb95b613e98 data/c/tags/block/ores/nickel.json
09161043b33d44b42b9077c21e350b9899db271a data/c/tags/block/ores/osmium.json
2a258de4ef8ad588238b3efd22b580e5477b922d data/c/tags/block/ores/palladium.json
d3b67ae304dff1fb62d7e632ec75032c7c782f7e data/c/tags/block/ores/platinum.json
a8510c24f9b54ea46af72a7399de3ff8760a7d1e data/c/tags/block/ores/thorium.json
9f9d51638d1ea8f13ea7fbd36206eb7237cc5702 data/c/tags/block/ores/titanium.json
df7a2272e210bac05c0b10236534f1eca9df90c4 data/c/tags/block/ores/tungsten.json
e969c8e005ba656c14fda7b1210e549a8dcbdcd1 data/c/tags/block/ores/uranium.json
ed0917989c8fd94ba75bc921f5f99e2e5686efb9 data/c/tags/block/ores/vanadium.json
47e3c5be8aa6bc35900fc081ac0cc19bfeaabe78 data/c/tags/block/ores/zinc.json
95b15bada0ff3c70f5531af5624fc1290a96caaf data/minecraft/tags/block/mineable/pickaxe.json
0588128a1c4b038372348beb255961e587767064 data/minecraft/tags/block/needs_diamond_tool.json
2ef2283a7b8467e0556eeaeb65a99432d3618cf4 data/minecraft/tags/block/needs_iron_tool.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.6 2024-06-11T22:02:13.0378519 Tags for minecraft:item mod id cog_works
d92b976ae5e58ba810f8ab1f7a719a88ef218561 data/c/tags/items/tools.json
// 1.21 2024-06-14T16:49:27.9429889 Tags for minecraft:item mod id cog_works
d92b976ae5e58ba810f8ab1f7a719a88ef218561 data/c/tags/item/tools.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.6 2024-06-11T21:57:40.7538125 Languages: en_us for mod: cog_works
// 1.21 2024-06-14T16:49:27.9434926 Languages: en_us for mod: cog_works
939731dd39bf3448355f6e123ca0ff8ad03fa8d7 assets/cog_works/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.6 2024-05-21T19:34:44.7612577 Block States: cog_works
// 1.21 2024-06-14T16:49:27.938989 Block States: cog_works
350fd53949bfccc9cfb17e29adbfe32403fb4939 assets/cog_works/blockstates/bauxite_ore.json
e51ca31dc1f38be3f3b26a2459d64999a3b05818 assets/cog_works/blockstates/beryllium_ore.json
8377d58378ecf121fea543fbfc414d9082c0391f assets/cog_works/blockstates/cadmium_ore.json
Expand Down
95 changes: 50 additions & 45 deletions src/main/java/org/darkar/cog_works/CogWorks.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,57 @@

// The value here should match an entry in the META-INF/neoforge.mods.toml file
@Mod(CogWorks.MOD_ID)
public class CogWorks
{
// Define mod id in a common place for everything to reference
public static final String MOD_ID = "cog_works";
// Directly reference a slf4j logger
public static final Logger LOGGER = LogUtils.getLogger();

public class CogWorks {
// Define mod id in a common place for everything to reference
public static final String MOD_ID = "cog_works";
// Directly reference a slf4j logger
public static final Logger LOGGER = LogUtils.getLogger();

@SuppressWarnings("OptionalGetWithoutIsPresent")
public static final String VERSION = ModList.get().getModContainerById(MOD_ID).get().getModInfo().getVersion().toString();



// The constructor for the mod class is the first code that is run when your mod is loaded.
// FML will recognize some parameter types like IEventBus or ModContainer and pass them in automatically.
public CogWorks(IEventBus modEventBus, ModContainer modContainer)
{
// Register the commonSetup method for modloading
modEventBus.addListener(this::commonSetup);
public static final String VERSION = ModList
.get()
.getModContainerById(MOD_ID)
.get()
.getModInfo()
.getVersion()
.toString();


// The constructor for the mod class is the first code that is run when your mod is loaded.
// FML will recognize some parameter types like IEventBus or ModContainer and pass them in automatically.
public CogWorks(IEventBus modEventBus, ModContainer modContainer)
{
// Register the commonSetup method for modloading
modEventBus.addListener(this::commonSetup);

// Initialize Network Handling
modEventBus.addListener(NetworkHandler::onPayloadHandlersRegister);

// Initialize mod registries
Registry.initialize(modEventBus);

// Register ourselves for server and other game events we are interested in.
// Note that this is necessary if and only if we want *this* class (CogWorks) to respond directly to events.
// Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like onServerStarting() below.
NeoForge.EVENT_BUS.register(this);

// Register our mod's ModConfigSpec so that FML can create and load the config file for us
//modContainer.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
}

private void commonSetup(final FMLCommonSetupEvent event)
{
// Some common setup code
LOGGER.info("[Cog Works]: HELLO FROM COMMON SETUP");
}


// You can use SubscribeEvent and let the Event Bus discover methods to call
@SubscribeEvent
public void onServerStarting(ServerStartingEvent event)
{
// Do something when the server starts
LOGGER.info("[Cog Works]: HELLO from server starting");
}
modEventBus.addListener(NetworkHandler::onPayloadHandlersRegister);

// Initialize mod registries
Registry.initialize(modEventBus);

// Register ourselves for server and other game events we are interested in.
// Note that this is necessary if and only if we want *this* class (CogWorks) to respond directly to events.
// Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like
// onServerStarting() below.
NeoForge.EVENT_BUS.register(this);

// Register our mod's ModConfigSpec so that FML can create and load the config file for us
//modContainer.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
}

private void commonSetup(final FMLCommonSetupEvent event)
{
// Some common setup code
LOGGER.info("[Cog Works]: HELLO FROM COMMON SETUP");
}


// You can use SubscribeEvent and let the Event Bus discover methods to call
@SubscribeEvent
public void onServerStarting(ServerStartingEvent event)
{
// Do something when the server starts
LOGGER.info("[Cog Works]: HELLO from server starting");
}
}
7 changes: 5 additions & 2 deletions src/main/java/org/darkar/cog_works/CogWorksClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@

@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT, modid = CogWorks.MOD_ID)
public class CogWorksClient {

@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event)
{
// Some client setup code
LOGGER.info("[Cog Works]: HELLO FROM CLIENT SETUP");
LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
LOGGER.info("MINECRAFT NAME >> {}", Minecraft
.getInstance()
.getUser()
.getName());
}
}
Loading

0 comments on commit 17db961

Please sign in to comment.