Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bugzoo

Members
  • Joined

  • Last visited

Everything posted by Bugzoo

  1. 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?
  2. Yea, I know that, but how would I change it every 10 ticks?
  3. 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?
  4. 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?
  5. 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; }
  6. Well, it is in the assets folder, so lets leave it at that
  7. You said I can't do it from within my mods assets folder, but I just did
  8. Found out how to do it. I had to create a minecraft folder in my assets folder
  9. So there is no possible way of doing this?
  10. I already did. There is a string in there that sets the default texture path. How would I override it?
  11. The error SHOULD be "MODID:textures/gui/creativeTab.png" cannot be found, but it is giving a whole different location
  12. I already tried that, it didn't work
  13. Here is the error
  14. 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
  15. Maybe try this: .setBackgroundImageName(MODID + ":" "creativeTab") Didn't change anything
  16. 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
  17. Yep. the problem is if I do .setBackgroundImageName(MODID + ":" "textures/gui/creativeTab.png") It doesn't work
  18. I used the .setBackgroundImageName() method, but that automatically assumes you have the GUI texture in the minecraft folder with all the default textures.
  19. 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
  20. You said about sending unused data, where am I doing that?
  21. 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); } } }
  22. 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); } }
  23. I fixed that, now nothing is happening at all when I press the button

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.