forked from TAIGA/TAIGA
done overloading correctly
This commit is contained in:
@@ -4,35 +4,18 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BasicBlockOre extends Block {
|
||||
public String oreDictName;
|
||||
|
||||
public BasicBlockOre(String name, Material material, float hardness, float resistance, int harvest, String oreDictName, float lightlevel) {
|
||||
public BasicBlockOre(String name, Material material, float hardness, float resistance, int harvest, float lightLevel) {
|
||||
super(material);
|
||||
setUnlocalizedName(name);
|
||||
setRegistryName(name);
|
||||
setHardness(hardness);
|
||||
setResistance(resistance);
|
||||
setHarvestLevel("pickaxe", harvest);
|
||||
setLightLevel(lightlevel);
|
||||
this.oreDictName = oreDictName;
|
||||
setLightLevel(lightLevel);
|
||||
}
|
||||
|
||||
public BasicBlockOre(String name, Material material, float hardness, float resistance, int harvest, String oreDictName) {
|
||||
super(material);
|
||||
setUnlocalizedName(name);
|
||||
setRegistryName(name);
|
||||
setHardness(hardness);
|
||||
setResistance(resistance);
|
||||
setHarvestLevel("pickaxe", harvest);
|
||||
this.oreDictName = oreDictName;
|
||||
}
|
||||
|
||||
|
||||
public boolean isOreDict() {
|
||||
return this.oreDictName != null;
|
||||
}
|
||||
|
||||
public String getOreDictName() {
|
||||
return oreDictName;
|
||||
public BasicBlockOre(String name, Material material, float hardness, float resistance, int harvest) {
|
||||
this(name, material, hardness, resistance, harvest, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,23 +3,19 @@ package com.sosnitzka.ztic_addon.generic;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BasicItem extends Item {
|
||||
private String oreDictName;
|
||||
private boolean oreDict;
|
||||
|
||||
public BasicItem(String name, String oreDictName) {
|
||||
public BasicItem(String name, boolean oreDict) {
|
||||
setUnlocalizedName(name);
|
||||
setRegistryName(name);
|
||||
this.oreDictName = oreDictName;
|
||||
this.oreDict = oreDict;
|
||||
}
|
||||
|
||||
public BasicItem(String name) {
|
||||
this(name, null);
|
||||
this(name, false);
|
||||
}
|
||||
|
||||
public boolean isOreDict() {
|
||||
return this.oreDictName != null;
|
||||
}
|
||||
|
||||
public String getOreDictName() {
|
||||
return oreDictName;
|
||||
return this.oreDict;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user