Jump to content

blfngl

Members
  • Posts

    87
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Ayyy lmao

blfngl's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Sorry, here's the shoot method, where bulletSpeed is 7.0f: if (!world.isRemote) { EntityBullet bullet = new EntityBullet(world, player, damage); bullet.shoot(player, player.rotationPitch, player.rotationYaw, 0.0f, bulletSpeed, 1.0f); world.spawnEntity(bullet); }
  2. Exactly the title. I've got this projectile (EntityThrowable extension) that's not registering collisions at point-blank range, but if the player fires it approximately 5-6 blocks away hits register perfectly fine. Projectile: Registry: Any ideas how to fix this?
  3. Hi there, I'm using a non-container gui to handle some inventory manipulation. A button can be clicked and items from a player's inventory should be consumed: The change is marked in the inventory until I exit and then reenter the world. Am I supposed to be using Capabilities to handle this? Thanks!
  4. Just as the title states, I'm having trouble opening a container-less gui. It's just a button with a background as of now. I'm unsure if I'm handling it correctly, so any insight would be appreciated. So, what's happening is that the gui itself is opening perfectly fine, the button and background are drawing and the button functions, the console prints my message, but my background png (simply the demobackground.png provided by Minecraft) isn't drawing. There isn't an error message when opening the gui as well. I think this is all the relevant code and I've attached an image of what the gui is displaying. If you need anything else from me please let me know, thanks! Gui: GuiHandler: Block: Main: ClientProxy:
  5. Haven't checked in with Forge in a long time and I see there's been a lot of changes. Was attempting to update one of my old mods, and I'm needing to render a projectile, but (obviously) the way I used to do it doesn't work anymore. I'm trying this: but I'm not getting anything rendered. The entity is there and affects the world, but isn't visible. Any ideas?
  6. Kay, looks like this now: Now nothing at all happens. There's a keybind I'm using that tells an IExtendedEntityProperties class that a player is reloading and sets a certain integer mark that. After the player is done reloading, it sets the int back to 0, but I think it's all on the client side. Would that be the reason this isn't communicating? I inserted println checks and it wont stop printing after it reached the IExtendedEntityProperties check.
  7. Switched it to this: When I don't have the worldRemote check the ammo is consumed (and stays consumed), but the tag is not updated. If the check is there all it does is play the sound.
  8. That's what I had in the last block and is what I'm currently using: if (!world.isRemote) { player.inventory.consumeInventoryItem(ammoType); player.inventory.markDirty(); player.inventoryContainer.detectAndSendChanges(); clipCount++; //int currentClip = itemstack.getTagCompound().getInteger("clipCount"); //itemstack.getTagCompound().setInteger("clipCount", currentClip + 1); } This is the final check, but it still won't update. As shown above, a sound plays and then the bullets will load into the weapon. On screen it shows the current clip count out of clip size, ie 4/6 loaded, and this number is never updated as well.
  9. It's rapidly switching between true and false...is that normal?
  10. Yeah, I'm aware that values like that are applied on a global scale. I've been using NBT tags in other versions, but they don't always seem to work, so while I'm figuring that out I'm using item values. On another note, in the past I've used !world.isRemote checks, but the method doesn't fire. Here's an example of what I used to have: I've experimented by moving !world.isRemote to different places within the method, but anything below it won't be activated.
  11. Title explains it, but when a key is pressed it sets this method in motion. The method goes through and the itemstack visually decreases, but when you right click or open the inventory the itemstack is reset back to what it was previously.
  12. Sorry about that it's just this error is so strange and I'm quite confused by it. However, the last block I posted was what was causing it, unsure why though. What I was trying to do there was detect when a player was drinking from a water bottle.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.