Everything posted by Alix_The_Alicorn
-
Per-Player Item use cooldown with access from EntitiyPlayer Instance?
So, how exactly do I do this? Create a class implementing it, and call it's read/write methods when I need to?
-
Per-Player Item use cooldown with access from EntitiyPlayer Instance?
As the title suggests, I am having trouble setting up a cooldown for using my item that I can access from a player instance for armor rendering. I am thinking NBT, but I can't seem to understand how to read/write NBT to a player. Do I use methods from EntityPlayey, EntityLivingBase, or what? I have a ~PlayerTickEvent set up, but since I don't know how I should use the NBT, it does nothing. Any help would be appreciated <3 --Alix the Alicorn
-
Tile Entity NBT not syncing properly?
I'm still having issues with the block not re-rendering when it receives packets and blocks around it not doing the same thing. EDIT: I should have tried this before posting, but I used my original onDataPacket method to fix it (marking block for redner update.)
-
[1.7.2][SOLVED]Using packets?
Are you trying to send tile nbt, or what?
-
Tile Entity NBT not syncing properly?
I feel really lame doing this, but bump.
-
Tile Entity NBT not syncing properly?
I have this working, thanks coolAlias. I am now wondering if there is any other way to update the blocks around it without having to set meta and set it back, or set block and set it back.
-
Tile Entity NBT not syncing properly?
Got most of it working, but was wondering if I need to register both of the IPackets, client and server in post, or just one or the other?
-
Tile Entity NBT not syncing properly?
you'll notice System.out.println(tTile.getMode()); in shouldConnectToBlock();, this prints out 0, even after I make the change, until world reload. EDIT: I figured out my issue, it is that the packet sending nbt to the client is only sent at world load/chunk load/tileentity loaded. I don't know how to force the packet to send, if anyone knows how, I guess that is the relevant question now. I want to be able to send it whenever the nbt is saved.
-
Tile Entity NBT not syncing properly?
Heyo guys, I have started making a system for my blocks with connected textures to be configured (clicked with my chisel) to have the "mode" changed when clicked. These modes with either set it to connect to all blocks of it's same type with the same mode, or if in no connection mode, don't connect to any. I have this part down. My issue is, the mode int, which is stored in a tile entity is not syncing properly. I have @Override public Packet getDescriptionPacket() { NBTTagCompound nbt = new NBTTagCompound(); writeToNBT(nbt); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbt); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); Minecraft.getMinecraft().renderGlobal.markBlockForRenderUpdate(xCoord, yCoord, zCoord); } in my TE already. I can change the mode fine with right clicking with my chisel (I have a mod that let's me see tile's nbt in game), but the block with not change it's render unit the world is reloaded. Even when I place blocks next to it, it acts like it's mode never changed. When the game restarts, the changed you made to the mode would show up, but you would have to reload for any new changes to take affect. I am confused as to what my issue is. Here is my full TE: package com.jmanpenilla.carbonmod.common.tileentity; import net.minecraft.client.Minecraft; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import com.jmanpenilla.carbonmod.common.lib.Names; public class TileConnectedTextureBlock extends TileEntity { public static final int connect1 = 0; public static final int connect2 = 1; public static final int connect3 = 2; public static final int connect4 = 3; public static final int noConnect = 4; private int mode; public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); mode = nbt.getInteger(Names.NBT.connectedtexturemode); } public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setInteger(Names.NBT.connectedtexturemode, mode); markDirty(); } public int getMode() { return mode; } public void setMode(int mode) { this.mode = mode; markDirty(); } @Override public Packet getDescriptionPacket() { NBTTagCompound nbt = new NBTTagCompound(); writeToNBT(nbt); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbt); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); Minecraft.getMinecraft().renderGlobal.markBlockForRenderUpdate(xCoord, yCoord, zCoord); } } and here is my full block class (If you use this for your connected textures purposes, please give me a bit of credit, it took a while to update to 1.7.2) package com.jmanpenilla.carbonmod.common.block; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import com.jmanpenilla.carbonmod.common.creativetabs.TabCarbonMod; import com.jmanpenilla.carbonmod.common.item.ModItems; import com.jmanpenilla.carbonmod.common.lib.Reference; import com.jmanpenilla.carbonmod.common.tileentity.TileConnectedTextureBlock; public class ModBlockConnectedTextureSolid extends BlockContainer { public IIcon[] textures = new IIcon[47]; public static int[] textureRefByID = { 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 16, 16, 20, 20, 16, 16, 28, 28, 21, 21, 46, 42, 21, 21, 43, 38, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 16, 16, 20, 20, 16, 16, 28, 28, 25, 25, 45, 37, 25, 25, 40, 32, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 7, 7, 24, 24, 7, 7, 10, 10, 29, 29, 44, 41, 29, 29, 39, 33, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 7, 7, 24, 24, 7, 7, 10, 10, 8, 8, 36, 35, 8, 8, 34, 11 }; protected String folder; public ModBlockConnectedTextureSolid(Material material, String location) { super(material); this.stepSound = soundTypeStone; folder = location; setHardness(0.3F); this.setCreativeTab(TabCarbonMod.tabCarbonMod); } @Override public void registerBlockIcons(IIconRegister iconRegistry) { for (int i = 0; i < 47; i++) { textures[i] = iconRegistry.registerIcon(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1)); //System.out.println(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1)); } } private boolean shouldConnect(Block cBlock) { if(this == ModBlocks.compressedcarbonBlock && Reference.bricksConnectToBlocks) { if(cBlock == ModBlocks.compressedcarbonBlock || cBlock == ModBlocks.compressedcarbonBrick) { return true; } } else if(this == ModBlocks.refinedBluchoriditeBlock && Reference.bricksConnectToBlocks) { if(cBlock == ModBlocks.refinedBluchoriditeBlock || cBlock == ModBlocks.refinedBluchoriditeBrick) { return true; } } else { return cBlock == this; } return false; } public boolean shouldConnectToBlock(IBlockAccess w, int cx, int cy, int cz, int x, int y, int z) { Block cBlock = w.getBlock(cx, cy, cz); TileConnectedTextureBlock cTile = null; TileConnectedTextureBlock tTile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z); if(w.getTileEntity(cx, cy, cz) != null) { cTile = (TileConnectedTextureBlock) w.getTileEntity(cx, cy, cz); } if(cTile != null && cTile.getMode() == tTile.getMode()) { return shouldConnect(cBlock); } System.out.println(tTile.getMode()); return false; } @Override public IIcon getIcon(IBlockAccess w, int x, int y, int z, int side) { boolean[] bitMatrix = new boolean[8]; switch (side) { case 0: bitMatrix[0] = shouldConnectToBlock(w, x-1, y, z-1, x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y, z-1, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x+1, y, z-1, x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x-1, y, z, x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x+1, y, z, x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x-1, y, z+1, x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y, z+1, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x+1, y, z+1, x, y, z); break; case 1: bitMatrix[0] = shouldConnectToBlock(w, x-1, y, z-1, x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y, z-1, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x+1, y, z-1, x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x-1, y, z, x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x+1, y, z, x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x-1, y, z+1, x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y, z+1, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x+1, y, z+1, x, y, z); break; case 2: bitMatrix[0] = shouldConnectToBlock(w, x+(side==3?1:-1), y+1, z, x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x+(side==2?1:-1), y+1, z, x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x+(side==3?1:-1), y, z, x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x+(side==2?1:-1), y, z, x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x+(side==3?1:-1), y-1, z, x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x+(side==2?1:-1), y-1, z, x, y, z); break; case 3: bitMatrix[0] = shouldConnectToBlock(w, x+(side==2?1:-1), y+1, z, x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x+(side==3?1:-1), y+1, z, x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x+(side==2?1:-1), y, z, x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x+(side==3?1:-1), y, z, x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x+(side==2?1:-1), y-1, z, x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x+(side==3?1:-1), y-1, z, x, y, z); break; case 4: bitMatrix[0] = shouldConnectToBlock(w, x, y+1, z+(side==5?1:-1), x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x, y+1, z+(side==4?1:-1), x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x, y, z+(side==5?1:-1), x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x, y, z+(side==4?1:-1), x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x, y-1, z+(side==5?1:-1), x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x, y-1, z+(side==4?1:-1), x, y, z); break; case 5: bitMatrix[0] = shouldConnectToBlock(w, x, y+1, z+(side==4?1:-1), x, y, z); bitMatrix[1] = shouldConnectToBlock(w, x, y+1, z, x, y, z); bitMatrix[2] = shouldConnectToBlock(w, x, y+1, z+(side==5?1:-1), x, y, z); bitMatrix[3] = shouldConnectToBlock(w, x, y, z+(side==4?1:-1), x, y, z); bitMatrix[4] = shouldConnectToBlock(w, x, y, z+(side==5?1:-1), x, y, z); bitMatrix[5] = shouldConnectToBlock(w, x, y-1, z+(side==4?1:-1), x, y, z); bitMatrix[6] = shouldConnectToBlock(w, x, y-1, z, x, y, z); bitMatrix[7] = shouldConnectToBlock(w, x, y-1, z+(side==5?1:-1), x, y, z); break; } int idBuilder = 0; for (int i = 0; i <= 7; i++) idBuilder = idBuilder + (bitMatrix[i]?(i==0?1:(i==1?2:(i==2?4:(i==3?8:(i==4?16:(i==5?32:(i==6?64:128))))))):0); TileConnectedTextureBlock tile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z); if(Reference.connectedTextures && tile.getMode() != TileConnectedTextureBlock.noConnect) { return idBuilder>255||idBuilder<0?textures[0]:textures[textureRefByID[idBuilder]]; } else { return textures[0]; } } @Override public IIcon getIcon(int side, int meta) { return textures[0]; } public boolean onBlockActivated(World w, int x, int y, int z, EntityPlayer p, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { TileConnectedTextureBlock tile = (TileConnectedTextureBlock) w.getTileEntity(x, y, z); if(!w.isRemote && p.inventory.getCurrentItem() != null && p.inventory.getCurrentItem().getItem() == ModItems.chisel && p.inventory.getCurrentItem().getItemDamage() == 0) { switch(tile.getMode()) { case TileConnectedTextureBlock.connect1: tile.setMode(TileConnectedTextureBlock.connect2); return true; case TileConnectedTextureBlock.connect2: tile.setMode(TileConnectedTextureBlock.connect3); return true; case TileConnectedTextureBlock.connect3: tile.setMode(TileConnectedTextureBlock.connect4); return true; case TileConnectedTextureBlock.connect4: tile.setMode(TileConnectedTextureBlock.noConnect); return true; case TileConnectedTextureBlock.noConnect: tile.setMode(TileConnectedTextureBlock.connect1); return true; } } return false; } @Override public TileEntity createNewTileEntity(World w, int meta) { return new TileConnectedTextureBlock(); } } Thanks for any help!
-
[1.7] Multiple blocks sharing same textures.
I get what you mean Thanks! Just something I overlooked I guess.
-
Removed an item. World refuses to load.
Update forge. It's that simple. Use at least recommended (1060)
-
[1.7] Multiple blocks sharing same textures.
I have a connected texture block Class, and am using it for 3 blocks. All of the blocks using this class use the textures for the last one that is initialized. ModBlocConnectedTexureTransparent extends ModBlockConnectedTextureSolid, things using it still use the last initialized texture. Here is how I am initializing my blocks: ModBlocks.compressedcarbonBlock = new ModBlockConnectedTextureSolid(Material.rock, ModBlocks.compressedcarbonBlockName).setHardness(4.0F).setStepSound(Block.soundTypeStone).setBlockName(ModBlocks.compressedcarbonBlockName); ModBlocks.compressedIce = new ModBlockConnectedTextureTransparent(Material.packedIce, ModBlocks.compressedIceName, compressedIceSlipperiness).setHardness(0.5F).setStepSound(Block.soundTypeGlass).setBlockName(ModBlocks.compressedIceName).setLightOpacity(0); ModBlocks.refinedBluchoriditeBlock = new ModBlockConnectedTextureSolid(Material.rock, ModBlocks.refinedBluchoriditeBlockName).setHardness(4.0F).setStepSound(Block.soundTypeStone).setBlockName(ModBlocks.refinedBluchoriditeBlockName); And here is my block class: package com.jmanpenilla.carbonmod.common.block; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import com.jmanpenilla.carbonmod.common.creativetabs.TabCarbonMod; import com.jmanpenilla.carbonmod.common.lib.Reference; public class ModBlockConnectedTextureSolid extends Block { public static IIcon[] textures = new IIcon[47]; public static int[] textureRefByID = { 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 16, 16, 20, 20, 16, 16, 28, 28, 21, 21, 46, 42, 21, 21, 43, 38, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 16, 16, 20, 20, 16, 16, 28, 28, 25, 25, 45, 37, 25, 25, 40, 32, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 7, 7, 24, 24, 7, 7, 10, 10, 29, 29, 44, 41, 29, 29, 39, 33, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 7, 7, 24, 24, 7, 7, 10, 10, 8, 8, 36, 35, 8, 8, 34, 11 }; protected String folder; public ModBlockConnectedTextureSolid(Material material, String location) { super(material); this.stepSound = soundTypeStone; folder = location; setHardness(0.3F); this.setCreativeTab(TabCarbonMod.tabCarbonMod); } @Override public void registerBlockIcons(IIconRegister iconRegistry) { for (int i = 0; i < 47; i++) { textures[i] = iconRegistry.registerIcon(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1)); //System.out.println(Reference.MOD_ID + ":ct/" + folder + "/" + (i+1)); } } @Override public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { boolean[] bitMatrix = new boolean[8]; switch (side) { case 0: bitMatrix[0] = world.getBlock(x-1, y, z-1) == this; bitMatrix[1] = world.getBlock(x, y, z-1) == this; bitMatrix[2] = world.getBlock(x+1, y, z-1) == this; bitMatrix[3] = world.getBlock(x-1, y, z) == this; bitMatrix[4] = world.getBlock(x+1, y, z) == this; bitMatrix[5] = world.getBlock(x-1, y, z+1) == this; bitMatrix[6] = world.getBlock(x, y, z+1) == this; bitMatrix[7] = world.getBlock(x+1, y, z+1) == this; break; case 1: bitMatrix[0] = world.getBlock(x-1, y, z-1) == this; bitMatrix[1] = world.getBlock(x, y, z-1) == this; bitMatrix[2] = world.getBlock(x+1, y, z-1) == this; bitMatrix[3] = world.getBlock(x-1, y, z) == this; bitMatrix[4] = world.getBlock(x+1, y, z) == this; bitMatrix[5] = world.getBlock(x-1, y, z+1) == this; bitMatrix[6] = world.getBlock(x, y, z+1) == this; bitMatrix[7] = world.getBlock(x+1, y, z+1) == this; break; case 2: bitMatrix[0] = world.getBlock(x+(side==3?1:-1), y+1, z) == this; bitMatrix[1] = world.getBlock(x, y+1, z) == this; bitMatrix[2] = world.getBlock(x+(side==2?1:-1), y+1, z) == this; bitMatrix[3] = world.getBlock(x+(side==3?1:-1), y, z) == this; bitMatrix[4] = world.getBlock(x+(side==2?1:-1), y, z) == this; bitMatrix[5] = world.getBlock(x+(side==3?1:-1), y-1, z) == this; bitMatrix[6] = world.getBlock(x, y-1, z) == this; bitMatrix[7] = world.getBlock(x+(side==2?1:-1), y-1, z) == this; break; case 3: bitMatrix[0] = world.getBlock(x+(side==2?1:-1), y+1, z) == this; bitMatrix[1] = world.getBlock(x, y+1, z) == this; bitMatrix[2] = world.getBlock(x+(side==3?1:-1), y+1, z) == this; bitMatrix[3] = world.getBlock(x+(side==2?1:-1), y, z) == this; bitMatrix[4] = world.getBlock(x+(side==3?1:-1), y, z) == this; bitMatrix[5] = world.getBlock(x+(side==2?1:-1), y-1, z) == this; bitMatrix[6] = world.getBlock(x, y-1, z) == this; bitMatrix[7] = world.getBlock(x+(side==3?1:-1), y-1, z) == this; break; case 4: bitMatrix[0] = world.getBlock(x, y+1, z+(side==5?1:-1)) == this; bitMatrix[1] = world.getBlock(x, y+1, z) == this; bitMatrix[2] = world.getBlock(x, y+1, z+(side==4?1:-1)) == this; bitMatrix[3] = world.getBlock(x, y, z+(side==5?1:-1)) == this; bitMatrix[4] = world.getBlock(x, y, z+(side==4?1:-1)) == this; bitMatrix[5] = world.getBlock(x, y-1, z+(side==5?1:-1)) == this; bitMatrix[6] = world.getBlock(x, y-1, z) == this; bitMatrix[7] = world.getBlock(x, y-1, z+(side==4?1:-1)) == this; break; case 5: bitMatrix[0] = world.getBlock(x, y+1, z+(side==4?1:-1)) == this; bitMatrix[1] = world.getBlock(x, y+1, z) == this; bitMatrix[2] = world.getBlock(x, y+1, z+(side==5?1:-1)) == this; bitMatrix[3] = world.getBlock(x, y, z+(side==4?1:-1)) == this; bitMatrix[4] = world.getBlock(x, y, z+(side==5?1:-1)) == this; bitMatrix[5] = world.getBlock(x, y-1, z+(side==4?1:-1)) == this; bitMatrix[6] = world.getBlock(x, y-1, z) == this; bitMatrix[7] = world.getBlock(x, y-1, z+(side==5?1:-1)) == this; break; } int idBuilder = 0; for (int i = 0; i <= 7; i++) idBuilder = idBuilder + (bitMatrix[i]?(i==0?1:(i==1?2:(i==2?4:(i==3?8:(i==4?16:(i==5?32:(i==6?64:128))))))):0); return idBuilder>255||idBuilder<0?textures[0]:textures[textureRefByID[idBuilder]]; } @Override public IIcon getIcon(int side, int meta) { return textures[0]; } } Any help is appreciated! Thanks!
-
Include DepLoader to download FMP and CCL gradle 1.7.2
If you don't know what that means, please do not reply. If you do, the question is simple. I have my build script set up to include CCL and FMP through maven (no new repos for those two, downloaded from forge at building), but does anyone know how to include DepLoader from CCL to download FMP and CCL like you would in 1.6.x? --MOVED FROM MAIN MODDER SUPPORT
-
[1.7] CallableMinecraftVersion?
String mcversion = MinecraftForge.MC_VERSION;
-
[1.7.2] Techne problems.
Use the AdvancedModelLoader if you don't want to use techne. video on making a model: only one vid in the series, but it should be good enough for getting started.
-
Gradle 1.6.4?
just downloaded build 964 locked topic now.
-
Gradle 1.6.4?
I need a link to a gradle version of 1.6.4 - build 965. A lot of people were complaining about gradle, so apparently lex or someone removed it in 16. I like it! I need it! Any links/help would be appreciated.
-
[1.7.2][Solved] Sending text from onBlockActivated sends message twice
diesieben, I know this is solved, but was looking around the forum, and notice you used == false. You can just do if(!world.isRemote) . Just though I would point it out, I generally use that method because its faster. Happy coding!
-
[Solved] A block with different faces? e.g. Furnace
I would create a new ItemBlock, that's how wool renders differently in your inventory (and hand) based on metadata. http://www.minecraftforge.net/wiki/Metadata_Based_Subblocks#MultiItemBlock If you are experienced in java you should be able to use this tutorial to get the results you want. --Alix
-
Place solid block dependent blocks on a non-solid block?
Thanks I was looking in Block.class and seeing how isOpaqueCube was used, and that led me to nothing. Thanks for the help!
-
Place solid block dependent blocks on a non-solid block?
I have a transparent block (ModBlockConnectedTextureTransparent... I'm pretty sure at least), and I have tried a few thing sot get redstone, levers, etc on it, but I can't figure it out. My code is at https://github.com/alix-the-alicorn/Carbon-Mod/blob/17/common_carbonmod/com/jmanpenilla/carbonmod/common/block/ModBlockConnectedTextureTransparent.java. Any help is appreciated!
-
[Solved] [1.6.4] Disabling the F3 menu/coordinates
http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/ This is still relevant in 1.6.4.
-
Right click/clicked block not working
Yeah, I decided to do that. I wanted to reuse the class, which is why I was trying to do all of that shenanigans stuff. Thanks for all the help though.
-
Right click/clicked block not working
Yeah, items are initialized before blocks. I need access to the grown block and ingrown block to be able to preform my right/left click actions and my update tick method. So how am I supposed to do that without having blocks in the constructor? If you look on the github you can see what else I have tried (check ModBlocks.java).
-
Right click/clicked block not working
Yeah, I knew my initialization order was sort of screwed up. But I need to have access to the ungrown and grown blocks in the block class. Again, it's on github, and more updated. I'm gonna try a few things but any other ideas are appreciated. Thanks
IPS spam blocked by CleanTalk.