forked from TAIGA/TAIGA
general code cleanup
This commit is contained in:
@@ -20,6 +20,7 @@ repositories {
|
||||
name = "chickenbones"
|
||||
url = "http://chickenbones.net/maven/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name 'DVS1 Maven FS'
|
||||
url 'http://dvs1.progwml6.com/files/maven'
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockAardiumOre extends BasicBlockOre {
|
||||
|
||||
public BlockAardiumOre() {
|
||||
super("aardium_ore", Material.ROCK, 55.0f, 400.0f, 3 );
|
||||
super("aardium_ore", Material.ROCK, 55.0f, 400.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockAdamantiteOre extends BasicBlockOre {
|
||||
|
||||
public BlockAdamantiteOre() {
|
||||
super("adamantite_ore", Material.ROCK, 80.0f, 1000.0f,4);
|
||||
super("adamantite_ore", Material.ROCK, 80.0f, 1000.0f, 4);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockArcaniteOre extends BasicBlockOre {
|
||||
|
||||
public BlockArcaniteOre() {
|
||||
super("arcanite_ore", Material.ROCK, 23.0f, 25.0f,2);
|
||||
super("arcanite_ore", Material.ROCK, 23.0f, 25.0f, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockAxiidianOre extends BasicBlockOre {
|
||||
|
||||
public BlockAxiidianOre() {
|
||||
super("axiidian_ore", Material.ROCK, 13.0f, 13.0f,3);
|
||||
super("axiidian_ore", Material.ROCK, 13.0f, 13.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockBasalt extends BasicBlockOre {
|
||||
|
||||
public BlockBasalt() {
|
||||
super("basalt", Material.ROCK, 35.0f, 35.0f,3);
|
||||
super("basalt", Material.ROCK, 35.0f, 35.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockBismuthOre extends BasicBlockOre {
|
||||
|
||||
public BlockBismuthOre() {
|
||||
super("bismuth_ore", Material.ROCK, 8.0f, 8.0f,1);
|
||||
super("bismuth_ore", Material.ROCK, 8.0f, 8.0f, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockEterniteOre extends BasicBlockOre {
|
||||
|
||||
public BlockEterniteOre() {
|
||||
super("eternite_ore", Material.ROCK, 24.0f, 25.0f,3);
|
||||
super("eternite_ore", Material.ROCK, 24.0f, 25.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockIgnititeOre extends BasicBlockOre {
|
||||
|
||||
public BlockIgnititeOre() {
|
||||
super("ignitite_ore", Material.ROCK, 23.0f, 25.0f,3);
|
||||
super("ignitite_ore", Material.ROCK, 23.0f, 25.0f, 3);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockKarmesineOre extends BasicBlockOre {
|
||||
|
||||
public BlockKarmesineOre() {
|
||||
super("karmesine_ore", Material.ROCK, 13.0f, 15.0f,1);
|
||||
super("karmesine_ore", Material.ROCK, 13.0f, 15.0f, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -15,17 +15,16 @@ import java.util.Random;
|
||||
public class BlockLigniteOre extends BasicBlockOre {
|
||||
|
||||
public BlockLigniteOre() {
|
||||
super("lignite_ore", Material.ROCK, 4.0f, 5.0f,1);
|
||||
super("lignite_ore", Material.ROCK, 4.0f, 5.0f, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExpDrop(IBlockState state, IBlockAccess world, BlockPos pos, int fortune) {
|
||||
Random rand = world instanceof World ? ((World) world).rand : new Random();
|
||||
int r = RANDOM.nextInt(11);
|
||||
if(r > 7) {
|
||||
if (r > 7) {
|
||||
return MathHelper.getRandomIntegerInRange(rand, 0, 10) + fortune;
|
||||
}
|
||||
else return 0;
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockMeteoriteOre extends BasicBlockOre {
|
||||
|
||||
public BlockMeteoriteOre() {
|
||||
super("meteorite_ore", Material.ROCK, 60.0f,500.0f,4);
|
||||
super("meteorite_ore", Material.ROCK, 60.0f, 500.0f, 4);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockMindoriteOre extends BasicBlockOre {
|
||||
|
||||
public BlockMindoriteOre() {
|
||||
super("mindorite_ore", Material.ROCK, 12.0f, 12.0f,2);
|
||||
super("mindorite_ore", Material.ROCK, 12.0f, 12.0f, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockMythrilOre extends BasicBlockOre {
|
||||
|
||||
public BlockMythrilOre() {
|
||||
super("mythril_ore", Material.ROCK, 25.0f, 25.0f,4);
|
||||
super("mythril_ore", Material.ROCK, 25.0f, 25.0f, 4);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockPalladiumOre extends BasicBlockOre {
|
||||
|
||||
public BlockPalladiumOre() {
|
||||
super("palladium_ore", Material.ROCK, 25.0f, 25.0f,3);
|
||||
super("palladium_ore", Material.ROCK, 25.0f, 25.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockRottenGround extends BasicBlockGround {
|
||||
|
||||
public BlockRottenGround() {
|
||||
super("rotten_ground", Material.GROUND, 2.0f, 2.0f,0);
|
||||
super("rotten_ground", Material.GROUND, 2.0f, 2.0f, 0);
|
||||
this.setSoundType(SoundType.GROUND);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockSlaggoldOre extends BasicBlockOre {
|
||||
|
||||
public BlockSlaggoldOre() {
|
||||
super("slaggold_ore", Material.ROCK, 3.0f, 5.0f,1);
|
||||
super("slaggold_ore", Material.ROCK, 3.0f, 5.0f, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockSlagironOre extends BasicBlockOre {
|
||||
|
||||
public BlockSlagironOre() {
|
||||
super("slagiron_ore", Material.ROCK, 3.0f, 5.0f,1);
|
||||
super("slagiron_ore", Material.ROCK, 3.0f, 5.0f, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockTiberiumOre extends BasicBlockOreGlow {
|
||||
|
||||
public BlockTiberiumOre() {
|
||||
super("tiberium_ore", Material.ROCK, 30.0f, 30.0f, 3,0.66f);
|
||||
super("tiberium_ore", Material.ROCK, 30.0f, 30.0f, 3, 0.66f);
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockVibraniumOre extends BasicBlockOre {
|
||||
|
||||
public BlockVibraniumOre() {
|
||||
super("vibranium_ore", Material.ROCK, 70.0f, 800.0f,4);
|
||||
super("vibranium_ore", Material.ROCK, 70.0f, 800.0f, 4);
|
||||
}
|
||||
}
|
@@ -6,6 +6,6 @@ import net.minecraft.block.material.Material;
|
||||
public class BlockYrdeanOre extends BasicBlockOre {
|
||||
|
||||
public BlockYrdeanOre() {
|
||||
super("yrdean_ore", Material.ROCK, 13.0f, 15.0f,3);
|
||||
super("yrdean_ore", Material.ROCK, 13.0f, 15.0f, 3);
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,6 @@ public class BasicBlockGround extends Block {
|
||||
setRegistryName(name);
|
||||
setHardness(hardness);
|
||||
setResistance(resistance);
|
||||
setHarvestLevel("shovel",harvest);
|
||||
setHarvestLevel("shovel", harvest);
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemIronNugget extends BasicItem{
|
||||
public class ItemIronNugget extends BasicItem {
|
||||
|
||||
public ItemIronNugget(){
|
||||
public ItemIronNugget() {
|
||||
super("iron_nugget");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemKarmesineIngot extends BasicItem{
|
||||
public class ItemKarmesineIngot extends BasicItem {
|
||||
|
||||
public ItemKarmesineIngot(){
|
||||
public ItemKarmesineIngot() {
|
||||
super("karmesine_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemMeteoriteIngot extends BasicItem{
|
||||
public class ItemMeteoriteIngot extends BasicItem {
|
||||
|
||||
public ItemMeteoriteIngot(){
|
||||
public ItemMeteoriteIngot() {
|
||||
super("meteorite_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemMindoriteIngot extends BasicItem{
|
||||
public class ItemMindoriteIngot extends BasicItem {
|
||||
|
||||
public ItemMindoriteIngot(){
|
||||
public ItemMindoriteIngot() {
|
||||
super("mindorite_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemMythrilIngot extends BasicItem{
|
||||
public class ItemMythrilIngot extends BasicItem {
|
||||
|
||||
public ItemMythrilIngot(){
|
||||
public ItemMythrilIngot() {
|
||||
super("mythril_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemPalladiumIngot extends BasicItem{
|
||||
public class ItemPalladiumIngot extends BasicItem {
|
||||
|
||||
public ItemPalladiumIngot(){
|
||||
public ItemPalladiumIngot() {
|
||||
super("palladium_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemPrometheumIngot extends BasicItem{
|
||||
public class ItemPrometheumIngot extends BasicItem {
|
||||
|
||||
public ItemPrometheumIngot(){
|
||||
public ItemPrometheumIngot() {
|
||||
super("prometheum_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemTiberiumIngot extends BasicItem{
|
||||
public class ItemTiberiumIngot extends BasicItem {
|
||||
|
||||
public ItemTiberiumIngot(){
|
||||
public ItemTiberiumIngot() {
|
||||
super("tiberium_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemVibraniumIngot extends BasicItem{
|
||||
public class ItemVibraniumIngot extends BasicItem {
|
||||
|
||||
public ItemVibraniumIngot(){
|
||||
public ItemVibraniumIngot() {
|
||||
super("vibranium_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package items;
|
||||
|
||||
public class ItemYrdeanIngot extends BasicItem{
|
||||
public class ItemYrdeanIngot extends BasicItem {
|
||||
|
||||
public ItemYrdeanIngot(){
|
||||
public ItemYrdeanIngot() {
|
||||
super("yrdean_ingot");
|
||||
}
|
||||
}
|
||||
|
@@ -134,7 +134,6 @@ public class ZCompression {
|
||||
GameRegistry.registerFuelHandler(new FuelHandler());
|
||||
new Smelting();
|
||||
new Crafting();
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@@ -8,11 +8,11 @@ import org.apache.commons.lang3.RandomUtils;
|
||||
public class FuelHandler implements IFuelHandler {
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel){
|
||||
if(fuel.getItem().equals(ZCompression.lignite)) {
|
||||
return 200*2;
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel.getItem().equals(ZCompression.lignite)) {
|
||||
return 200 * 2;
|
||||
}
|
||||
if(fuel.getItem().equals(ZCompression.fuel_brick)) {
|
||||
if (fuel.getItem().equals(ZCompression.fuel_brick)) {
|
||||
return RandomUtils.nextInt(1, 64) * 200;
|
||||
}
|
||||
return 0;
|
||||
|
@@ -24,11 +24,9 @@ public class ZWorldGen implements IWorldGenerator {
|
||||
Generator.generateOre(ZCompression.slaggoldOre.getDefaultState(), random, x, z, world, 20, 8, 48, 5, 9);
|
||||
Generator.generateOre(ZCompression.ligniteOre.getDefaultState(), random, x, z, world, 40, 8, 96, 5, 15);
|
||||
Generator.generateOre(Blocks.IRON_ORE.getDefaultState(), random, x, z, world, 40, 8, 96, 2, 14);
|
||||
|
||||
Generator.generateOre(ZCompression.basalt.getDefaultState(), Blocks.LAVA.getDefaultState(), random, x, z, world, 100, 8, 24, 2, 5);
|
||||
Generator.generateOre(ZCompression.rottenGround.getDefaultState(), Blocks.DIRT.getDefaultState(), random, x, z, world, 25, 50, 70, 2, 15);
|
||||
|
||||
|
||||
Generator.generateOre(ZCompression.vibraniumOre.getDefaultState(), random, x, z, world, 18, 48, 64, 2, 4);
|
||||
Generator.generateOre(ZCompression.karmesineOre.getDefaultState(), random, x, z, world, 30, 16, 48, 2, 5);
|
||||
Generator.generateOre(ZCompression.bismuthOre.getDefaultState(), random, x, z, world, 50, 50, 130, 2, 4);
|
||||
|
@@ -8,6 +8,14 @@ import net.minecraft.item.Item;
|
||||
|
||||
public class ClientProxy extends ServerProxy {
|
||||
|
||||
private static void registerBlockModel(Block block) {
|
||||
registerItemModel(Item.getItemFromBlock(block));
|
||||
}
|
||||
|
||||
private static void registerItemModel(Item item) {
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerClientStuff() {
|
||||
// Items
|
||||
@@ -56,15 +64,5 @@ public class ClientProxy extends ServerProxy {
|
||||
registerBlockModel(ZCompression.tiberiumOre);
|
||||
registerBlockModel(ZCompression.vibraniumOre);
|
||||
registerBlockModel(ZCompression.yrdeanOre);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void registerBlockModel(Block block) {
|
||||
registerItemModel(Item.getItemFromBlock(block));
|
||||
}
|
||||
|
||||
private static void registerItemModel(Item item) {
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user