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.

blfngl

Members
  • Joined

  • Last visited

Everything posted by blfngl

  1. So I've got this GUI that works fine without the public void initGui() method, however when I add it all of my item slots relocate to a new location outside of the gui. I need it to add buttons though. Help? The GUI in question:
  2. Any ideas anyone? -EDIT- I've been testing it more and the value doesn't always revert to zero, it reverts to what you originally set it to. The problem seems to come from the onItemRightClick method.
  3. So I tested each individual NBT data value and it seems that the values just don't store. Does anyone know what I'm doing wrong?
  4. So I've had this problem for a while now and nobody's been able to fix it, including me, so I thought I'd take it here again. Below, you can see the methods in an item that will fire a projectile when right clicked. The problem is when I was switching the player specific values for the gun, so it would work on servers, the value "clipCount" will be set to the correct amount and then subsequently be set to 0 after each reload. I checked the value while the reload loop was running; it would get set to 1, 2, 3, 4, etc without any zeros in the middle, but after the maximum value was reached and exited the reload loop the value would be set to 0. Help?
  5. So I removed all of my int clip = itemStack.stackTagCompound.getInteger("clip"); and replaced it with just the itemStack.stackTagCompound line, but I get the same result. No, not that. Those are local variables. He means this chunk and anything that references these: Item ammoType; String name; double reloadTime; double shotTime; int clipSize; float damage; float baseDamage; String fireSound; String reloadSound; int durability; int currentShotTime = 0; int currentReloadTime = 0; All of the variables excpet for the two at the bottom are static for everyone and I was going to change the last two once I could figure this out. Does having them effect the NBT data anyways?
  6. So I removed all of my int clip = itemStack.stackTagCompound.getInteger("clip"); and replaced it with just the itemStack.stackTagCompound line, but I get the same result.
  7. So I've made a gun that used to store bullets as a local variable and am now switching it to be NBT stored, however the gun's "clip count" (how many bullets are loaded) keeps reverting to 0 before it ever fires a shot, even after being reloaded. Help? ItemGun:
  8. Hi, I'm getting a very strange error after running gradlew jar and trying to test my mod on an actual minecraft client. It works fine in eclipse, but I'm getting this error when I run it in minecraft: Help?
  9. Nope, unfortunately that didn't fix it. However, I did solve the problem by changing the entity to spawn on the server side instead of the client side, thanks for your help
  10. Fixed the super so it included that param, *facepalm* However, the bullet still doesn't collide with any entities, but it does render fine and the explosion occurs when it hits the ground.
  11. I moved the registration to main init method but it didn't change anything. Could it be my spawn code, as in I'm spawning it but not where I want it? This is called when you right click: world.spawnEntityInWorld(new EntityBullet(world, damage)); And this is the object code: Once again, the problem is the entity is now no longer visible (used to render as a cube) and does not detect when it hits an entity.
  12. I had forgotten to register the entity However, before I did this the entity would show up as a cube but now it just doesn't render at all. I put the code here, in my client proxy: package blfngl.fallout.proxy; import net.minecraft.client.renderer.entity.RenderSnowball; import blfngl.fallout.Fallout; import blfngl.fallout.entity.projectile.EntityBullet; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ClientProxy extends CommonProxy { @Override @SideOnly(Side.CLIENT) public void initRender() { EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", 0, Fallout.instance, 80, 1, true); RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderSnowball(Fallout.emptySyringe)); LanguageRegistry.instance().addStringLocalization("entity.bullet.fallout.name", "fallout"); } }
  13. So I tried your breakpoint idea but it never "stopped" and the onImpact was simply never called, ever, even when it hit the ground. I also added this line of code to test it in-game, but the explosion only occurred on the block behind the entity and the bullet kept traveling through entities. this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.0F, true); I've also tried changing the instanceof to different classes, such as Entity, EntityLiving, EntityLivingBase, etc, but none seem to work. Pretty stumped with this one.
  14. So I wrote a simple gun item, but a huge problem with it is that the bullet won't ever register hitting an entity. Hits blocks fine though. Help? Code:
  15. So I've browsed the internet for about 3 hours looking for a fix, and spent another few working on it myself, but I'm stumped. I know (I think) my problem has something to do with how I've written the slots on the table, it's a 5x5, but I can't find the actual problem. The NPE happens when, in game, you right click on the block. Container Block This line causes the issues: player.openGui(Fallout.fallout, 0, var1, var2, var3, var4); Error report
  16. Thanks, that fixed it
  17. You asked for my main file I'm trying to be helpful I'll try to make it as clear as possible on this post. My issue is that whenever I try to add a recipe with my item called caveFungus like this: GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), caveFungus); or GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new Object [] {caveFungus}); or GameRegistry.addRecipe(new ItemStack(healingPoultice), new Object [] {"X", 'X', caveFungus}); eclipse registers no errors, but when I hit the launch button it throws an error: This is the shaped recipe error And then the shapeless recipe error It also doesn't work if I try this: GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new ItemStack(caveFungus)); or GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new Object [] {"X", 'X', new ItemStack(caveFungus)}); the game will run but the recipe won't be added. Main File Registering caveFungus ItemCaveFungus
  18. I should clarify something, when I tried the new ItemStack(caveFungus) the game wouldn't crash but the recipe just simply wouldn't work. Main:
  19. I tried that and got the same error GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new ItemStack(caveFungus));
  20. The block of code labeled "item" is the caveFungus item; I'll change that. It's like redstone wire, when you right click it on the ground it'll place the block version of it, which is a different class entirely.
  21. Hi all, I have an item that places a block when right clicked on the ground used in a recipe, however it crashes minecraft before it launches. My normal items work fine but this type doesn't. Error: Cave Fungus registry: ItemCaveFungus: FalloutItem: Recipe: GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), caveFungus); //, nevadaFruit, xanderRoot, brocFlower);
  22. Solved, had a derp moment and forgot to register jetInhaler.
  23. The item is called ultrajet. Main Class: Registry:

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.