
Bugzoo
Members-
Posts
268 -
Joined
-
Last visited
Everything posted by Bugzoo
-
Ok, so i've got that working. Now I only want it to start floating up when I right click on a block. How do I do that?
-
Yea, I know that, but how would I change it every 10 ticks?
-
I have a custom rendered block. I have this code GL11.glPushMatrix(); stack = new ItemStack(Blocks.diamond_block); this.entItem.hoverStart = 0.0F; RenderItem.renderInFrame = true; GL11.glTranslatef((float)x + 0.5F, (float)y + 1.02F, (float)z + 0.3F); GL11.glRotatef(180, 0, 1, 1); RenderManager.instance.renderEntityWithPosYaw(this.entItem, 0.0D, 0.0D, 0.01D, 0.0F, 0.0F); RenderItem.renderInFrame = false; GL11.glPopMatrix(); Which renderers a diamond block on my custom rendered block. I want the diamond block to move up one pixels every 20 ticks to give it a smooth floating animation. How would I do it?
-
I wanted to know if creating your own custom particles is different than 1.6. Here is the tutorial im about to watch: https://www.youtube.com/watch?v=k5ojuGEqySA. Will this tutorial work for 1.7.10?
-
Anybody?
-
I've set the harvest level to 2, but even when I break it with a wooden pick it drops the item. public BlockPlasticOre(Material Material) { super(Material); setHardness(3.0F); setCreativeTab(FinancialMod.financialTab); setResistance(5F); setStepSound(Block.soundTypeStone); this.setHarvestLevel("pickaxe", 2); } public Item getItemDropped(int metadata, Random random, int fortune){ return FinancialMod.Plastic; }
-
Well, it is in the assets folder, so lets leave it at that
-
You said I can't do it from within my mods assets folder, but I just did
-
Found out how to do it. I had to create a minecraft folder in my assets folder
-
So there is no possible way of doing this?
-
I already did. There is a string in there that sets the default texture path. How would I override it?
-
Anybody?
-
The error SHOULD be "MODID:textures/gui/creativeTab.png" cannot be found, but it is giving a whole different location
-
I already tried that, it didn't work
-
Here is the error
-
Use NBT. If your not sure about NBT here is a tutorial http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CC0QFjAB&url=http%3A%2F%2Fwww.minecraftforge.net%2Fwiki%2FCreating_NBT_for_items&ei=2lFqVP7vM8POsQTQhoKADw&usg=AFQjCNGeVFOr8_WH3FalvWv54A1NeQeCeg&sig2=6qUnbE5cSyUI8IRGEuuB0Q&bvm=bv.79142246,d.cWc Does that stay saved when you exit the world? That is what I'm using currently but I'm just not sure. @larsgerrits WorldSavedData could be a possibility. I'll look into it. Yea, that is what NBT is for, saving data
-
Maybe try this: .setBackgroundImageName(MODID + ":" "creativeTab") Didn't change anything
-
Use NBT. If your not sure about NBT here is a tutorial http://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CC0QFjAB&url=http%3A%2F%2Fwww.minecraftforge.net%2Fwiki%2FCreating_NBT_for_items&ei=2lFqVP7vM8POsQTQhoKADw&usg=AFQjCNGeVFOr8_WH3FalvWv54A1NeQeCeg&sig2=6qUnbE5cSyUI8IRGEuuB0Q&bvm=bv.79142246,d.cWc
-
Yep. the problem is if I do .setBackgroundImageName(MODID + ":" "textures/gui/creativeTab.png") It doesn't work
-
I used the .setBackgroundImageName() method, but that automatically assumes you have the GUI texture in the minecraft folder with all the default textures.
-
Ok, Now I stopped sending unused data I'm now sending to the server Now checks for server and recieves on server But still, nothing happens when I click the button
-
You said about sending unused data, where am I doing that?
-
How do I send it to the client? I've tried this code, but the player variable doesn't exist public void actionPerformed(GuiButton guibutton){ if(guibutton.id == 24){ // Sending packet to client if (player instanceof EntityPlayerMP) { IMessage msg = new SimplePacket.SimpleMessage(800, false); PacketHandler.net.sendTo(msg, (EntityPlayerMP)player); } } }
-
PacketHandler: package com.bugzoo.FinancialMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; public class PacketHandler { public static SimpleNetworkWrapper net; public static void initPackets() { net = NetworkRegistry.INSTANCE.newSimpleChannel("YourModId".toUpperCase()); registerMessage(SimplePacket.class, SimplePacket.SimpleMessage.class); } private static int nextPacketId = 0; private static void registerMessage(Class packet, Class message) { net.registerMessage(packet, message, nextPacketId, Side.CLIENT); nextPacketId++; } } SimpleMessage: package com.bugzoo.FinancialMod; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import com.bugzoo.FinancialMod.SimplePacket.SimpleMessage; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class SimplePacket implements IMessageHandler<SimpleMessage, IMessage> { Minecraft mc; @Override public IMessage onMessage(SimpleMessage message, MessageContext ctx) { // just to make sure that the side is correct if (ctx.side.isClient()) { ctx.getServerHandler().playerEntity.inventory.addItemStackToInventory(new ItemStack(FinancialMod.Wallet)); } return null; } public static class SimpleMessage implements IMessage { private int simpleInt; private boolean simpleBool; // this constructor is required otherwise you'll get errors (used somewhere in fml through reflection) public SimpleMessage() {} public SimpleMessage(int simpleInt, boolean simpleBool) { this.simpleInt = simpleInt; this.simpleBool = simpleBool; } @Override public void fromBytes(ByteBuf buf) { // the order is important this.simpleInt = buf.readInt(); this.simpleBool = buf.readBoolean(); } @Override public void toBytes(ByteBuf buf) { buf.writeInt(simpleInt); buf.writeBoolean(simpleBool); } } } Button: public void actionPerformed(GuiButton guibutton){ if(guibutton.id == 24){ // Sending packet to server IMessage msg = new SimplePacket.SimpleMessage(500, true); PacketHandler.net.sendToServer(msg); } }
-
I fixed that, now nothing is happening at all when I press the button