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. (getPickBlock is probably going to be the more useful option in the general-case)
  2. if(blockBlock instanceof MyAbstractWall || blockBlock instanceof BlockWall) { }
  3. Use setRegistryName the way it was intended to be used. Do not use the 2 parameter overload of GameRegistry.registerItem: your registry name should not be derived from your unlocalized name, as unlocalized names are allowed to change but registry names are not.
  4. You do. It is because it allows for "technical" blocks to exist without them having an inventory object. (e.g. I don't think you can get Fire as an item in your inventory any more)
  5. You haven't included enough code to be able to figure out what that snippet is doing. You haven't shown the rightClick method where you obtain the BlockState and pass it to this recipe method, or what one of the recipes looks like.
  6. I think he has a JSON file that he wants to import and tweak.
  7. This does not get the player's coordinates. This moves the player to a location (x,y,z) player.getPlayerCoordinates().posX = x; player.getPlayerCoordinates().posY = y; player.getPlayerCoordinates().posZ = z; This also moves the player player.setPosition(x, y, z);
  8. Hmmm, sorry about that. There is an event that does what I said. Not that one then, hum. What is the line of code at ForgeHooks.java line 459? That'll help narrow down what was null, even if it isn't your code: you'll be able to figure out--by working backwards--what it was that your code did to cause it.
  9. BreakEvent is fired when any block is broken by any means. Read the javadoc. What happens if water pours on the ground and encounters tall grass?
  10. No. jeffryfisher was saying that Mojang should have created the abstract BlockWall class from which the variants would be extended from. What he said you should do is create an abstract class to extend from Block.
  11. Dude. How are you handling all those states? You haven't have more than 16 variations that save to metadata. You've got NINE types of leaves that you're trying to squeeze into 2 bits of metadata (4 variations). Your problem is likely not in the JSON file at all, but in the stateToMeta and metaToState methods.
  12. Yes. It's an instance of MyWall.
  13. Any idea why not doing it would have the effect it--- Oh! I think I remember something about this now: the container item is constantly requested while the UI is open and if you modify the stack in the grid, as opposed to a copy, it ends up overwriting itself until it gets destroyed. (Recipes are weird)
  14. Hmm, darn. I remember having to struggle with that back in 1.7 when I originally added the armors. I've forgotten what made it finally work, though.
  15. I think this is the method you are looking for. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/item/ItemArtifactArmor.java#L549-L553 It apparently wasn't deobfed in 1.7.10, but it might give you a lead.
  16. 1.7, pretty easy. 1.9? Fuck if I know if its even possible. *cough, the whole json model thing being arcane*
  17. You meant "onBlockPlacedBy" not "onPlacedBlockBy" which is why I couldn't find it. You might want to look into what the flags (last parameter of setBlockMetadataWithNotify) does. Also, I helpfully reported you to the moderators as per my sig.
  18. I have no idea what the hell is so hard about just following directions. Reading is hard. Yo.
  19. Draco18s replied to NEG2013's topic in Modder Support
    How to add a slot https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/inventory/ContainerPedestal.java#L17 And the custom slot class https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/inventory/SlotArtifact.java
  20. Fur the love. That means the itemstack size is 0. ItemStacks can't set themselves to null, it's up to the container/itemUse method/whatever method to detect stacksize of 0 and remove it from there. Try this: public ItemStack getContainerItemStack(ItemStack stack) { stack.damageItem(1,null); if(stack.stacksize <= 0) stack = null; return stack; } (It literally doesn't matter if you check stack.getItem() == this because it should always be this, if it isn't, that's a serious bug in vanilla that makes no god damn sense and should never happen, because the getContainerItemStack() is invoked by doing stack.getItem().getContainerItemStack(stack) : the stack invokes its own item's method, passing itself).
  21. By the way, onPlacedBlockBy is not in the code you posted. I ctrl-F'd and don't see it.
  22. The answer is both: a) in the content of that method which you have omitted and b) the itemstack has a size of freaking zero, what did you expect vanilla to do with it when you tried to pick it up?
  23. What does this do in your class? private static final String __OBFID = "CL_00000324"; Bet you have no idea. Bet $1000 you don't even need it. (Also: I'd win that bet, hands down no questions asked because it's used by MCP to reobfuscate vanilla classes.)

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.