mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-22 12:59:48 +00:00
- Familiar: Added fully upgraded one to CreativeTab
This commit is contained in:
1 parent
8603b9a90d
commit
d81f15a154
3 files changed
+8
-5
No files matched your search
@@ -69,8 +69,6 @@ public class BlockStoneMachine extends Block {
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 15));
|
||||
list.add(new ItemStack(item, 1, 11));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package makeo.gadomancy.common.items;
|
||||
|
||||
import makeo.gadomancy.common.blocks.BlockStoneMachine;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBrewingStand;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
@@ -41,6 +41,13 @@ public class ItemFamiliar extends Item implements IBauble {
|
||||
ItemStack stack = new ItemStack(item);
|
||||
setAspect(stack, Aspect.MAGIC);
|
||||
list.add(stack);
|
||||
|
||||
stack = new ItemStack(item);
|
||||
setAspect(stack, Aspect.MAGIC);
|
||||
for(FamiliarUpgrade upgrade : FamiliarUpgrade.values()) {
|
||||
addUpgrade(stack, upgrade);
|
||||
}
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -165,6 +172,7 @@ public class ItemFamiliar extends Item implements IBauble {
|
||||
|
||||
public boolean hasUpgrade(ItemStack stack, FamiliarUpgrade upgrade) {
|
||||
if(stack == null || !(stack.getItem() instanceof ItemFamiliar)) return false;
|
||||
if(upgrade == null) return true;
|
||||
if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey(upgrade.getTag())) return false;
|
||||
return stack.getTagCompound().getBoolean(upgrade.getTag());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user