use of mcjty.rftools.playerprops.BuffProperties in project RFTools by McJty.
the class CommonProxy method preInit.
public void preInit(FMLPreInitializationEvent e) {
MinecraftForge.EVENT_BUS.register(new ForgeEventHandlers());
McJtyLib.preInit(e);
CommandHandler.registerCommands();
reflect();
GeneralConfig.preInit(e);
modConfigDir = e.getModConfigurationDirectory();
mainConfig = new Configuration(new File(modConfigDir.getPath() + File.separator + "rftools", "rftools.cfg"));
CapabilityManager.INSTANCE.register(BuffProperties.class, new Capability.IStorage<BuffProperties>() {
@Override
public NBTBase writeNBT(Capability<BuffProperties> capability, BuffProperties instance, EnumFacing side) {
throw new UnsupportedOperationException();
}
@Override
public void readNBT(Capability<BuffProperties> capability, BuffProperties instance, EnumFacing side, NBTBase nbt) {
throw new UnsupportedOperationException();
}
}, () -> {
throw new UnsupportedOperationException();
});
CapabilityManager.INSTANCE.register(FavoriteDestinationsProperties.class, new Capability.IStorage<FavoriteDestinationsProperties>() {
@Override
public NBTBase writeNBT(Capability<FavoriteDestinationsProperties> capability, FavoriteDestinationsProperties instance, EnumFacing side) {
throw new UnsupportedOperationException();
}
@Override
public void readNBT(Capability<FavoriteDestinationsProperties> capability, FavoriteDestinationsProperties instance, EnumFacing side, NBTBase nbt) {
throw new UnsupportedOperationException();
}
}, () -> {
throw new UnsupportedOperationException();
});
CapabilityManager.INSTANCE.register(IModuleProvider.class, new Capability.IStorage<IModuleProvider>() {
@Override
public NBTBase writeNBT(Capability<IModuleProvider> capability, IModuleProvider instance, EnumFacing side) {
throw new UnsupportedOperationException();
}
@Override
public void readNBT(Capability<IModuleProvider> capability, IModuleProvider instance, EnumFacing side, NBTBase nbt) {
throw new UnsupportedOperationException();
}
}, () -> {
throw new UnsupportedOperationException();
});
readMainConfig();
SimpleNetworkWrapper network = PacketHandler.registerMessages(RFTools.MODID, "rftools");
RFToolsMessages.registerNetworkMessages(network);
ModItems.init();
ModBlocks.init();
ModWorldgen.init();
RFTools.screenModuleRegistry.registerBuiltins();
ForgeChunkManager.setForcedChunkLoadingCallback(RFTools.instance, (tickets, world) -> {
});
}
Aggregations