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.

jtmnf

Members
  • Joined

  • Last visited

Everything posted by jtmnf

  1. But this is the only code that matters... I implemented IEnergyHandler and implemented those methods... I created an EnergyStorage on my TileEntity and then, the receiveEnergy() method should work if energy is received...
  2. You are right on that, my bad! But now, it doesn't charge! /* ====================================================================================== */ /* =================================== IEnergyHandler =================================== */ /* ====================================================================================== */ @Override public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { return energyStorage.receiveEnergy(maxReceive, simulate); } @Override public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) { return 0; } @Override public int getEnergyStored(ForgeDirection from) { return energyStorage.getEnergyStored(); } @Override public int getMaxEnergyStored(ForgeDirection from) { return energyStorage.getMaxEnergyStored(); } @Override public boolean canConnectEnergy(ForgeDirection from) { return true; } I know I'm missing something, but I'm not sure what is it...
  3. Hi! I'm using Redstone Flux API to make my blocks (TileEntities) store some energy! Everything worked fine here! But, I'm having some problems... If I have 2 or more blocks placed (they can be far away for each other) they share the same energy, even if they aren't charging... Imagine that I have 3 blocks placed, the X, the Y and the Z... Y and Z are far away from the X... I open the GUI of the 3 of them and the energy is 0... But, if I charge the X, all three blocks start to have energy... The energy is shared , but the GUI don't... I have this in the TileEntity: public static EnergyStorage energyStorage = new EnergyStorage(1000000); With this, I thought I could separate each block with is own energystorage and not share with others... But that's what's happening... If I'm charging one block, the others are charged too :\ What am I doing wrong? Thanks, João Fernandes
  4. Solved it! My bad -.- I forgot to mess around with the hoverStart value...
  5. Hi! I was trying to render an item in the GUI... I used: @Override public void drawBackground(InterfaceCustomFurnace gui, int x, int y) { if(this.tileEntityCustomFurnace.getStackInSlot(1) != null) { GL11.glPushMatrix(); GL11.glTranslatef(gui.getLeft() + 30, gui.getTop() + 35, 100); float scale = 60F; GL11.glScalef(-scale, scale, scale); GL11.glRotatef(180, 0, 0, 1); RenderHelper.enableStandardItemLighting(); RenderManager.instance.renderEntityWithPosYaw(tileEntityCustomFurnace.item, 0, 0, 0, 0, 0); RenderHelper.disableStandardItemLighting(); GL11.glPopMatrix(); } } but the item speed is too high! http://i.imgur.com/2wpc6wM.jpg I try to change some variables, but it stays the same :\ Thanks for any help
  6. Thanks mate ^^ it worked pretty well!
  7. Hm, ok! So, if I understand right what you said, I need somthing like this: But how do I apply it? That's my question... If I have an icon front[2], if I put in front[0] = theOverlay and in the front[1] = testBack, how do I render in multiple passes? Thanks for the answer João Fernandes
  8. I read this topic (http://www.minecraftforge.net/forum/index.php/topic,11558.msg59576.html#msg59576) but I didn't understand very well how to do it :\ I.e. I have a texture named "testBack" that has a screen (transparent), and I have another texture named "theOverlay"... How can I register them so I can have the screen with the texture theOverlay? @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister reg) { this.side = reg.registerIcon(textureSide); /* this next line is not what I have, it's just for showing what I want +- */ this.front = reg.registerIcon(testBack + theOverlay); } @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int metadata){ if (side == 1) return this.side; else if (side == 0) return this.side; else if (metadata == 2 && side == 2) return this.front; else if (metadata == 3 && side == 5) return this.front; else if (metadata == 0 && side == 3) return this.front; else if (metadata == 1 && side == 4) return this.front; else return this.side; } Thank you João Fernandes
  9. And even if he knows, he's helping! Honestly, the problem wasn't in his methods (and I understand them, believe it or not), was in my genialityof open the project on a wrong way... I enjoyed your method, and I'll use it for now on Thanls ^^ PS. I'm not saying that he doesn't overly complicate the things! I agree with you Diesieben07, but we are different!
  10. Thanks Diesieben07 I changed but even that solved it... But... I'm stupid to didn't realise that the gradle wasn't actually the proper gradle... So, now it works because I re-install everything, but I think your method is better Second: I don't think we have to yell to people if we don't like anything that they do... Pahimar tryed his best to help others! I watch him like I watch VSWE Summer Courses! I know that some methods are better than others, but come on... He is trying to help! Thanks for the suggestion, I'm going to apply it
  11. Hey guys! So, I don't understand what's going on, but the textures aren't loading... I chcked twice for the textures names, modid, etc, but I cannot find anything wrong... Maybe another guy's eyes can help! ItemGrind Class public class ItemGrind extends InitItems { public ItemGrind() { super(); this.setUnlocalizedName("grind"); } } InitItems Class public class InitItems extends Item{ public InitItems() { super(); this.setCreativeTab(InitCreativeTab.JFARM_TAB); } @Override public String getUnlocalizedName(){ return String.format("item.%s%s", ModReference.MOD_ID.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName())); } @Override public String getUnlocalizedName(ItemStack itemStack){ return String.format("item.%s%s", ModReference.MOD_ID.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName())); // item.modid:itemname.name } @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconRegister){ itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1)); } protected String getUnwrappedUnlocalizedName(String unlocalizedName){ return unlocalizedName.substring(unlocalizedName.indexOf(".")+1); } } Registry of the item public class JFarmItems { public static final InitItems grind = new ItemGrind(); public static void initJFarmItems(){ GameRegistry.registerItem(grind, "grind"); } } Other things: Modid: public static final String MOD_ID = "jfarm"; Texture Location: src/main/resources/assets/jfarm/textures/items/grind.png I must be very blind... I'm sure there is something that I'm not seeing well... Thanks João Fernandes
  12. kennybenny, look at diesieben07 answer!
  13. Nothing at all... .mod says that this is the mod, .block says that this is the package of blocks...
  14. No :\I have made exactly like you... Video: I picked up parts of the video and they worked well...
  15. This is my code (I'll only paste the important ones): MainClass public class MainClass { public static final String MODID = "techmodcraft"; public static final String VERSION = "1.0"; public static CreativeTabs testTab = new CreativeTabs("techmodcraft") { @Override public Item getTabIconItem() { return Items.diamond; } }; public static Block blockTest; @EventHandler public void preInit(FMLPreInitializationEvent event){ blockTest = new BlockTech().setBlockName("blockTest").setCreativeTab(testTab); GameRegistry.registerBlock(blockTest, "blockTest"); } BlockTech public class BlockTech extends Block{ public BlockTech() { super(Material.rock); this.setBlockTextureName(MainClass.MODID + ":" + "blockTest"); } } In the Package Explorer I have: - Forge > src/TechModCraft: > assets.techmodcraft.textures.blocks > (this has the images of blocks) > net.techmodcraft.mod.block > (this has the .java classes) If you don't find any error by comparing with my setup, try to re-create the project... That might help! I'll continue to see this...
  16. I'm not tracking the error there :\ Tomorrow I'll see with other eyes if the error wasn't founded yet! I'll check during the day what kind of problems might cause that... For now I'm not really seeing what's wrong :\
  17. Can I see a printscreen of your package explorer, please? I cannot see the end of the assets.mod.textures...
  18. Instead of PlayerTickEvent, try TickEvent.PlayerTickEvent;
  19. You might have this setup wrong (this is how I did to texture a block and it worked fine)!
  20. Yeah, forget... I copy/paste that and forgot to take the Texture
  21. Rokuw, do you mean: (...) orePlatinum = new BlockPlatOre().setBlockName("orePlatinum").setBlockTextureName(MODID + ":" + "orePlatinum"); GameRegistry.registerBlock(orePlatinum, "orePlatinum"); (...) and public class BlockPlatOre extends Block { public BlockPlatOre() { super(Material.iron); this.setBlockTextureName(moreMetalsMod.MODID + ":" + "orePlatinum"); this.setCreativeTab(moreMetalsMod.moreMetalsTab); } } This?
  22. You need to import the class moreMetalsMod! Then you do this: package k3.moreMetals; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import blablabla.moreMetalsMod; //Please do ask why blablabla.moreMetalsMod doens't work! public class BlockPlatOre extends Block { public BlockPlatOre() { super(Material.iron); this.setBlockTextureName(moreMetalsMod.MODID + ":" + "orePlatinum"); } } And leave the Creative tab in the preInit...
  23. You can use pastebin OR just [-code][-/code] in here (remove the "-" inside de brackets)!
  24. Coolboy4531, thank you for the tip That was the solution ^^ I really appreciate 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.