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
7604cd8a16
5 files changed
+23
-9
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package cofh.api.tileentity;
|
||||
|
||||
import codechicken.lib.raytracer.IndexedCuboid6;
|
||||
import thaumcraft.codechicken.lib.raytracer.IndexedCuboid6;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -69,8 +70,8 @@ public final class HUDHandler {
|
||||
font.drawStringWithShadow(content, xpos + 20, ypos + 9, 0xFFAA00);
|
||||
}
|
||||
|
||||
if(pickedBlock.getItem() != null)
|
||||
renderItem.renderItemIntoGUI(font, ClientHelper.minecraft().renderEngine, pickedBlock, xpos, ypos);
|
||||
if(new ItemStack(((ItemBlock)pickedBlock.getItem()).field_150939_a).getItem() != null)
|
||||
renderItem.renderItemIntoGUI(font, ClientHelper.minecraft().renderEngine, new ItemStack(((ItemBlock)pickedBlock.getItem()).field_150939_a), xpos, ypos);
|
||||
font.setUnicodeFlag(unicode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,12 @@ public class BlockBedrockPortal extends Block {
|
||||
return new TileBedrockPortal();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ 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.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -88,7 +89,7 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
|
||||
if(block.canPlaceBlockOnSide(world, mop.blockX, mop.blockY, mop.blockZ, mop.sideHit)) {
|
||||
if(!world.isRemote) {
|
||||
world.setBlock(mop.blockX, mop.blockY, mop.blockZ, Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 1 | 2);
|
||||
world.setBlock(mop.blockX, mop.blockY, mop.blockZ, ((ItemBlock)stack.getItem()).field_150939_a, stack.getItemDamage(), 1 | 2);
|
||||
block.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, itemstack);
|
||||
NBTTagCompound tileCmp = getStackTileEntity(itemstack);
|
||||
if(tileCmp != null && !tileCmp.hasNoTags()) {
|
||||
@@ -186,7 +187,13 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
block = Block.getBlockById(id);
|
||||
}
|
||||
int meta = ItemNBTHelper.getInt(focus, TAG_BLOCK_META, 0);
|
||||
return new ItemStack(block, 1, meta);
|
||||
ItemStack stck;
|
||||
//if(block instanceof BlockReed)
|
||||
//{
|
||||
// stck=new ItemStack(Items.reeds,1,meta);
|
||||
//}
|
||||
stck=new ItemStack(new ItemBlock(block),1,meta);
|
||||
return stck;
|
||||
}
|
||||
|
||||
public NBTTagCompound getStackTileEntity(ItemStack stack) {
|
||||
@@ -206,7 +213,8 @@ 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.blockRegistry.getNameForObject(block));
|
||||
String blockName=Block.blockRegistry.getNameForObject(block);
|
||||
ItemNBTHelper.setString(focus, TAG_BLOCK_NAME, blockName);
|
||||
ItemNBTHelper.setInt(focus, TAG_BLOCK_META, meta);
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(tile != null)
|
||||
|
||||
@@ -176,8 +176,8 @@ public final class ModResearch {
|
||||
List<ResearchPage> list=new ArrayList<ResearchPage>();
|
||||
list.add(new ResearchPage("0"));
|
||||
list.add(recipePage(LibResearch.KEY_SUMMON+"0"));
|
||||
list.add(recipePage(LibResearch.KEY_SUMMON+"1"));
|
||||
list.add(infusionPage(LibResearch.KEY_SUMMON));
|
||||
//list.add(recipePage(LibResearch.KEY_SUMMON+"1"));
|
||||
//list.add(infusionPage(LibResearch.KEY_SUMMON));
|
||||
list.add(new ResearchPage("1"));
|
||||
//for(EnumMobAspect aspect:EnumMobAspect.values()) {
|
||||
// list.add(aspect.GetRecepiePage());
|
||||
|
||||
Reference in new issue
Block a user