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. See, I never would have even noticed. I saw magic numbers and went "fuck this, I'm going to assume it's correct." I couldn't even tell that these methods were (partly) responsible for sync.
  2. One of you did something terribly terribly wrong for that to occur. That is in no way git's fault.
  3. Funny thing about Github repos: they have an issue tracker where you can post this, because this is the wrongest place. That said: > There were failing tests. See the report at: file:///C:/Users/james_000/Downlo ads/FernFlower-master/build/reports/tests/index.html
  4. Use your god damned IDE (go look at the class, use the autocomplete dropdown...). They are in all caps now.
  5. So learn. They aren't that hard. https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
  6. So the link to sync code doesn't actually link to anything that does syncing. That would be here: https://github.com/JakeStanger/Chemistry/blob/master/src/main/java/roboguy99/chemistry/tile/TileOreProcessor.java#L543 The part you linked to instead, however, uses magic numbers. Fuck, did BlockState property enums teach you nothing?
  7. You're a freaking idiot. Seriously. if (container.getStackInSlot(i).stackSize < 64) { container.getStackInSlot(i).stackSize++; entityItem.setDead(); } Seriously. What the hell. All of your problems are here. And why are you not using Capabilities for item storage?
  8. Correction: don't modify any vanilla code, that's not how Forge works. As for MCP, you can't really do it that way either, because the Forge setup hasn't used MCP that gives you modifiable vanilla files since 1.7.10 and everything's moved since then, so you can't download it anyway. Also, update to 1.10. Or if you're really hell bent on 1.8, at least update to 1.8.9
  9. public static void registerRender (Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher(). register(item, 0, new ModelResourceLocation(Reference.modID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } This won't work. You never create and register an ItemBlock for your block. Also, don't use getUnlocalizedName for anything. Use getRegistryName. Following that comment, do this: setUnlocalizedName(getRegistryName()) Also, you have your rendering registration code inside common code, you can't do that. It MUST exist in a proxy or you'll crash the dedicated server. Here's how I do it: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/client/ClientProxy.java And if you check out my common proxy, you'll see how I register my items so that it translates cleanly from 1.7.10's style to 1.10's.
  10. Deprecated in this case means "do not invoke this method, but you can override it"
  11. I'd use the TextureAtlasSprite method. They're real easy to use, unless you're doing crazy shit like trying to generate a runtime texture. Just go look at the TextureAtlasSpriteClock and TextureAtlasSpriteCompas classes. What they do is override updateAnimation , look at player/world information, and determine which frame of the animation should be used and update it. Dirt simple. The hard part is letting Minecraft know there's a custom TextureAtlasSprite class involved (you may have to dig around in the compass/clock item classes and related code; I haven't done this for 1.10 yet).
  12. While that looks elegant, that's really not how things should work (i.e. the server knowing about keypresses). In reality what that API should do is take the packets sent from the client about when the client presses buttons, and store that information. What I did in 1.7.10 was rather hacky as all I was trying to do was work around an issue with liquids and not being able to jump out of them, but on the client side of things I listened for "is the player trying to jump and are they in water?" and if so, tell the server "hey, this player is swimming." So then on the server: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/HazardsEventHandler.java#L88-L90 You'd essentially do the same thing: "Hey this player is doing the thingamajig" and the server goes "ok, I can remember that." The server gives no fucks about keybinds instead it cares about what the player is doing. You can still refer to it like a keybind, but it's not. Instead it's the client saying "the player is giving me [x input]." No listening to keybind changes necessary.
  13. Well of course not. You didn't update the button's mode field. You get the value from the TE only in its constructor.
  14. int rotation = player.getRotationYawHead() % (2*Math.PI);
  15. Make your own class that extends GuiButton and override drawButton to draw the correct texture.
  16. You have to do it on the client too, otherwise the client won't be aware of the extended reach.
  17. 11 would be flags 1 + 2 + 8. I've never figured out what Flag 8 does.
  18. Be sure to check types before casting.
  19. Also don't use a TESR if your model does not animate.
  20. If a method you are overriding has it, you should add it, but it won't hurt anything if you don't. Just never ever put SideOnly on something that didn't already have it. http://www.minecraftforge.net/forum/index.php/topic,22764.0.html
  21. 1.1 as in older than 1.6? Or 1.1 as in "that's the same decimal value as 1.10"? (Hint, it's not)

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.