-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
158 additions
and
141 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# Morphing-tool | ||
The wrench to end all wrenches. | ||
|
||
This mod requires [AutoRegLib](https://github.com/Vazkii/AutoRegLib). | ||
The wrench to end all wrenches. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#Fri Feb 02 20:11:36 UTC 2024 | ||
mapping_channel=official | ||
mapping_channel=parchment | ||
forge_version=47.1.3 | ||
mod_id=morphtool | ||
dir_repo=./ | ||
build_number=36 | ||
dir_output=../Build Output/Morphtool/ | ||
mapping_version=1.20.1 | ||
mapping_version=2023.09.03-1.20.1 | ||
version=1.7 | ||
mod_name=Morph-o-Tool | ||
mc_version=1.20.1 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
jcenter() | ||
mavenCentral() | ||
maven { url = 'https://maven.minecraftforge.net/' } | ||
maven { url = 'https://maven.parchmentmc.org' } | ||
maven { url = "https://repo.spongepowered.org/repository/maven-public/" } | ||
} | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,45 @@ | ||
package vazkii.morphtool; | ||
|
||
import net.minecraft.world.item.CreativeModeTabs; | ||
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent; | ||
import net.minecraftforge.eventbus.api.IEventBus; | ||
import net.minecraftforge.fml.DistExecutor; | ||
import net.minecraftforge.fml.ModLoadingContext; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.config.ModConfig; | ||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; | ||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; | ||
import net.minecraftforge.network.NetworkDirection; | ||
import vazkii.arl.network.NetworkHandler; | ||
import vazkii.morphtool.network.MessageMorphTool; | ||
import vazkii.morphtool.network.NetworkHandler; | ||
import vazkii.morphtool.proxy.ClientProxy; | ||
import vazkii.morphtool.proxy.CommonProxy; | ||
|
||
@Mod(MorphTool.MOD_ID) | ||
public class MorphTool { | ||
|
||
public static final String MOD_ID = "morphtool"; | ||
public static NetworkHandler NETWORKHANDLER; | ||
public static CommonProxy proxy; | ||
|
||
public MorphTool() { | ||
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); | ||
bus.addListener(this::commonSetup); | ||
bus.register(ModItems.class); | ||
|
||
|
||
Registries.ITEMS.register(bus); | ||
Registries.SERIALIZERS.register(bus); | ||
|
||
bus.addListener(this::addToCreativeTab); | ||
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ConfigHandler.CONFIG_SPEC); | ||
|
||
proxy = DistExecutor.runForDist(() -> ClientProxy::new, () -> CommonProxy::new); | ||
proxy = DistExecutor.safeRunForDist(() -> ClientProxy::new, () -> CommonProxy::new); | ||
proxy.preInit(); | ||
} | ||
|
||
NETWORKHANDLER = new NetworkHandler(MOD_ID, 1); | ||
private void commonSetup(FMLCommonSetupEvent event) { | ||
NetworkHandler.register(); | ||
} | ||
|
||
public void commonSetup(FMLCommonSetupEvent event) { | ||
NETWORKHANDLER.register(MessageMorphTool.class, NetworkDirection.PLAY_TO_SERVER); | ||
private void addToCreativeTab(BuildCreativeModeTabContentsEvent event) { | ||
if (event.getTabKey() == CreativeModeTabs.TOOLS_AND_UTILITIES) { | ||
event.accept(Registries.MORPH_TOOL); | ||
} | ||
} | ||
|
||
} |
This file contains 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
Oops, something went wrong.