Updated to Forge 1826

This commit is contained in:
WayofTime 2016-04-02 16:02:01 -04:00
parent 39df6d5bb0
commit 378c59d2b3
10 changed files with 169 additions and 37 deletions

View file

@ -1,5 +1,5 @@
#
#Tue Mar 29 09:15:42 EDT 2016
#Sat Apr 02 15:31:00 EDT 2016
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
@ -288,10 +288,10 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
eclipse.preferences.version=1
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
eclipse.preferences.version=1
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16

View file

@ -6,6 +6,7 @@ Version 2.0.0-28
- Changed corrosive sword's effect from poison to wither
- Fixed living armour's training bracelet so that it deactivates any training of upgrades not supported
- Added "Experienced" living armour upgrade, which provides more xp from picked up orbs.
- Updated to Forge 1826
------------------------------------------------------
Version 2.0.0-27

View file

@ -2,7 +2,7 @@ mod_name=BloodMagic
package_group=com.wayoftime.bloodmagic
mod_version=2.0.0
mc_version=1.9
forge_version=12.16.0.1813-1.9
forge_version=12.16.0.1826-1.9
curse_id=224791
mappings_version=snapshot_20160321

View file

@ -209,6 +209,7 @@ public class Constants
UPGRADE_TOME("ItemUpgradeTome"),
UPGRADE_TRAINER("ItemUpgradeTrainer"),
SIGIL_TELEPOSITION("ItemSigilTeleposition"),
EXPERIENCE_TOME("ItemExperienceBook"),
SIGIL_TRANSPOSITION("ItemSigilTransposition");
@Getter

View file

@ -0,0 +1,56 @@
package WayofTime.bloodmagic.item;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
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.util.helper.TextHelper;
public class ItemExperienceBook extends Item implements IVariantProvider
{
public ItemExperienceBook()
{
setUnlocalizedName(Constants.Mod.MODID + ".experienceTome");
setRegistryName(Constants.BloodMagicItem.EXPERIENCE_TOME.getRegName());
setMaxStackSize(1);
setCreativeTab(BloodMagic.tabBloodMagic);
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.experienceTome"));
}
@Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
{
return EnumActionResult.FAIL;
}
@Override
public List<Pair<Integer, String>> getVariants()
{
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
ret.add(new ImmutablePair<Integer, String>(0, "type=experiencetome"));
return ret;
}
}

View file

@ -77,7 +77,7 @@ public class ItemSigilTransposition extends ItemSigilBase
int cost = getLpUsed();
NBTTagCompound tileNBTTag = new NBTTagCompound();
String blockName = rightClickedBlock.getBlock().getRegistryName();
String blockName = rightClickedBlock.getBlock().getRegistryName().toString();
byte metadata = (byte) stack.getMetadata();
if (world.getTileEntity(blockPos) != null)

View file

