mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Merge remote-tracking branch 'origin/1.7' into 1.7
This commit is contained in:
commit
af2636daff
3 files changed
+4
-5
No files matched your search
@@ -20,7 +20,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -92,7 +91,7 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
world.setBlock(mop.blockX, mop.blockY, mop.blockZ, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 1 | 2);
|
||||
block.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, itemstack);
|
||||
NBTTagCompound tileCmp = getStackTileEntity(itemstack);
|
||||
if(tileCmp != null && tileCmp.hasNoTags()) {
|
||||
if(tileCmp != null && !tileCmp.hasNoTags()) {
|
||||
TileEntity tile1 = TileEntity.createAndLoadEntity(tileCmp);
|
||||
tile1.xCoord = mop.blockX;
|
||||
tile1.yCoord = mop.blockY;
|
||||
@@ -207,7 +206,7 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
private void storePickedBlock(ItemStack stack,Block block, short meta, TileEntity tile) {
|
||||
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
|
||||
ItemStack focus=wand.getFocusItem(stack);
|
||||
ItemNBTHelper.setString(focus, TAG_BLOCK_NAME, block.unlocalizedName);
|
||||
ItemNBTHelper.setString(focus, TAG_BLOCK_NAME, Block.blockRegistry.getNameForObject(block));
|
||||
ItemNBTHelper.setInt(focus, TAG_BLOCK_META, meta);
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(tile != null)
|
||||
|
||||
@@ -173,7 +173,7 @@ public class ItemBlockTalisman extends ItemMod {
|
||||
|
||||
private boolean setBlock(ItemStack stack, Block block, int meta) {
|
||||
if(getBlock(stack) == Blocks.air || getBlockCount(stack) == 0) {
|
||||
ItemNBTHelper.setString(stack, TAG_BLOCK_NAME, block.getUnlocalizedName());
|
||||
ItemNBTHelper.setString(stack, TAG_BLOCK_NAME,Block.blockRegistry.getNameForObject(block));
|
||||
ItemNBTHelper.setInt(stack, TAG_BLOCK_META, meta);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ItemPlacementMirror extends ItemMod {
|
||||
}
|
||||
|
||||
private void setBlock(ItemStack stack, Block block, int meta) {
|
||||
ItemNBTHelper.setString(stack, TAG_BLOCK_NAME, block.getUnlocalizedName());
|
||||
ItemNBTHelper.setString(stack, TAG_BLOCK_NAME, Block.blockRegistry.getNameForObject(block));
|
||||
ItemNBTHelper.setInt(stack, TAG_BLOCK_META, meta);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user