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.

gmod622

Members
  • Joined

  • Last visited

Everything posted by gmod622

  1. Hello! So during creation of a plant, I ran into an error, upon right clicking tilled soil: Some of the lines leads me to believe its something to do about my seed. So here is my seed class: And here is where I'm Registering the item: My Main Class. And finally, my Client Proxy: [NOTE:] Yes, I understand that my code is very messy, uncommented, etc, this is just a test project. Thanks.
  2. Hello all! So I was messing around with creating a crop, and I ran into an interesting 'error'. Reason I quote that, is because the console says nothing about missing textures or .json. So I'm a bit stuck, and getting into game, I found out that jumping on the crop, won't trample it, but the tilled soil will disappear. [NOTE:] The Code is messy and uncommented, due to this being a test project! As well, I know there is already 'melon' in the game, again, testing. ModelHandler: Main Class Pre-Init ( Only thing that I changed ) Watermelon Seed-Block Class ModBlocks Class: Watermelon Seed: ModItems:
  3. Pretty much a solar pannel, I need to be able to check if its day, and if it has visibility to the sky, I looked through the block class and did not find any thing interesting. Thanks, -gmod622
  4. Thank you! +1 I feel so dumb now
  5. Thanks for the help, but i need the variable to be static, in my GUI class it prints the power lvl: fontRendererObj.drawString(StatCollector.translateToLocal("Power (DP): " + (short)TileEntityChargingStation.power, 75, 65, 0x404040);
  6. Hello, I have created a furnace type block, with 2 input slots. Everything works fine, then I added a power varible. I saved it to NBT, then read it, but when I place down 2 Charging Station, both power levels read the same. If you need any more code or infomation, just say. Here is a small video of whats happening: https://www.youtube.com/watch?v=AIOpvkqamOc Tile Entity:
  7. I was told that damage is inverted... 128 Damage taken to the item.
  8. public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if(par1ItemStack.getItemDamage() < 2) { //Change Item here. } }
  9. Maybe try this method? public void onEntityWalking(World par1World, int par2, int par3, int par4, Entity par5Entity) { //Potion code }
  10. Hello, My "Charging Station" is a dual input machine. And what I need is to have a battery that gains durability everytime it goes into the station. Here is what I have so far: private static ItemStack getOutput(int i, int j) { if (i == main_ProcessCraft.BatteryEmpty.itemID && j == Block.blockRedstone.blockID || i == Block.blockRedstone.blockID && j == main_ProcessCraft.BatteryEmpty.itemID) { return new ItemStack(main_ProcessCraft.BatteryEmpty, 1); //add damage code here(add durability) and I already tried adding .damageItem(-1, EntityPlayer); but EntityPlayer can not be use. } } Any help will be appreciated!
  11. Something like this: public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par1ItemStack.addEnchantment(Enchantment.sharpness, 2); // NAME LVL }
  12. I have a conditional that checks for a certain value, then I want it to switch the item with a different one? Any help on this problem will be appreciated.
  13. ok thanks, now to send the energy data from one wire to another, and if it can to a machine
  14. Here is what I have so far... package gmod.mods.ProcessingCraft.main.block.tileentity; if(this.worldObj.getBlockTileEntity(this.xCoord+1, this.yCoord, this.zCoord) != null) { if(this.worldObj.getBlockTileEntity(this.xCoord+1, this.yCoord, this.zCoord) instanceof TileEntityWire) { //****can send data, But how? } }
  15. I already have the block class, that is a BlockContainer, and already created the TileEntity class too. Any help to my problem will be appreciated!
  16. 1st. Learn the Minecraft methods and functions, java is not the only thing you need to know. 2nd. start basic, quarrys are more advance, especially if you want them to give you the items. 3rd. Read source codes( DONT COPY WHOLE SECTIONS OR EVEN WHOLE MODS ), source codes are very helpful, Buildcraft for example is open source, and it has a quarry, so you can see how it works and apply it to your mod.
  17. well I tried adding this, but it did not help int d = j.getItemDamage(); if(d > 128) { inv.setInventorySlotContents(i, null); }
  18. NEW PROBLEM: Now the item wont break even thou the durability is below 0. CODE: Main Class (Recipe & Registration of handler) : Crafting Handler: Item File: Any Help to my problem will be appreciated!
  19. Here is what I have so far: public class ItemWelder extends Item { public ItemWelder(int par1) { super(par1); this.setCreativeTab(CreativeTabs.tabBlock); this.bFull3D = true; this.maxStackSize = 1; this.canRepair = true; this.setMaxDamage(128); } }
  20. Do I have to use the mod api? ( Thermal Expansion )
  21. And is this right for checking if there is the certain tile entity next to it: public class TileEntityWire extends TileEntity { public void updateEntity() { if(this.worldObj.getBlockTileEntity(this.xCoord+1, this.yCoord, this.zCoord) != null) { //Can Send DATA } if(this.worldObj.getBlockTileEntity(this.xCoord-1, this.yCoord, this.zCoord) != null){ } if(this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord+1, this.zCoord) != null) { } if(this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord-1, this.zCoord) != null) { } if(this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord+1) != null){ } if(this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord-1) != null) { } }
  22. Great thanks, and how would I send data between blocks.
  23. I have a Tile entity that I want to send data, I've been studying tile entities, For checking for the tile entity next to it would I use this?: this.worldObj.blockHasTileEntity(this.xCoord+1, this.yCoord, this.zCoord); this.worldObj.blockHasTileEntity(this.xCoord-1, this.yCoord, this.zCoord); this.worldObj.blockHasTileEntity(this.xCoord, this.yCoord+1, this.zCoord); this.worldObj.blockHasTileEntity(this.xCoord, this.yCoord-1, this.zCoord); this.worldObj.blockHasTileEntity(this.xCoord, this.yCoord, this.zCoord+1); this.worldObj.blockHasTileEntity(this.xCoord, this.yCoord, this.zCoord-1); And make it enter a Boolean to check if it can send data between the tile entities But I don't know if that will check for the certain tile entity class, or just all tile entities classes(chest, hopper). I'm trying to target a wire that can send custom data( energy, speed dependent on energy) And for the transferring data I still yet know how to. Any help will be VERY appreciated.

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.