@ -1,22 +1,71 @@
package WayofTime.bloodmagic.registry;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.ConfigHandler;
import WayofTime.bloodmagic.api.BloodMagicAPI;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.block.*;
import WayofTime.bloodmagic.item.block.*;
import WayofTime.bloodmagic.tile.*;
import WayofTime.bloodmagic.block.BlockAlchemyArray;
import WayofTime.bloodmagic.block.BlockAltar;
import WayofTime.bloodmagic.block.BlockBloodLight;
import WayofTime.bloodmagic.block.BlockBloodRune;
import WayofTime.bloodmagic.block.BlockBloodStoneBrick;
import WayofTime.bloodmagic.block.BlockBloodTank;
import WayofTime.bloodmagic.block.BlockCrystal;
import WayofTime.bloodmagic.block.BlockDemonCrucible;
import WayofTime.bloodmagic.block.BlockDemonCrystal;
import WayofTime.bloodmagic.block.BlockDemonCrystallizer;
import WayofTime.bloodmagic.block.BlockDemonPylon;
import WayofTime.bloodmagic.block.BlockDimensionalPortal;
import WayofTime.bloodmagic.block.BlockIncenseAltar;
import WayofTime.bloodmagic.block.BlockInputRoutingNode;
import WayofTime.bloodmagic.block.BlockItemRoutingNode;
import WayofTime.bloodmagic.block.BlockLifeEssence;
import WayofTime.bloodmagic.block.BlockMasterRoutingNode;
import WayofTime.bloodmagic.block.BlockOutputRoutingNode;
import WayofTime.bloodmagic.block.BlockPath;
import WayofTime.bloodmagic.block.BlockPedestal;
import WayofTime.bloodmagic.block.BlockPhantom;
import WayofTime.bloodmagic.block.BlockRitualController;
import WayofTime.bloodmagic.block.BlockRitualStone;
import WayofTime.bloodmagic.block.BlockSoulForge;
import WayofTime.bloodmagic.block.BlockSpectral;
import WayofTime.bloodmagic.block.BlockTeleposer;
import WayofTime.bloodmagic.item.block.ItemBlockBloodRune;
import WayofTime.bloodmagic.item.block.ItemBlockBloodStoneBrick;
import WayofTime.bloodmagic.item.block.ItemBlockBloodTank;
import WayofTime.bloodmagic.item.block.ItemBlockCrystal;
import WayofTime.bloodmagic.item.block.ItemBlockDemonCrystal;
import WayofTime.bloodmagic.item.block.ItemBlockPath;
import WayofTime.bloodmagic.item.block.ItemBlockPedestal;
import WayofTime.bloodmagic.item.block.ItemBlockRitualController;
import WayofTime.bloodmagic.item.block.ItemBlockRitualStone;
import WayofTime.bloodmagic.item.block.ItemBlockRoutingNode;
import WayofTime.bloodmagic.tile.TileAlchemyArray;
import WayofTime.bloodmagic.tile.TileAltar;
import WayofTime.bloodmagic.tile.TileBloodTank;
import WayofTime.bloodmagic.tile.TileDemonCrucible;
import WayofTime.bloodmagic.tile.TileDemonCrystal;
import WayofTime.bloodmagic.tile.TileDemonCrystallizer;
import WayofTime.bloodmagic.tile.TileDemonPylon;
import WayofTime.bloodmagic.tile.TileDimensionalPortal;
import WayofTime.bloodmagic.tile.TileImperfectRitualStone;
import WayofTime.bloodmagic.tile.TileIncenseAltar;
import WayofTime.bloodmagic.tile.TileMasterRitualStone;
import WayofTime.bloodmagic.tile.TilePhantomBlock;
import WayofTime.bloodmagic.tile.TilePlinth;
import WayofTime.bloodmagic.tile.TileSoulForge;
import WayofTime.bloodmagic.tile.TileSpectralBlock;
import WayofTime.bloodmagic.tile.TileTeleposer;
import WayofTime.bloodmagic.tile.routing.TileInputRoutingNode;
import WayofTime.bloodmagic.tile.routing.TileItemRoutingNode;
import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode;
import WayofTime.bloodmagic.tile.routing.TileOutputRoutingNode;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
import WayofTime.bloodmagic.util.helper.InventoryRenderHelperV2;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ModBlocks
{
@ -58,31 +107,31 @@ public class ModBlocks
lifeEssence = registerBlock(new BlockLifeEssence());
altar = registerBlock(new BlockAltar());
bloodRune = registerBlock(new BlockBloodRune(), ItemBlockBloodRune.class);
ritualController = registerBlock(new BlockRitualController(), ItemBlockRitualController.class);
ritualStone = registerBlock(new BlockRitualStone(), ItemBlockRitualStone.class);
bloodRune = registerBlock(new ItemBlockBloodRune(new BlockBloodRune()));
ritualController = registerBlock(new ItemBlockRitualController(new BlockRitualController()));
ritualStone = registerBlock(new ItemBlockRitualStone(new BlockRitualStone()));
bloodLight = registerBlock(new BlockBloodLight());
pedestal = registerBlock(new BlockPedestal(), ItemBlockPedestal.class);
pedestal = registerBlock(new ItemBlockPedestal(new BlockPedestal()));
teleposer = registerBlock(new BlockTeleposer());
alchemyArray = registerBlock(new BlockAlchemyArray());
spectralBlock = registerBlock(new BlockSpectral());
phantomBlock = registerBlock(new BlockPhantom());
soulForge = registerBlock(new BlockSoulForge());
crystal = registerBlock(new BlockCrystal(), ItemBlockCrystal.class);
bloodStoneBrick = registerBlock(new BlockBloodStoneBrick(), ItemBlockBloodStoneBrick.class);
masterRoutingNode = registerBlock(new BlockMasterRoutingNode(), ItemBlockRoutingNode.class);
inputRoutingNode = registerBlock(new BlockInputRoutingNode(), ItemBlockRoutingNode.class);
outputRoutingNode = registerBlock(new BlockOutputRoutingNode(), ItemBlockRoutingNode.class);
itemRoutingNode = registerBlock(new BlockItemRoutingNode(), ItemBlockRoutingNode.class);
crystal = registerBlock(new ItemBlockCrystal(new BlockCrystal()));
bloodStoneBrick = registerBlock(new ItemBlockBloodStoneBrick(new BlockBloodStoneBrick()));
masterRoutingNode = registerBlock(new ItemBlockRoutingNode(new BlockMasterRoutingNode()));
inputRoutingNode = registerBlock(new ItemBlockRoutingNode(new BlockInputRoutingNode()));
outputRoutingNode = registerBlock(new ItemBlockRoutingNode(new BlockOutputRoutingNode()));
itemRoutingNode = registerBlock(new ItemBlockRoutingNode(new BlockItemRoutingNode()));
incenseAltar = registerBlock(new BlockIncenseAltar());
pathBlock = registerBlock(new BlockPath(), ItemBlockPath.class);
pathBlock = registerBlock(new ItemBlockPath(new BlockPath()));
demonCrucible = registerBlock(new BlockDemonCrucible());
demonPylon = registerBlock(new BlockDemonPylon());
demonCrystallizer = registerBlock(new BlockDemonCrystallizer());
demonCrystal = registerBlock(new BlockDemonCrystal(), ItemBlockDemonCrystal.class);
demonCrystal = registerBlock(new ItemBlockDemonCrystal(new BlockDemonCrystal()));
dimensionalPortal = registerBlock(new BlockDimensionalPortal());
bloodTank = registerBlock(new BlockBloodTank(), ItemBlockBloodTank.class);
bloodTank = registerBlock(new ItemBlockBloodTank(new BlockBloodTank()));
// testSpellBlock = registerBlock(new BlockTestSpellBlock());
@ -143,29 +192,34 @@ public class ModBlocks
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(dimensionalPortal));
}
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock, String name)
private static Block registerBlock(ItemBlock itemBlock, String name)
{
Block block = itemBlock.block;
if (!ConfigHandler.blockBlacklist.contains(name))
{
GameRegistry.registerBlock(block, itemBlock);
GameRegistry.register(block);
GameRegistry.register(itemBlock.setRegistryName(block.getRegistryName()));
BloodMagic.proxy.tryHandleBlockModel(block, name);
}
return block;
}
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock)
private static Block registerBlock(ItemBlock itemBlock)
{
Block block = itemBlock.block;
if (block.getRegistryName() == null)
{
BloodMagic.instance.getLogger().error("Attempted to register Block {} without setting a registry name. Block will not be registered. Please report this.", block.getClass().getCanonicalName());
return block;
}
String blockName = block.getRegistryName().split(":")[1];
String blockName = block.getRegistryName().getResourcePath();
if (!ConfigHandler.blockBlacklist.contains(blockName))
{
GameRegistry.registerBlock(block, itemBlock);
GameRegistry.register(block);
GameRegistry.register(itemBlock.setRegistryName(block.getRegistryName()));
// GameRegistry.registerBlock(block, itemBlock);
BloodMagic.proxy.tryHandleBlockModel(block, blockName);
}
@ -180,10 +234,11 @@ public class ModBlocks
return null;
}
String blockName = block.getRegistryName().split(":")[1];
String blockName = block.getRegistryName().getResourcePath();
if (!ConfigHandler.blockBlacklist.contains(blockName))
{
GameRegistry.registerBlock(block);
GameRegistry.register(block);
GameRegistry.register(new ItemBlock(block).setRegistryName(block.getRegistryName()));
BloodMagic.proxy.tryHandleBlockModel(block, blockName);
}

