- Changed Living Armour so that it is now damagable. The Living Armour Chestplate will be damaged, but will not break. If it gets to ~0 durability, it will damage your LP network heavily.
- Living Armour is now repairable in an anvil with Binding Reagent. - Started adding in the Alchemy Table... not really started.
This commit is contained in:
parent
aacb54962b
commit
172cf86348
|
@ -1,3 +1,10 @@
|
|||
------------------------------------------------------
|
||||
Version 2.0.0-35
|
||||
------------------------------------------------------
|
||||
- Changed Living Armour so that it is now damagable. The Living Armour Chestplate will be damaged, but will not break. If it gets to ~0 durability, it will damage your LP network heavily.
|
||||
- Living Armour is now repairable in an anvil with Binding Reagent.
|
||||
- Started adding in the Alchemy Table... not really started.
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.0-34
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package WayofTime.bloodmagic.api;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Constants
|
||||
{
|
||||
|
@ -257,7 +255,8 @@ public class Constants
|
|||
DEMON_CRYSTALLIZER("BlockDemonCrystallizer"),
|
||||
DEMON_CRYSTAL("BlockDemonCrystal"),
|
||||
DIMENSIONAL_PORTAL("BlockDimensionalPortal"),
|
||||
BLOOD_TANK("BlockBloodTank");
|
||||
BLOOD_TANK("BlockBloodTank"),
|
||||
ALCHEMY_TABLE("BlockAlchemyTable");
|
||||
|
||||
@Getter
|
||||
private final String regName;
|
||||
|
|
120
src/main/java/WayofTime/bloodmagic/block/BlockAlchemyTable.java
Normal file
120
src/main/java/WayofTime/bloodmagic/block/BlockAlchemyTable.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
package WayofTime.bloodmagic.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import WayofTime.bloodmagic.tile.TileDemonCrucible;
|
||||
|
||||
public class BlockAlchemyTable extends BlockContainer implements IVariantProvider
|
||||
{
|
||||
public BlockAlchemyTable()
|
||||
{
|
||||
super(Material.ROCK);
|
||||
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".alchemyTable");
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setHarvestLevel("pickaxe", 0);
|
||||
|
||||
// setBlockBounds(0.3F, 0F, 0.3F, 0.72F, 1F, 0.72F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer)
|
||||
{
|
||||
return layer == BlockRenderLayer.CUTOUT_MIPPED || layer == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
return new TileDemonCrucible();
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
// {
|
||||
// TileDemonCrucible crucible = (TileDemonCrucible) world.getTileEntity(pos);
|
||||
//
|
||||
// if (crucible == null || player.isSneaking())
|
||||
// return false;
|
||||
//
|
||||
// if (heldItem != null)
|
||||
// {
|
||||
// if (!(heldItem.getItem() instanceof IDiscreteDemonWill) && !(heldItem.getItem() instanceof IDemonWillGem))
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Utils.insertItemToTile(crucible, player);
|
||||
//
|
||||
// world.notifyBlockUpdate(pos, state, state, 3);
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos blockPos, IBlockState blockState)
|
||||
{
|
||||
TileDemonCrucible tile = (TileDemonCrucible) world.getTileEntity(blockPos);
|
||||
if (tile != null)
|
||||
tile.dropItems();
|
||||
|
||||
super.breakBlock(world, blockPos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
ret.add(new ImmutablePair<Integer, String>(0, "normal"));
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -1,16 +1,10 @@
|
|||
package WayofTime.bloodmagic.item.armour;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.client.IMeshProvider;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
|
@ -28,12 +22,20 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
|
||||
import WayofTime.bloodmagic.api.network.SoulNetwork;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.client.IMeshProvider;
|
||||
import WayofTime.bloodmagic.item.ItemComponent;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshProvider
|
||||
{
|
||||
|
@ -48,7 +50,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
{
|
||||
super(ItemArmor.ArmorMaterial.IRON, 0, armorType);
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".livingArmour.");
|
||||
setMaxDamage(250);
|
||||
// setMaxDamage(250);
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
@ -81,6 +83,12 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
// return 0;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
|
||||
{
|
||||
return (ModItems.itemComponent == repair.getItem() && repair.getItemDamage() == ItemComponent.getStack(ItemComponent.REAGENT_BINDING).getItemDamage()) ? true : super.getIsRepairable(toRepair, repair);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack stack, DamageSource source, double damage, int slot)
|
||||
{
|
||||
|
@ -196,7 +204,28 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot)
|
||||
{
|
||||
return; // Armour shouldn't get damaged... for now
|
||||
if (this == ModItems.livingArmourChest)
|
||||
{
|
||||
if (damage > this.getMaxDamage(stack) - this.getDamage(stack))
|
||||
{
|
||||
//TODO: Syphon a load of LP.
|
||||
if (entity.worldObj.isRemote && entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
SoulNetwork network = NetworkHelper.getSoulNetwork(player);
|
||||
network.syphonAndDamage(player, damage * 100);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
stack.damageItem(damage, entity);
|
||||
} else
|
||||
{
|
||||
stack.damageItem(damage, entity);
|
||||
}
|
||||
|
||||
return; // TODO Armour shouldn't get damaged... for now
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -9,6 +9,7 @@ import WayofTime.bloodmagic.ConfigHandler;
|
|||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.BlockAlchemyArray;
|
||||
import WayofTime.bloodmagic.block.BlockAlchemyTable;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.block.BlockBloodLight;
|
||||
import WayofTime.bloodmagic.block.BlockBloodRune;
|
||||
|
@ -87,6 +88,8 @@ public class ModBlocks
|
|||
public static Block demonCrystallizer;
|
||||
public static Block demonCrystal;
|
||||
|
||||
public static Block alchemyTable;
|
||||
|
||||
public static Block lifeEssence;
|
||||
|
||||
public static Block crystal;
|
||||
|
@ -130,6 +133,8 @@ public class ModBlocks
|
|||
demonCrystallizer = registerBlock(new BlockDemonCrystallizer(), Constants.BloodMagicBlock.DEMON_CRYSTALLIZER.getRegName());
|
||||
demonCrystal = registerBlock(new ItemBlockDemonCrystal(new BlockDemonCrystal()), Constants.BloodMagicBlock.DEMON_CRYSTAL.getRegName());
|
||||
|
||||
alchemyTable = registerBlock(new BlockAlchemyTable(), Constants.BloodMagicBlock.ALCHEMY_TABLE.getRegName());
|
||||
|
||||
dimensionalPortal = registerBlock(new BlockDimensionalPortal(), Constants.BloodMagicBlock.DIMENSIONAL_PORTAL.getRegName());
|
||||
bloodTank = registerBlock(new ItemBlockBloodTank(new BlockBloodTank()), Constants.BloodMagicBlock.BLOOD_TANK.getRegName());
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": { },
|
||||
"model": "bloodmagic:ModelAlchemyTable.obj",
|
||||
"custom": { "flip-v": true },
|
||||
"transform" : "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{
|
||||
|
||||
}]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 0
|
||||
Ka 0.000000 0.000000 0.000000
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
d 1
|
||||
illum 2
|
||||
map_Kd bloodmagic:models/alchemytable
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Loading…
Reference in a new issue