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.

RafaMv

Members
  • Joined

  • Last visited

Everything posted by RafaMv

  1. RafaMv replied to RafaMv's topic in General Discussion
    Yeah, I used Blender. Actually, I've released kind of a demo for this mod. You can check it out here (Fossil Hunting Mod): http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2147043-fossil-hunting-mod
  2. Hello guys, I need some help to send my packet and synchronization. I created the following packet in my tileentity class: However it is called only when I place the block or reenter the game. I would like to sync it with my renderer, actually just once, since it's expensive. But I don't know how to do it... So I can't get the right variables from the tileentity.
  3. Finally I figured it out! My texture was larger than 16x16. For some reason minecraft doesn't read images bigger then 16x16 for breaking particle. I didn't know that...
  4. I think you are missing the IGuiHandler.
  5. Path: FossilHunter.MODID + ":textures/blocks/", my mod id is all lowercase. Really, so how do people do collision? Ghost blocks?
  6. I passed the name of my texture in the block src folder, do I need to add .png? And yes, my block is larger than 1x1x1.
  7. Hey guys, I was wondering what I need to set a texture to the particles of a custom rendered block. I tried to use "setBlockTextureName()", but it seem not to work. In addition, I also had some problems about collisions. I know that I need another method apart from "this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);" which I believe that works only for blocks smaller that 1x1x1.
  8. Hello guys, I was wondering if there is any method similar to addInformation() but for blocks instead of items. I've looked in block class but I've found nothing. I also was wondering, which one is better way for store an variable in an item: using damage or NBT?
  9. Found it! I forgot to write super.writeToNBT(), and super.readFromNBT()... Ops
  10. Ok, I still have a little problem, how can I sync the TE when the game restart... I get the wrong texture if I reenter the world.
  11. Thanks diesieben, it worked! Although It worked, I have never done this kind of synchronization before... so I would like to know if I did it right: @Override public Packet getDescriptionPacket() { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("idnumber", (byte) id); return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbttagcompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { this.id= pkt.func_148857_g().getByte("idnumber"); }
  12. Hello guys! I was wondering, is it possible to render an TE depending on a variable in the TE class? I tried something but it doesn't work, and I also think that is not the best way to do that. Is there a better way to do that (or at least something that works)? My attempt: public class RenderTileEntityModelAndBase extends TileEntitySpecialRenderer { private ModelBase modelBase = new ModelBase(); private static final ResourceLocation textureBase = new ResourceLocation(DEX.MODID + ":" + "textures/models/StoneBase.png"); private static final ResourceLocation textureModel = new ResourceLocation(DEX.MODID + ":" + "textures/models/Model.png"); private Model0 model0 = new Model0(); private Model1 model1 = new Model1(); @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) { if (tileEntity instanceof TileEntityMyModel) { TileEntityMyModel tile= (TileEntityMyModel) tileEntity; System.out.println("ID: " + tile.getID()); GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glScalef(1.0F, 1.0F, 1.0F); GL11.glTranslatef((float) x + 0.5F, (float) y, (float) z + 0.5F); GL11.glRotatef(0.0F, 0.0F, 0.0F, 0.0F); FMLClientHandler.instance().getClient().renderEngine.bindTexture(textureBase); modelBase.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); // ------------------------------------------------------------------------------ GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glScalef(1.0F, 1.0F, 1.0F); GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); GL11.glRotatef(0.0F, 0.0F, 0.0F, 0.0F); FMLClientHandler.instance().getClient().renderEngine.bindTexture(textureModel); switch (tile.getID()) { case 1: model0.render(); break; case 0: model1.render(); break; default: } GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } } } More info: The variable that I want to use is only set later by this method: public TileEntityMyModel() { id = -1; } public void setID(int id) { this.fossilID = id; } //Here public int getID() { if (id >= 0) { return id; } else { return 200; // just a test } }
  13. RafaMv posted a topic in General Discussion
    Hello guys! I am working on a dinosaur mod, and I've started doing some 3d models. Actually, this is my question, I'm trying to create some good models that fit in minecraft, so I would like some opinions about this one here, which is a generic small theropod: Just for reference, I based my model on this image: If you have any idea, I can definitely think about it!
  14. Hello guys! I am working on a dinosaur mod, and I've started doing some 3d models. Actually, this is my question, I'm trying to create some good models that fit in minecraft, so I would like some opinions about this one here, which is a generic small theropod: Just for reference, I based my model on this image: If you have any idea, I can definitely think about it!
  15. Wow, I haven't seen that! That explains why I could access the same items from different blocks, which was a bug that I haven't notices before, hahaha. Thanks diesieben07, you've just made my day!
  16. Ok, I admit I don't know what I am doing wrong now... Let me explain what I'm trying to achieve: - I am trying to create an barrel that acts like a furnace. Instead of using items as fuel, the player must click the barrel with an water bucket, or add the bucket in the GUI... This will increase the progress bar (working fine). - I have 1 slot (slot[0]) that accepts paper, one that gives me wet paper (slot[1]), another that accepts water buckets (slot[2]), and finally one that gives me the bucket back (slot[3]). - As I already explained, I added an method that adds water if the player has an water bucket on hands, if so I increase the water stored in the barrel (working fine). Problems: 1. Slots act very weird. I can add items, but they will show 2x more items (some thing about client, I think), and if I left-click to remove, they just disappear, and right-click remove only one item (I tried to create an custom Slot, but it didn't work as well). 2. All barrels have different stored water values and GUI interfaces, but when the method that decreases the stored water is called, all barrels act like one, and all water stored values get mess up. I believe that both problems are connected... but I can't find a solution. TileEntity, Container, and GuiContainer code: https://gist.github.com/anonymous/5e4a6b8ece48b61d718a I've tried so hard on this piece of code and nothing... T-T
  17. I think that you have to call this in the end of your method: super.breakBlock(world, x, y, z, block, meta); To break your block with a specific tool you can use "harvestBlock", then player.getHeldItem().getItem(). I hope this will help.
  18. Ok, I found a way to do what I wanted. It is basically the same idea, but using "breakBlock" method. I also need to use the "quantityDropped" method to avoid dropping the block itself. Thanks for your help, diesieben07!
  19. Right, it didn't work yet. I think I am doing something wrong... Actually, the method is not being called. https://gist.github.com/anonymous/ac78fcbc40f3648ad127
  20. Hi guys, I want to create a damaged item when I break a block that has a TE. I have to return a variable from this TE to set the damage, but it always return a null TE. onBlockDestroyedByPlayer method: https://gist.github.com/anonymous/4b46be02172899d30655 I also tried using harvestBlock method, but it returns null as well...
  21. Thanks for your reply, diesieben07. I have figured out another approach for my problem without using TE. I created a class that returns values depending on the block position, which is basically what I needed.
  22. I would like to know what is the best way to generate a kind of "ore" that stores some data which I can get somehow later (breaking or right click). I plan to get more than 16 "types of ore", so I cannot use metadata. I also think that I cannot use tile entities since it would be spawned and probably cause a terrible lag. So, what do you guys suggest? (I had a strange idea about textures. If they have textures with different paths, then I would be able to compare later.) Thanks for all the help.

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.