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. Buttons are client side only. The server doesn't know about the button press unless you tell it (with packets). (Note: all you do is send a packet saying "this button was pressed" and let the server verify that everything's correct)
  2. As you did not provide very much code... Who knows.
  3. event.getRegistry().registerAll(items) There is no need to for-each to pass each one individually to a method that accepts a list.
  4. It isn't merged, so it won't work yet.
  5. This event does not fire on 1.14 https://github.com/MinecraftForge/MinecraftForge/pull/6267
  6. Whassit called... give me a bit to find it. Oh yeah, they split it up. getXOffset(), getYOffset(), getZOffset() You can also use blockpos.offset(facing).
  7. There are no errors displayed there that are important.
  8. You don't need this if the tool material is set up correctly. Electrodynamite12, show more of your code. Namely, where you set ItemsRegister.HLOMINGOT to a value.
  9. Question: Do recipes and loot tables in general still work, or are all of them broken too?
  10. ...Did you not understand what I said? facing.offset totally tells you where the other block is because you know which half due to the HALF property. I said you couldn't do what you were doing with only a FACING property.
  11. I can't tell what file is malformed, but you have a malformed file.
  12. Yes, it changed. Worldgen is threaded now. You have to create a Feature and register it with each biome (biome.addFeature(...)) you want it to appear in. Note that it is more complicated than that, as Features require a FeatureConfig class. NoFeatureConfig does exist if you don't need anything special. An example: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/world/HardOreFeature.java#L16 I recommend at least looking over how vanilla uses these classes and their methods.
  13. Objects, inheritance, overriding, methods, variables, singletons, event driven design, and probably a bunch more. "Learning how to search for answers" being a very valuable tool regardless of what language you're working with (for instance, I see and vote-to-close-as-duplicate "I got this error it said something about null references?" question on Stack Overflow about twice a day).
  14. You need two properties. HALF and FACING If HALF is A (call it whatever you want) you know you have the A part of the bed and can using the facing.offset property to find the other half. If HALF is B you know you have the B part of the bed and can use the facing.getOpposite().offset to find the other half.
  15. Are you creating a mod, or are you trying to run one you downloaded from the internet?
  16. Not the worst stuff I've seen, but I didn't watch all of it.
  17. Lets start here: if(facing != Down || facing != UP) lets assume that facing is equal to UP and do a replacement to see what happens when the code is run. if(UP != DOWN || UP != UP) obviously the first one is false and the second one is true. if(false || true) Now we simplify. False or True is true, because we only need one side to be true for the whole statement to be true. if(true) If we repeat when facing equals DOWN instead... if(DOWN != DOWN || DOWN != UP) if(false || true) if(true) What about a different direction? Say...EAST? if(EAST != DOWN || EAST != UP) if(true || true) if(true) All possible variations will resolve to if(true) because a value cannot both be equal to DOWN and UP at the same time. Oh boy. That's going to be a nightmare to figure out where all the bits are. Because when its on the floor or ceiling, the other "half" of the block is going to not be above or below.
  18. You linked to a specific commit, so when I looked at it, it was the old commit where it wasn't changed. As far as I can tell, it should work. Can you post a screenshot of the error? As for what you put here, you put the code that does whatever you want the button to do.
  19. Still not static: https://github.com/drmdgg/marijuanacraft1.14.4/blob/c4986b9a05326b9a17776e6000bf7e40957b3253/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L27
  20. Push your changes to your repository. Only thing I can find out of place at the moment is this line: https://github.com/drmdgg/marijuanacraft1.14.4/blob/master/src/main/java/drmdgg/marijuanacraft/network/PacketHandler.java#L36 Which should be generic: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/network/PacketHandler.java#L45
  21. Both encode and decode need to be static.
  22. Good. Now fix these two lines. https://github.com/drmdgg/marijuanacraft1.14.4/blob/a246b0229e61058b95672d7f4813b5c3deb28229/src/main/java/drmdgg/marijuanacraft/network/PacketButtonClicked.java#L28-L29
  23. Yes. You're trying to write to the buffer, so what's the other one?
  24. Look at the parameters that are passed to you.

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.