Everything posted by blfngl
-
[Solved][1.8]Item slots relocating in gui
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:
-
[1.7.10]NBT data reverts to 0 during item updates
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.
-
[1.7.10]NBT data reverts to 0 during item updates
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?
-
[1.7.10]NBT data reverts to 0 during item updates
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?
-
[1.7.10]NBT data reverts to 0 after right click
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?
-
[1.7.10]NBT data reverts to 0 after right click
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.
-
[1.7.10]NBT data reverts to 0 after right click
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:
-
[SOLVED][1.7.10]setUnlocalizedName() method not found?
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?
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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.
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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.
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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"); } }
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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.
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
boomp
-
[SOLVED][1.7.10]Projectile doesn't register hitting entities
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:
-
Null Pointer Exception on Custom Crafting Table
Thanks
-
Null Pointer Exception on Custom Crafting Table
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
-
[1.7.2]Shapeless Recipe Crashing Game
Thanks, that fixed it
-
[1.7.2]Shapeless Recipe Crashing Game
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
-
[1.7.2]Shapeless Recipe Crashing Game
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:
-
[1.7.2]Shapeless Recipe Crashing Game
I tried that and got the same error GameRegistry.addShapelessRecipe(new ItemStack(healingPoultice), new ItemStack(caveFungus));
-
[1.7.2]Shapeless Recipe Crashing Game
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.
-
[1.7.2]Shapeless Recipe Crashing Game
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);
-
[Solved][1.7.2]Game Crash When Adding Items to Player's Inventory
Solved, had a derp moment and forgot to register jetInhaler.
-
[Solved][1.7.2]Game Crash When Adding Items to Player's Inventory
The item is called ultrajet. Main Class: Registry:
IPS spam blocked by CleanTalk.