Jump to content

blfngl

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by blfngl

  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.
  13. Well I found out what was causing that wall of text, it was this: @SubscribeEvent public void onEntityUseItem(PlayerUseItemEvent event) { EntityPlayer player = (EntityPlayer) event.entity; FalloutPlayer props = FalloutPlayer.get((EntityPlayer) event.entity); System.out.println(event.item.getDisplayName()); if (event.item == new ItemStack(Items.potionitem))//.equals(new ItemStack(Items.potionitem))) { props.setCurrentThirst(-50); System.out.println("kek"); } } Any idea why?
  14. Yep, I did remove that. I think it's coming from an error within the datawatcher, it's kinda freaking out about one of the values. A new error appeared in addition to the old one. New error: [00:33:04] [server thread/ERROR] [FML]: Failed to load extended properties for ExtendedPlayer. This is a mod issue. [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NullPointerException [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at blfngl.fallout.player.FalloutPlayer.loadNBTData(FalloutPlayer.java:102) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.Entity.readFromNBT(Entity.java:1710) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.readPlayerDataFromFile(ServerConfigurationManager.java:300) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:123) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:237) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:50) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:189) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:270) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:208) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Thread.run(Unknown Source) [00:33:04] [server thread/INFO]: Player232[local:E:a60e33f5] logged in with entity id 406 at (244.42098377011422, 74.0, 246.1725924748317) That specific line references: this.player.getDataWatcher().updateObject(Fallout.RAD_WATCHER, properties.getInteger("CurrentRads")); It's value is set to 20, an ID which is free I believe. I also completely removed the registry for the event handler and the error message would still appear but without any references inside it.
  15. That's all I've been doing recently T_T rip "toggle breakpoint" Thanks so much for all your help dude! You've been awesome on my past questions too
  16. Yeah, I know it's bad design haha I wrote this 3 years ago and haven't gotten around to cleaning up the code form. I did it back then because I thought it would save time in writing out all the item names, so I didn't have to put Fallout. in front of all of them. This was when I was learning java Probably should get around to removing that lol. Vanilla block drops: public class VanillaBlockDrops { @SubscribeEvent public void on(HarvestDropsEvent event) { if (event.state instanceof BlockLeaves) { event.dropChance = 0.1F; event.drops.add(new ItemStack(Fallout.mutfruit)); } } } FalloutConfig: ClientProxy:
  17. The weirdest thing just happened, I removed a tileentity I had been working on and the game will stop crashing, however the error is still thrown. I also moved the client/server stuff in the event handler to their own classes and registered on both client/server but it didn't change anything. Here's the Fallout class:
  18. Out of the blue, eclipse would throw this huge error but would still be able to load the game, however it will crash upon trying to access certain parts of the mod. I have no idea where this is coming from, it literally appeared out of no where. I wasn't even editing the class it was referencing. Error: Line 404: MinecraftForge.EVENT_BUS.register(new FalloutEventHandler()); FalloutEventHandler: Help?
  19. Worked like a charm. Thanks so much for the help!
  20. Found some leftover unused keybinding variables at the top of my main mod file too, removed that and added your fix, problem solved. Thanks!
  21. Hey, I've been searching for a solution for a few days now but haven't been able to find anything that fixes my problem. My keybindings crash the server version of the mod, and setting them up in my client proxy doesn't seem to fix it. Help? Client Proxy: FalloutKeyBinding: I also register my client proxy in the event bus within the preInit method of my main file. preInit()
  22. Hey, sorry for the late reply, but your solution seems to move the picture, what my problem was is that the actual SLOT is moving and getting desynced with my picture. It only happens when I have the initGui() method included.
×
×
  • Create New...

Important Information

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