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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. For fuck's sake, you're making your own variable called myPreviousFoodLevel . After you do all of your checks, you set myPreviousFoodLevel = player.getFoodStats().getFoodLevel() . Done, now it's the previous tick's food level, no client side method bullshit required.
  2. How the F would this crash without that GL rotate line? Anyway, TrashCaster is correct.
  3. Well, your rotate call is the same as the rotate call for South, so "no duh."
  4. By "serious hacks" we probably mean ASM coremodding. Should be a simple enough thing to insert an extra comparison statement into fences without completely wrecking everything. Java bytecode is not for the weak, however.
  5. How are you encoding 30 stays in only 16 values of metadata? You have 5 damage states and 6 facing states.
  6. 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!
  7. 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).
  8. 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.
  9. You mean BlockDynamicLiquid and BlockStaticLiquid ?
  10. world.chunkExists will return true if the chunk is loaded.
  11. And here I was going to say that you were rendering it inside out by accident.
  12. 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.
  13. It is possible to do the stack nbt when the block is destroyed as well.
  14. The error you have can be explained like this: Would you please remove the lid of the peanut butter jar you are currently holding?
  15. NPE is easy to solve. One of these is null: if (hasAttachment(stack, MainRegistry.content().ironSights.getName()))
  16. 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.
  17. There's also an event (BlockBreakEvent?) for breaking blocks, for reference.
  18. 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.
  19. 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? }
  20. 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; }
  21. 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.
  22. Check out this article, the section titled "Adding Realistic Turns."
  23. Signs are blocks with a TileEntity. They are specifically Blocks 63 and 68 (minecraft:standing_sign and minecraft:wall_sign).
  24. "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.

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.