-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix typo in project name, fix config, build 0.1.2
- Loading branch information
1 parent
d2506c3
commit 06b9f18
Showing
102 changed files
with
324 additions
and
287 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
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
86 changes: 86 additions & 0 deletions
86
src/main/java/knightminer/tcomplement/TinkersComplement.java
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,86 @@ | ||
package knightminer.tcomplement; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import knightminer.tcomplement.common.Config; | ||
import knightminer.tcomplement.common.TCompNetwork; | ||
import knightminer.tcomplement.feature.ModuleFeature; | ||
import knightminer.tcomplement.plugin.ceramics.CeramicsPlugin; | ||
import knightminer.tcomplement.plugin.exnihilo.ExNihiloPlugin; | ||
import knightminer.tcomplement.shared.ModuleCommons; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.event.FMLMissingMappingsEvent; | ||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||
import net.minecraftforge.fml.common.network.NetworkRegistry; | ||
import slimeknights.mantle.common.GuiHandler; | ||
import slimeknights.mantle.pulsar.control.PulseManager; | ||
|
||
@Mod( | ||
modid = TinkersComplement.modID, | ||
name = TinkersComplement.modName, | ||
version = TinkersComplement.modVersion, | ||
dependencies = "required-after:forge;" | ||
+ "required-after:mantle;" | ||
+ "required-after:tconstruct;" | ||
+ "after:exnihiloadscensio", | ||
acceptedMinecraftVersions = "[1.11.2, 1.12)") | ||
public class TinkersComplement { | ||
public static final String modID = "tcomplement"; | ||
public static final String modVersion = "${version}"; | ||
public static final String modName = "Tinkers' Complement"; | ||
|
||
public static final Logger log = LogManager.getLogger(modID); | ||
|
||
@Mod.Instance(modID) | ||
public static TinkersComplement instance; | ||
|
||
public static PulseManager pulseManager = new PulseManager(Config.pulseConfig); | ||
public static GuiHandler guiHandler = new GuiHandler(); | ||
|
||
static { | ||
pulseManager.registerPulse(new ModuleCommons()); | ||
pulseManager.registerPulse(new ModuleFeature()); | ||
pulseManager.registerPulse(new ExNihiloPlugin()); | ||
pulseManager.registerPulse(new CeramicsPlugin()); | ||
} | ||
|
||
@Mod.EventHandler | ||
public void preInit(FMLPreInitializationEvent event) { | ||
Config.load(event); | ||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, guiHandler); | ||
|
||
TCompNetwork.instance.setup(); | ||
} | ||
|
||
// Old version compatibility | ||
@Mod.EventHandler | ||
public void onMissingMapping(FMLMissingMappingsEvent event) { | ||
// TODO: safe to remove when I update to 1.12 | ||
// thanks to /u/Thiakil on reddit for this code | ||
for (FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()){ | ||
if (mapping.resourceLocation.getResourceDomain().equals( "tcompliment" )){ | ||
ResourceLocation newLoc = new ResourceLocation( modID, mapping.resourceLocation.getResourcePath() ); | ||
switch( mapping.type ){ | ||
case ITEM: | ||
Item newItem = Item.REGISTRY.getObject( newLoc ); | ||
if (newItem != null) | ||
mapping.remap( newItem ); | ||
else | ||
mapping.warn(); | ||
break; | ||
case BLOCK: | ||
Block newBlock = Block.REGISTRY.getObject( newLoc ); | ||
if (newBlock != null && newBlock != Blocks.AIR) | ||
mapping.remap( newBlock ); | ||
else | ||
mapping.warn(); | ||
} | ||
} | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...miner/tcompliment/common/ClientProxy.java → ...miner/tcomplement/common/ClientProxy.java
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
2 changes: 1 addition & 1 deletion
2
...miner/tcompliment/common/CommonProxy.java → ...miner/tcomplement/common/CommonProxy.java
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
4 changes: 2 additions & 2 deletions
4
...nightminer/tcompliment/common/Config.java → ...nightminer/tcomplement/common/Config.java
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
2 changes: 1 addition & 1 deletion
2
...nightminer/tcompliment/common/ModIds.java → ...nightminer/tcomplement/common/ModIds.java
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
8 changes: 4 additions & 4 deletions
8
...ompliment/feature/FeatureClientProxy.java → ...omplement/feature/FeatureClientProxy.java
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
4 changes: 2 additions & 2 deletions
4
...liment/feature/PartMaterialBlacklist.java → ...lement/feature/PartMaterialBlacklist.java
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
4 changes: 2 additions & 2 deletions
4
...liment/feature/client/MelterRenderer.java → ...lement/feature/client/MelterRenderer.java
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
4 changes: 2 additions & 2 deletions
4
...nt/feature/inventory/ContainerMelter.java → ...nt/feature/inventory/ContainerMelter.java
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
6 changes: 3 additions & 3 deletions
6
.../feature/multiblock/MultiblockMelter.java → .../feature/multiblock/MultiblockMelter.java
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
4 changes: 2 additions & 2 deletions
4
...nt/feature/network/FluidUpdatePacket.java → ...nt/feature/network/FluidUpdatePacket.java
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.