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. I think he has a JSON file that he wants to import and tweak.
  2. 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);
  3. 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.
  4. 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?
  5. 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.
  6. 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.
  7. Yes. It's an instance of MyWall.
  8. 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)
  9. 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.
  10. 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.
  11. 1.7, pretty easy. 1.9? Fuck if I know if its even possible. *cough, the whole json model thing being arcane*
  12. 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.
  13. I have no idea what the hell is so hard about just following directions. Reading is hard. Yo.
  14. 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
  15. 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).
  16. By the way, onPlacedBlockBy is not in the code you posted. I ctrl-F'd and don't see it.
  17. 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?
  18. 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.)
  19. Poked around in C# (my Unity3D project) seeing if it had nullable parameters and it does, but for the simple types (e.g. someMethod(int? nullableIntVar){} ) but not for the complex types, as complex objects can already be assumed to be capable of being null. So the project I was working in that had a "[ x ]OrNull" parameter was justified in making the name indicate that the method could handle null values being pased vs. a "this object must not be null" method. I should note that the .NET version for Unity is garbage: 2.0, updating to a newer version is under the "research" category on the roadmap. I.e. not even on the "long term development" track yet, much less the next two releases.
  20. I love copy pasta. You have so much crap that you either need to remove or rename so you can figure out what this class does and why you have the problem you have.
  21. You can blame random people using MCPBot for that. I find that more often than not that's enough. Forge-specific comments are much better than the ones on vanilla methods.
  22. I didn't know about @Nullable. Not that I'm surprised. The thing I was talking about was a function parameter not a return value on an interface. For example, using the OP's method: public void EntityTNTPrimed(World worldIn, double x, double y, double z, EntityLivingBase igniterOrNull) {...} Is there a cleaner way of doing it there? The point I was trying to raise is "MCP could note this kind of stuff and it would be useful." (I just don't care how)

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.