-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from VazkiiMods/1.20
1.20
- Loading branch information
Showing
21 changed files
with
244 additions
and
229 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 @@ | ||
# AkashicTome | ||
The book of books. | ||
|
||
This mod requires [AutoRegLib](https://github.com/Vazkii/AutoRegLib). | ||
The book of books. |
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,12 +1,11 @@ | ||
#Mon Aug 05 18:32:28 UTC 2024 | ||
mapping_channel=official | ||
forge_version=43.1.52 | ||
mapping_channel=parchment | ||
forge_version=47.2.0 | ||
mod_id=akashictome | ||
dir_repo=./ | ||
build_number=27 | ||
arl_version=1.8.2-56.125 | ||
dir_output=../Build Output/AkashicTome/ | ||
mapping_version=1.19.2 | ||
version=1.6 | ||
mapping_version=2023.09.03-1.20.1 | ||
version=1.7 | ||
mod_name=AkashicTome | ||
mc_version=1.19.2 | ||
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,10 @@ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
package vazkii.akashictome; | ||
|
||
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.akashictome.network.MessageMorphTome; | ||
import vazkii.akashictome.network.MessageUnmorphTome; | ||
import vazkii.akashictome.network.NetworkHandler; | ||
import vazkii.akashictome.proxy.ClientProxy; | ||
import vazkii.akashictome.proxy.CommonProxy; | ||
import vazkii.arl.network.IMessage; | ||
import vazkii.arl.network.NetworkHandler; | ||
|
||
@Mod(AkashicTome.MOD_ID) | ||
public class AkashicTome { | ||
|
||
public static final String MOD_ID = "akashictome"; | ||
public static NetworkHandler NETWORKHANDLER; | ||
public static CommonProxy proxy; | ||
|
||
public AkashicTome() { | ||
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); | ||
} | ||
|
||
public void commonSetup(FMLCommonSetupEvent event) { | ||
NETWORKHANDLER.register(MessageMorphTome.class, NetworkDirection.PLAY_TO_SERVER); | ||
NETWORKHANDLER.register(MessageUnmorphTome.class, NetworkDirection.PLAY_TO_SERVER); | ||
NetworkHandler.register(); | ||
} | ||
|
||
public static void sendToServer(IMessage msg) { | ||
NETWORKHANDLER.sendToServer(msg); | ||
private void addToCreativeTab(BuildCreativeModeTabContentsEvent event) { | ||
if (event.getTabKey() == CreativeModeTabs.TOOLS_AND_UTILITIES) { | ||
event.accept(Registries.TOME); | ||
} | ||
} | ||
|
||
} |
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
Oops, something went wrong.