diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3b38b45..9c4e983 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,9 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1781711682567 + + + + + \ No newline at end of file diff --git a/src/net/minecraft/src/Block.java b/src/net/minecraft/src/Block.java index 3561683..204489e 100644 --- a/src/net/minecraft/src/Block.java +++ b/src/net/minecraft/src/Block.java @@ -2,6 +2,7 @@ package net.minecraft.src; import java.util.List; import java.util.Random; +import net.minecraft.src.mml.BlockLoader; public class Block { private CreativeTabs displayOnCreativeTab; @@ -181,6 +182,10 @@ public class Block { public static final Block stairsNetherQuartz = (new BlockStairs(156, blockNetherQuartz, 0)).setUnlocalizedName("stairsQuartz"); public static final Block railActivator = (new BlockRailPowered(157)).setHardness(0.7F).setStepSound(soundMetalFootstep).setUnlocalizedName("activatorRail"); public static final Block dropper = (new BlockDropper(158)).setHardness(3.5F).setStepSound(soundStoneFootstep).setUnlocalizedName("dropper"); + + public static BlockLoader Loader = new BlockLoader(); + + public final int blockID; protected float blockHardness; protected float blockResistance; @@ -201,7 +206,7 @@ public class Block { private String unlocalizedName; protected Icon blockIcon; - protected Block(int var1, Material var2) { + public Block(int var1, Material var2) { if(blocksList[var1] != null) { throw new IllegalArgumentException("Slot " + var1 + " is already occupied by " + blocksList[var1] + " when adding " + this); } else { diff --git a/src/net/minecraft/src/mml/BlockLoader.java b/src/net/minecraft/src/mml/BlockLoader.java new file mode 100644 index 0000000..2f0eb97 --- /dev/null +++ b/src/net/minecraft/src/mml/BlockLoader.java @@ -0,0 +1,15 @@ +package net.minecraft.src.mml; + +import net.minecraft.src.Block; +import net.minecraft.src.CreativeTabs; +import net.minecraft.src.Material; + +public class BlockLoader { + public Block registerBlock(int BlockID, Material material, String unlocalizedName) { + Block InternalBlock = (new Block(BlockID, material)); + InternalBlock.setCreativeTab(CreativeTabs.tabBlock); + InternalBlock.setUnlocalizedName(unlocalizedName); + return InternalBlock; + } + +}