Skip 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Well. A couple things. 1) Why are you doing this: RealLifeMod.network.sendToServer(new UpdateToiletPacket(this.poop_value + ((player.getFoodStats().getPrevFoodLevel() - player.getFoodStats().getFoodLevel()) * 5))); Why not: RealLifeMod.network.sendToServer(new UpdateToiletPacket(this.poop_value)); Second, same code, you're sending "this.poop" (5 more than last time) plus the change that occurred times five which as your trace statement shows, is negative. So you're actually sending a packet that contains the value "0." Then we get here: RLMPlayerProps.get(ctx.getServerHandler().playerEntity).poop_value = message.newpoopvalue; So we set the current poop value to whatever the packet said it should be, which is 0. Good jorb, you let the client dictate the server state and it broke. Assume the client's data always lies. Only trust it for keyboard and mouse input. So. Here's what you should do: In your IEEP store the previous food value yourself. You can do that, its easy. Compare with the saved value, then store the new value. If it changes on the server, increment your poop value. Send this new value to the client. Oh, right, IEEP already synchronizes. Now you're done!
  2. NBT. Unique Artifacts handles several tens, if not hundreds of thousands of items with one a single item ID (the armors take up an additional 1 ID per armor slot, so 5 total).
  3. You didn't mention 1.8 at all. The method may not have been MCP'd yet. Check the classes that implement IChunkProvider, specifically for the methods in IChunkProvider.
  4. You mean BlockDynamicLiquid and BlockStaticLiquid ?
  5. world.chunkExists will return true if the chunk is loaded.
  6. And here I was going to say that you were rendering it inside out by accident.
  7. If you followed the renderBlockCauldron method you'd see that it handles rendering the cauldron painstakingly one face at a time, similar to, but more annoying than, an ISBRH.
  8. It is possible to do the stack nbt when the block is destroyed as well.
  9. The error you have can be explained like this: Would you please remove the lid of the peanut butter jar you are currently holding?
  10. NPE is easy to solve. One of these is null: if (hasAttachment(stack, MainRegistry.content().ironSights.getName()))
  11. Once you have other mods and things like the IC2 Macerator, almost everything can be crafted. There's a few more mods that add even more ways of crafting things. Such as seeds + dirt = grass.
  12. There's also an event (BlockBreakEvent?) for breaking blocks, for reference.
  13. You will not be able to tell that the player has placed a block vs. the same block placed during worldgen. It is not possible because that data is not stored anywhere in the chunk data. You could in theory use metadata to do this, but only for blocks that had a bitflag to spare, but with the new BlockState mechanism that 1.8 has, I am not sure you can do that any more.
  14. Inside the chest is more than 45 slots. 4x9 player's inventory and 6x3 inventory chest ... And two of those have Slot #0. Slot #0 (player's inventory) and Slot #0 (chest inventory). for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventoryPlayer, 9+j+i*9, 8+18*j, 166+i*18)); // "9+j+i*9" why is there a +9 here? } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 224)); // "8 + i * 18" why is there a +9 here? }
  15. The fuck is all of that code doing? Creating a new stack, then calling a method you didn't show us, then calling another method, then looping over an array... If you want the item to disappear when right-clicked, do this: @Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { return null; }
  16. To avoid the "flickering" when reloading (which is due to Minecraft thinking that a change to the itemstack NBT means its actually a new stack) you need to store the time when the reload finishes rather than making a counter that counts down every tick. So you would store "world.getWorldTime() + reloadSpeed" and then you'll compare the stored value with "world.getWorldTime()." When world.getWorldTime() is greater than the stored value, the gun has reloaded.
  17. Check out this article, the section titled "Adding Realistic Turns."
  18. Signs are blocks with a TileEntity. They are specifically Blocks 63 and 68 (minecraft:standing_sign and minecraft:wall_sign).
  19. "The method func_78261_a(String, int, int, int) is undefined for the type FontRenderer" That means that the parameters "string, int, int, int" is WRONG. You're absolutely positively passing "string, int, int, int" but there is no method that matches that.
  20. Some of us aren't very familiar with how Gradle works or the syntax used in the build.grale file. Mind providing and example? Say, SomeRandomMod-1.8.8-v3.jar located in /[install location]/libs/ Everything I know about how to use Gradle had come from other people's build.gradle file and a lot of guess work, as the documentation is very vague in some ways, as if they expect the reader to already be familiar with some other aspect of Gradle. I still haven't got my build file to produce exactly what I want and no more, only "everything minus what I don't want." (That is, it does everything and then copies what I want to a new file). There are a number of things I've tried which looked like they should have worked, but did not. For example, custom properties to manage mod versions. Never figured out why Gradle would throw undefined errors at me, ended up just using in-line variables and string concatenation. A lot of folks around here say things like, "oh, just add a maven repo to your build file" as if we know what that means and how to do so. Or, in this case, chaise is for not knowing that Forge Gradle could deobfuscate arbitrary mods. Sorry, but that feature/ability had never been mentioned anywhere that I've seen before. Maybe I suppose I could have guessed that it could, but not knowing what or how to tell Gradle that I want that, I may as well believe it to be impossible.
  21. Derp. Been mobile all day, didn't notice.
  22. In your icon registration method, tell it to register the custom sprite. Edit: I've lost track of where I did it that way. But the IIconRegister interface is only used by one class, so figure out what that class is, cast to it, and add the atlas sprite to it manually.
  23. I would have to make a lot of changes... I'm considering just ditching Forge and doing this on my own if there isn't a way to do it with Forge hooks. I am pretty sure the extent of the changes you would need to make would make it impossible to remain compatible with Forge: You would have to add additional parameters to a number of packets, and in doing that, everything will break.
  24. The important thing is what kind of data does it use. Anyway, the class you want to extend is TextureAtlasSprite

Important Information

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

Account

Navigation

Search

Search

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.