forked from modmuss50/SimpleVoidWorld
-
Notifications
You must be signed in to change notification settings - Fork 0
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
10 changed files
with
314 additions
and
303 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
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,63 +1,62 @@ | ||
package me.modmuss50.svw; | ||
|
||
import me.modmuss50.svw.blocks.BlockPortal; | ||
import me.modmuss50.svw.proxy.ClientProxy; | ||
import me.modmuss50.svw.proxy.CommonProxy; | ||
import me.modmuss50.svw.world.VoidWorldProvider; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemBlock; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.world.DimensionType; | ||
import net.minecraftforge.common.DimensionManager; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.common.SidedProxy; | ||
import net.minecraftforge.fml.common.event.FMLInitializationEvent; | ||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; | ||
import reborncore.RebornRegistry; | ||
import reborncore.common.util.CraftingHelper; | ||
|
||
@Mod(modid = "simplevoidworld", name = "SimpleVoidWorld", version = "@MODVERSION@", dependencies = "required-after:reborncore") | ||
public class SimpleVoidWorld { | ||
|
||
public static Block portal; | ||
public static VoidTab creativeTab; | ||
|
||
@SidedProxy(clientSide = "me.modmuss50.svw.proxy.ClientProxy", serverSide = "me.modmuss50.svw.proxy.CommonProxy") | ||
public static CommonProxy proxy; | ||
public static DimensionType type; | ||
|
||
@Mod.EventHandler | ||
public void preInit(FMLPreInitializationEvent event){ | ||
Config.load(event.getSuggestedConfigurationFile()); | ||
|
||
creativeTab = new VoidTab(); | ||
portal = new BlockPortal(); | ||
RebornRegistry.registerBlock(portal, "simplevoidworld:portal"); | ||
|
||
proxy.init(); | ||
|
||
type = DimensionType.register("simplevoidworld", "void", Config.dimID, VoidWorldProvider.class, false); | ||
DimensionManager.registerDimension(Config.dimID, type); | ||
} | ||
|
||
@Mod.EventHandler | ||
public void init(FMLInitializationEvent event) { | ||
CraftingHelper.addShapedOreRecipe(new ItemStack(portal), "OEO", "EDE", "OEO", 'O', | ||
Blocks.OBSIDIAN, 'E', Items.ENDER_EYE, 'D', Blocks.DIAMOND_BLOCK); | ||
} | ||
|
||
public static class VoidTab extends CreativeTabs { | ||
|
||
public VoidTab() { | ||
super("simplevoidworld.creative.tab"); | ||
} | ||
|
||
@Override | ||
public Item getTabIconItem() { | ||
return Item.getItemFromBlock(portal); | ||
} | ||
} | ||
import net.minecraftforge.fml.common.registry.GameRegistry; | ||
|
||
@Mod(modid = SimpleVoidWorld.MOD_ID, name = "SimpleVoidWorld", version = "@MODVERSION@") | ||
public class SimpleVoidWorld | ||
{ | ||
public static BlockPortal portal; | ||
|
||
public static final String MOD_ID = "simplevoidworld"; | ||
|
||
@SidedProxy(clientSide = "me.modmuss50.svw.proxy.ClientProxy", serverSide = "me.modmuss50.svw.proxy.CommonProxy") | ||
public static CommonProxy proxy; | ||
public static DimensionType type; | ||
|
||
@Mod.EventHandler | ||
public void preInit(FMLPreInitializationEvent event) | ||
{ | ||
Config.load(event.getSuggestedConfigurationFile()); | ||
|
||
portal = new BlockPortal(); | ||
this.RegisterBlock(portal); | ||
|
||
proxy.init(); | ||
|
||
type = DimensionType.register(MOD_ID, "void", Config.dimID, VoidWorldProvider.class, false); | ||
DimensionManager.registerDimension(Config.dimID, type); | ||
} | ||
|
||
@Mod.EventHandler | ||
public void init(FMLInitializationEvent event) | ||
{ | ||
GameRegistry.addShapedRecipe(new ItemStack(portal), | ||
"OEO", | ||
"EDE", | ||
"OEO", | ||
|
||
'O', Blocks.OBSIDIAN, | ||
'E', Items.ENDER_EYE, | ||
'D', Blocks.DIAMOND_BLOCK); | ||
} | ||
|
||
public void RegisterBlock(Block block) | ||
{ | ||
GameRegistry.register(block); | ||
GameRegistry.register(new ItemBlock(block), block.getRegistryName()); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
package me.modmuss50.svw.proxy; | ||
|
||
/** | ||
* Created by modmuss50 on 02/12/16. | ||
*/ | ||
public class CommonProxy { | ||
|
||
public void init(){ | ||
|
||
} | ||
public class CommonProxy | ||
{ | ||
public void init() | ||
{ | ||
|
||
} | ||
} |
Oops, something went wrong.