View file

@ -23,6 +23,7 @@ import WayofTime.bloodmagic.item.ItemBucketEssence;
import WayofTime.bloodmagic.item.ItemComponent;
import WayofTime.bloodmagic.item.ItemDaggerOfSacrifice;
import WayofTime.bloodmagic.item.ItemDemonCrystal;
import WayofTime.bloodmagic.item.ItemExperienceBook;
import WayofTime.bloodmagic.item.ItemInscriptionTool;
import WayofTime.bloodmagic.item.ItemLavaCrystal;
import WayofTime.bloodmagic.item.ItemRitualDiviner;
@ -117,6 +118,7 @@ public class ModItems
public static Item itemComponent;
public static Item itemDemonCrystal;
public static Item telepositionFocus;
public static Item experienceTome;
public static Item bloodShard;
@ -210,6 +212,7 @@ public class ModItems
itemComponent = registerItem(new ItemComponent());
itemDemonCrystal = registerItem(new ItemDemonCrystal());
telepositionFocus = registerItem(new ItemTelepositionFocus());
experienceTome = registerItem(new ItemExperienceBook());
bloodShard = registerItem(new ItemBloodShard());
@ -282,7 +285,7 @@ public class ModItems
return item;
}
String itemName = item.getRegistryName().split(":")[1];
String itemName = item.getRegistryName().getResourcePath();
if (!ConfigHandler.itemBlacklist.contains(itemName))
{
GameRegistry.registerItem(item);

View file

@ -29,7 +29,7 @@ public class InventoryRenderHelperV2
public void registerRender(Item item, int meta, String variant)
{
registerRender(item, meta, item.getRegistryName().split(":")[1], variant);
registerRender(item, meta, item.getRegistryName().getResourcePath(), variant);
}
public void registerRender(Item item, String name, String variant)
@ -39,7 +39,7 @@ public class InventoryRenderHelperV2
public void registerRender(Item item, String variant)
{
registerRender(item, item.getRegistryName().split(":")[1], variant);
registerRender(item, item.getRegistryName().getResourcePath(), variant);
}
public void registerRender(Block block, int meta, String name, String variant)
@ -49,7 +49,7 @@ public class InventoryRenderHelperV2
public void registerRender(Block block, int meta, String variant)
{
registerRender(block, meta, block.getRegistryName().split(":")[1], variant);
registerRender(block, meta, block.getRegistryName().getResourcePath(), variant);
}
public void registerRender(Block block, String name, String variant)
@ -59,6 +59,6 @@ public class InventoryRenderHelperV2
public void registerRender(Block block, String variant)
{
registerRender(block, block.getRegistryName().split(":")[1], variant);
registerRender(block, block.getRegistryName().getResourcePath(), variant);
}
}

View file

@ -0,0 +1,16 @@
{
"forge_marker": 1,
"defaults": {
"model": "builtin/generated",
"transform": "forge:default-item"
},
"variants": {
"type": {
"experiencetome": {
"textures": {
"layer0": "bloodmagic:items/ArcaneAshes"
}
}
}
}
}