-
Posts
37 -
Joined
-
Last visited
Everything posted by stucuk
-
[Forge 1.10.2] Render white .OBJ model with specified RGB color?
stucuk replied to mrAppleXZ's topic in Modder Support
The following is all you need to turn RGB values into an int. Alpha is forced to 255 (Opaque): public static int rgb(int r,int g,int b) { return (b & 0xFF) | ((g & 0xFF) << 8) | ((r & 0xFF) << 16) | (255 << 24); } -
Having a tough time creating a crafting mechanic
stucuk replied to That_Martin_Guy's topic in Modder Support
You never want to use markDirty in the writeToNBT (or even readToNBT). markDirty tells minecraft that the chunk that the tile is in needs to be saved. writeToNBT is what minecraft uses when saving to get the Tile's NBT data. So your basically telling minecraft that the chunk your tile is in constantly needs to be saved. As i said before, only when *you* actually change somethings value which you want minecraft to save to the world do you call markDirty(). -
Having a tough time creating a crafting mechanic
stucuk replied to That_Martin_Guy's topic in Modder Support
there is no markDirty() anywhere in your code. For the TileEntity to be saved you need to mark it as dirty to tell Minecraft that the chunk needs saved. Whenever you set data that needs to be saved call markDirty() -
The way the weight system works is basically each item (Or model in your case) is given a value. The total weight is all the values added together. The WeightedRandom::getRandomItem just goes through all the items and subtracts their value from the number passed to it until the value is below 0. If it gets to below zero that item is returned. So lets say you had items each with a weight of 2. If you supply it with a value of 1 or 0, the first item is picked. If you supply it with a value of 2 or 3 the 2nd is picked, etc. It will always give you the exact same results with the same values passed to it. MathHelper.getPositionRandom gives you the same number each time for the same block position.
-
The random numbers are based on the blocks position in the world. BlockModelRenderer::renderModel() uses MathHelper.getPositionRandom(blockPosIn) for the random number. Which is passed to the WeightedBakedModel::getRandomModel which in turn uses Math.abs((int)p_188627_1_ >> 16) % this.totalWeight to work out the "Weight" which is used by WeightedRandom::getRandomItem . So basically the following would give you the weight: Math.abs((int)MathHelper.getPositionRandom(blockPosIn) >> 16) % totalWeight But you would have to work out what the totalWeight was as well as which model is picked based on the weight.
-
Since models are client side and its not based on a State/MetaData (Like snowy being true/false) i don't think there is any way to know.
-
If you want the torch to be above the block, then set its coordinates 1 block above it.... if you want it to the left of the block then set the torches coordinates to be 1 block to the left, etc. aka: BlockPos newpos = pos.offset(facing); You may also want to call the player.canPlayerEdit to see if the player has the editing rights to actually edit the block you want to place the torch in.
-
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
I use eclipse and never have touched the keybindings. By Autocomplete i mean the CTRL+SPACE thing. I just didn't know you could do it for actual method overrides. -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
In the guys defensive i never even knew you could get the IDE to generate an override method using the AutoComplete feature. Iv been playing with it since 2014 (And other languages for alot longer). -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
Assuming you have the same basic code as i posted for my packets handlepacket bit, In your TileEntity you need to implement it in the implements bit. I.E: public class BaseTileRedstone extends BaseTile implements IGUIPacketHandler { @Override public void HandleGUIPacket(EntityPlayer player, BlockPos pos, long value, byte extra) { //Do Something! Short and Long values go here! } @Override public void HandleGUIPacket_Float(EntityPlayer player, BlockPos pos, float value, byte extra) { } @Override public void HandleGUIPacket_ItemStack(EntityPlayer player, BlockPos pos, ItemStack value, byte extra) { } } Interfaces which the IGUIPacketHandler is, basically lay out stuff a thing should have. When you use the implements bit your stating what interfaces that class supports (Well implements). You can then treat that class as if it was that interface. Basically it allows you to do: TileEntity te = new MyTileEntity(); if (te instanceof IGUIPacketHandler) //Check its actually implemented the interface { ((IGUIPacketHandler)te).HandleGUIPacket(player,pos,1,0); //we can now treat the TileEntity as if it was a IGUIPacketHandler } -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
im guessing that the following is still the way to do things: public class SomeClassName extends Block implements ITileEntityProvider { @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new SomeTileEntityClass(someparameters); } } -
You forgot your crystal ball today?
-
Basically you just need to move all the code into a single for loop public class ItemGeneric { static public ItemBase item_nugget = null; static public ItemBase item_ingot = null; static public ItemBase item_chunk = null; public static void initItems() { for(EnumMaterialMetal enummaterial:EnumMaterialMetal.values()) { item_nugget = new ItemBase(enummaterial); item_nugget.setUnlocalizedName("nugget" + enummaterial.suffix); GameRegistry.register(item_nugget.setRegistryName("nugget" + enummaterial.suffix)); OreDictionary.registerOre("nugget" + enummaterial.suffix, new ItemStack(item_nugget, 1, 0)); item_nugget.setCreativeTab(IndifferentOres.altTabItems); IndifferentOres.proxy.registerItemRenderer(item_nugget); item_ingot = new ItemBase(enummaterial); item_ingot.setUnlocalizedName("ingot" + enummaterial.suffix); GameRegistry.register(item_ingot.setRegistryName("ingot" + enummaterial.suffix)); OreDictionary.registerOre("ingot" + enummaterial.suffix, new ItemStack(item_ingot, 1, 0)); item_ingot.setCreativeTab(IndifferentOres.altTabItems); IndifferentOres.proxy.registerItemRenderer(item_ingot); item_chunk = new ItemBase(enummaterial); item_chunk.setMaxStackSize(enummaterial.MAX_STACK_SIZE); item_chunk.setUnlocalizedName("chunk" + enummaterial.suffix); GameRegistry.register(item_chunk.setRegistryName("chunk" + enummaterial.suffix)); OreDictionary.registerOre("chunk" + enummaterial.suffix, new ItemStack(item_chunk, 1, 0)); item_chunk.setCreativeTab(IndifferentOres.altTabChunks); IndifferentOres.proxy.registerItemRenderer(item_chunk); GameRegistry.addRecipe(new ItemStack(item_ingot), new Object[] {"###", "###", "###", '#', item_nugget}); // Nine Nuggets will make one ingot. GameRegistry.addShapelessRecipe(new ItemStack(item_nugget, 9), new ItemStack(item_ingot, 1)); // One Ingot will make nine nuggets GameRegistry.addSmelting(item_chunk, new ItemStack(item_nugget, 3), 1.0F); //One ore Chunk will make three nuggets. } } } Which could be optimised: public class ItemGeneric { protected static ItemBase getItem(EnumMaterialMetal enummaterial, String _type) { ItemBase item = new ItemBase(enummaterial); item.setMaxStackSize(enummaterial.MAX_STACK_SIZE); item.setUnlocalizedName(_type + enummaterial.suffix); GameRegistry.register(item.setRegistryName(_type + enummaterial.suffix)); OreDictionary.registerOre(_type + enummaterial.suffix, new ItemStack(item, 1, 0)); chunk.setCreativeTab(IndifferentOres.altTabChunks); IndifferentOres.proxy.registerItemRenderer(item); return item; } public static void initItems() { ItemBase item_nugget; ItemBase item_ingot; ItemBase item_chunk; for(EnumMaterialMetal enummaterial:EnumMaterialMetal.values()) { item_nugget = getItem(enummaterial,"nugget"); item_ingot = getItem(enummaterial,"ingot"); item_chunk = getItem(enummaterial,"chunk"); GameRegistry.addRecipe(new ItemStack(item_ingot), new Object[] {"###", "###", "###", '#', item_nugget}); // Nine Nuggets will make one ingot. GameRegistry.addShapelessRecipe(new ItemStack(item_nugget, 9), new ItemStack(item_ingot, 1)); // One Ingot will make nine nuggets GameRegistry.addSmelting(item_chunk, new ItemStack(item_nugget, 3), 1.0F); //One ore Chunk will make three nuggets. } } } Note that if you wanted to access the items you would need to store them in an array or list in the getItem code or ask the registry for them using their registry name.
-
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
Are you sure the tile entity is actually being created? If there is no TileEntity being created it will return null when you try and get it. The onBlockActivated is called on both client and server, though as diesieben07 sais you want to call it on the server side. public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if(!world.isRemote) player.openGui(SpaceHeaterMod.mod, 1 , world, pos.getX(), pos.getY(), pos.getZ()); return true; } If we look at a trimmed down IGuiHandler you can see it specifies a bit for server and client. Forge does all the work at deciding which is called. You just tell it what to open and it then calls getServerGuiElement or getClientElement when needed: public class GuiHander implements IGuiHandler { @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; // We return a Server GUI Here (one that extends Container) } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; // We return a Client GUI Here (one that extends GUIContainer) } } -
Completely new to modding, but have an idea of what i want.
stucuk replied to Bluethefox's topic in Modder Support
At some point its best to add a config file which lists Blocks which shouldn't be moved (Or which blocks can stop the "teleport" process from happening). Which lets players get around the issue. Your guaranteed to have at least 1 mod out there which will crash when you try and move its block as they will never add certain checks like if the block they are communicating with is actually still in that spot. -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
You make it up. Each Mod handles its own guiID's, which is why you provide the mods instance. Your IGuiHandler basically selects the appropriate Container/GUIContainer based on the guiID you specified. If it makes it any easier you could think of loordgek's code with numbers instead of enums: public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tile = world.getTileEntity(new BlockPos(x, y, z)); // Get the Tile Entity! switch (ID) { //Which GUI do we want? case 0: return new ContainerUpgrade(player, (TileGenBase) tile); //We want GUI 0 case 1: return new ContainerFurnaceGen(player, (TileFurnaceGen) tile); //We want GUI 1 } return null; // ID was invalid... return null. } If you wanted the FurnaceGen GUI you would do: playerIn.openGui(SpaceHeaterMod.mod, 1 , worldIn, pos.getX(), pos.getY(), pos.getZ()); Since your passing the TileEntity to the container, you can use it to get the X/Y/Z coordinates when sending packets from the client to the server. Loordgek's GuiFurnaceGen stores the passed TileEntity in its self. -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
I don't think any of what i posted really needed an explanation, everything uses descriptive function/variable names which should mean self-explanatory code(People can always ask questions if they don't understand something). Cargo-cutting behaviour happens because people are impatient or lazy which will also happen when you tell them about a tutorial, which they will ignore all the descriptive text and go to the code at the bottom of it. So its a catch 22. I don't see how its bad to group it into a single packet when its just related to a single task. Overall the code is smaller with less duplication than a single packet for each. You would never want a single packet for everything but optimising code is generally a good idea when its applicable to the situation. P.S I won't post further about this as this post is technically off topic and i don't want to derail further (This is a notification of intent rather than a "Please don't post after me"). -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
People can learn from others code. I know from experience looking at actual code rather than being told the name of certain things is alot easier to understand when you can see the "Big Picture". Everything i posted is self contained clean code. Who wouldn't want to know why their solution isn't good? -
[1.11]Help with Packets, NBT, and Tile Entities
stucuk replied to its_meow's topic in Modder Support
The following is the packet code i use. Note that i have only tested on 1.10.2 but its likely to work with 1.11. Also note its slightly modified to work outside of my mod. You shouldn't need an int for what you want to do, short should work. The Packet Manager thingy, basically the same as SimpleNetworkWrapper except you don't need to specify packet id numbers. Replace "YOURMODSNAME" with a unique name: package stucuk.square.packets; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; public class MCPacketSystem { private int count = 0; private SimpleNetworkWrapper INSTANCE = new MCPacketSystem("YOURMODSNAME"); public MCPacketSystem(String name) { INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(name); } public <REQ extends IMessage, REPLY extends IMessage> void registerPacket(Class<? extends IMessageHandler<REQ, REPLY>> messageHandler, Class<REQ> requestMessageType, Side side) { INSTANCE.registerMessage(messageHandler, requestMessageType, count, side); count++; } public SimpleNetworkWrapper instance() { return INSTANCE; } public void inc() { count++; } } Basic Packet Class (Its used as a base for the actual packets): package stucuk.square.packets; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class MCBasicPacket implements IMessage { public void handlePacket(EntityPlayer player, Side side) { // } @Override public void fromBytes(ByteBuf buffer) { // } @Override public void toBytes(ByteBuf buffer) { // } @SideOnly(Side.CLIENT) public void hpc(MessageContext ctx) { handlePacket(FMLClientHandler.instance().getClient().thePlayer,ctx.side); } public void onMessage(MessageContext ctx) { switch (ctx.side) { case CLIENT: hpc(ctx); break; case SERVER: handlePacket(ctx.getServerHandler().playerEntity,ctx.side); break; default: } } public static void sendToServer(IMessage packet) { MCPacketSystem.instance().sendToServer(packet); } public static void sendToPlayer(IMessage packet, EntityPlayerMP player) { MCPacketSystem.instance().sendTo(packet, player); } } The actual packet class: package stucuk.square.packets; import java.io.IOException; import stucuk.square.interfaces.IGUIPacketHandler; import io.netty.buffer.ByteBuf; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketBuffer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import net.minecraftforge.fml.relauncher.Side; public class PacketGUI_ClientToServer extends MCBasicPacket implements IMessage, IMessageHandler<PacketGUI_ClientToServer, IMessage> { private int x,y,z; private short value; private long value64; private float valueF; private ItemStack valueStack; private byte extra; private byte datatype; @Override public IMessage onMessage(PacketGUI_ClientToServer message, MessageContext ctx) { message.onMessage(ctx); return null; } public PacketGUI_ClientToServer(){ } public PacketGUI_ClientToServer(int x, int y, int z, short value, byte extra){ this.x = x; this.y = y; this.z = z; this.value = value; this.extra = extra; this.datatype = 0; } public PacketGUI_ClientToServer(int x, int y, int z, long value64, byte extra){ this.x = x; this.y = y; this.z = z; this.value64 = value64; this.extra = extra; this.datatype = 1; } public PacketGUI_ClientToServer(int x, int y, int z, float valueF, byte extra){ this.x = x; this.y = y; this.z = z; this.valueF = valueF; this.extra = extra; this.datatype = 2; } public PacketGUI_ClientToServer(int x, int y, int z, ItemStack valueStack, byte extra){ this.x = x; this.y = y; this.z = z; this.valueStack = valueStack; this.extra = extra; this.datatype = 3; } @Override public void toBytes(ByteBuf buffer) { buffer.writeInt(x); buffer.writeInt(y); buffer.writeInt(z); buffer.writeByte(extra); buffer.writeByte(datatype); if (this.datatype == 0) buffer.writeShort(value); else if (this.datatype == 1) buffer.writeLong(value64); else if (this.datatype == 2) buffer.writeFloat(valueF); else if (this.datatype == 3) { PacketBuffer pb = new PacketBuffer(buffer); pb.writeItemStackToBuffer(valueStack); } } @Override public void fromBytes(ByteBuf buffer) { x = buffer.readInt(); y = buffer.readInt(); z = buffer.readInt(); extra = buffer.readByte(); datatype = buffer.readByte(); if (datatype == 0) value = buffer.readShort(); else if (datatype == 1) value64 = buffer.readLong(); else if (datatype == 2) valueF = buffer.readFloat(); else if (datatype == 3) { PacketBuffer pb = new PacketBuffer(buffer); try { valueStack = pb.readItemStackFromBuffer(); } catch (IOException e) { e.printStackTrace(); } } } public void blockHandlePacket(TileEntity te, EntityPlayer player, BlockPos pos, long value, byte extra) { ((IGUIPacketHandler)te).HandleGUIPacket(player,pos,value,extra); } public void blockHandlePacket(TileEntity te, EntityPlayer player, BlockPos pos, float value, byte extra) { ((IGUIPacketHandler)te).HandleGUIPacket_Float(player,pos,value,extra); } public void blockHandlePacket(TileEntity te, EntityPlayer player, BlockPos pos, ItemStack value, byte extra) { ((IGUIPacketHandler)te).HandleGUIPacket_ItemStack(player,pos,value,extra); } @Override public void handlePacket(EntityPlayer player, Side side) { BlockPos pos = new BlockPos(x,y,z); TileEntity te = player.worldObj.getTileEntity(pos); if (!(te instanceof IGUIPacketHandler)) return; switch (this.datatype) { case (0): blockHandlePacket(te, player, pos, value, extra); break; case (1): blockHandlePacket(te, player, pos, value64, extra); break; case (2): blockHandlePacket(te, player, pos, valueF, extra); break; case (3): blockHandlePacket(te, player, pos, valueStack, extra); break; } } public static void sendShort(int x, int y, int z, short value, byte extra) { sendToServer(new PacketGUI_ClientToServer(x,y,z,value,extra)); } public static void sendShort(int x, int y, int z, short value) { sendShort(x,y,z,value,(byte)0); } public static void sendLong(int x, int y, int z, long value, byte extra) { sendToServer(new PacketGUI_ClientToServer(x,y,z,value,extra)); } public static void sendLong(int x, int y, int z, long value) { sendLong(x,y,z,value,(byte)0); } public static void sendFloat(int x, int y, int z, float value, byte extra) { sendToServer(new PacketGUI_ClientToServer(x,y,z,value,extra)); } public static void sendFloat(int x, int y, int z, float value) { sendFloat(x,y,z,value,(byte)0); } public static void sendItemStack(int x, int y, int z, ItemStack value, byte extra) { sendToServer(new PacketGUI_ClientToServer(x,y,z,value,extra)); } public static void sendItemStack(int x, int y, int z, ItemStack value) { sendItemStack(x,y,z,value,(byte)0); } } The IGUIPacketHandler needs to be implemented in the TileEntity: package stucuk.square.interfaces; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; public interface IGUIPacketHandler { public void HandleGUIPacket(EntityPlayer player, BlockPos pos, long value, byte extra); public void HandleGUIPacket_Float(EntityPlayer player, BlockPos pos, float value, byte extra); public void HandleGUIPacket_ItemStack(EntityPlayer player, BlockPos pos, ItemStack value, byte extra); } Example code for TileEntity: public class BaseTileRedstone extends BaseTile implements IGUIPacketHandler { @Override public void HandleGUIPacket(EntityPlayer player, BlockPos pos, long value, byte extra) { //Do Something! Short and Long values go here! } @Override public void HandleGUIPacket_Float(EntityPlayer player, BlockPos pos, float value, byte extra) { } @Override public void HandleGUIPacket_ItemStack(EntityPlayer player, BlockPos pos, ItemStack value, byte extra) { } } Registering packets: MCPacketSystem.instance().registerPacket(PacketGUI_ClientToServer.class, PacketGUI_ClientToServer.class, Side.SERVER); Usage in a GUIContainer (x,y,z needs to be the coordinates of the TileEntity): PacketGUI_ClientToServer.sendShort(x, y, z, value, extra); note that the extra value doesn't need to be passed (defaults to 0), its basically an id which is useful if you need to send more than 1 value to a TileEntity as you can identify what each number sent is for. -
I'm i correct that to keep a Dynamic Texture "Alive" (as in always an allocated OpenGL texture) you need to use a modified texture class which forces the dynamic texture to update when loadTexture is called (Texture Manager seems to call it when onResourceManagerReload is called) ? Is there anywhere where Minecraft could delete the OpenGL texture without calling a loadTexture? package stucuk.square.client; import java.io.IOException; import net.minecraft.client.renderer.texture.DynamicTexture; import net.minecraft.client.resources.IResourceManager; public class SquareDynamicTexture extends DynamicTexture { public SquareDynamicTexture(int textureWidth, int textureHeight) { super(textureWidth, textureHeight); } @Override public void loadTexture(IResourceManager resourceManager) throws IOException { updateDynamicTexture(); } }
-
The Renderer uses the main Block spritemap for all of its drawing. If you set a custom texture before calling it then it will not look right as it will use the texture coordinates from the spritemap. I inferred nothing, i only stated that you would need to change the size of whats being rendered based on the direction it faces(Your pipe model for example seems to be rotated based on direction). You may need to render the fluid multiple times, i didn't bother looking at your full code. The code i supply won't do the full job for you, you need to modify it to suit your exact needs.
-
Remove all the rotate/translate opengl stuff. When you translate and then you tell it to draw the block at a certain location your telling it to draw it further away as you move it by say 100 and then you tell it to draw something 100 away from its current position (So your telling it to draw at 200 instead of 100). setRenderBounds is the only thing you need to change based on the blocks direction. P.S Your also binding a texture for some reason when you should have the Blocks texture bound. It won't render right unless you use the blocks texture.
-
You can't do that. RenderBlocks needs a world. in my tileentity i did: @Override public void func_147496_a(World world) { this.world = world; this.rb = new RenderBlocks(world); } where rb is the RenderBlocks; Note that func_147496_a may be different for you (My forge installation was likely at the start of 2015 for the code i am using). It is however the only method of TileEntitySpecialRenderer which uses World as an input parameter so it wouldn't be hard to work out its new name if it has one. Note: Minecraft uses this method rather than using the world given by the TileEntity you get from renderTileEntityAt, i am unsure if the TileEntity contains a valid world object but it could simply be so that RenderBlock's is only created once instead of each time the TileEntity is rendered.
-
fillAreaWithIcon is 2D drawing (And its meant for things like a bar that shows how much fluid a block has in a GUI). Your also supplying it the wrong parameters, it wants X,Y, width and height. Your sending it the UV coordinates which are the texture coordinates (Which are between 0 and 1). You can render it using the standard block rendering in minecraft. fluid.getBlock() will get you the block of the fluid. You can then render that using the render.setRenderBounds() to define the area. Something like the following: renderer.setRenderBounds(0,0,0,1,1,1); renderer.renderAllFaces = true; renderer.renderStandardBlock(fluid.getBlock(), tile.xCoord, tile.yCoord, tile.zCoord); renderer.renderAllFaces = false; You can also use the different renderFace methods (like renderFaceYNeg) to render individual faces with specific IIcon's for each side. Note: SetRenderBounds goes from 0 to 1 for sizes. You would need to have it use different values for different orientations of your pipe.
-
That would suggest your trying to draw the whole texture rather than just the 16x16 image in the texture. The UV Coordinates determine the area of the texture that is used.