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. No, it will outright crash the dedicated server. You can't do this at all. You want to send a message to a player you need to send a message to a player.
  2. Classic sign of someone who isn't interested in producing content that actually works.
  3. if (state.getValue(FACING) != EnumFacing.DOWN || state.getValue(FACING) != EnumFacing.UP) { That will always be true. If the facing is UP, then this looks like if(false OR true). False or true is true. If the facing is DOWN then it would read if(true OR false). False or true is true. A good thing, too, otherwise you'd get a NPE. BlockPos blockpos1 = pos.up(); You now set this value to the pos above the pos passed, as opposed to the pos above the bottom you just worked out. blockpos1 is now two above blockpos. if (state.getValue(PART) == BlockAFP.EnumPartType.DOWN && worldIn.getBlockState(blockpos1).getBlock() == this) { if (player.capabilities.isCreativeMode) { worldIn.setBlockToAir(pos); } worldIn.setBlockToAir(blockpos1); } So if the top location is this block, set the location passed to this method to air? Did you mean blockpos1? Oh also, you set it blockpos1 to air anyway regardless of creative mode, so I guess that check is pointless... else { //TODO how to check for the block? } Uh, what does this comment even mean?
  4. Well, you're doing it here. But you should actually be writing a pos there, not reading one.
  5. Armor stands assume only cutout transparency, not full alpha. Non-block items are also assumed to be cutout (though will render in your hand and in the inventory with transparency).
  6. I'm pretty sure I've left some comments on his videos about the mistakes he's perpetuating, but its not like anyone reads those.
  7. I posted this already, but sure, I'll do it again. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/industry/client/gui/FilterGuiContainer.java#L83 That line is what you put in the "send stuff to server here" location. Or I should say, a line like that. You'll have to massage it to fit your class names, data details, and so on.
  8. Checking if the world is remote before doing client side things does not stop the server from crashing because the JVM does not know what that check cannot return true. In fact, it will crash before ever getting to this line. It crashes when the class is first loaded because it has to check to make sure it knows where all of the classes it loads the JVM knows where to find them. And it goes "Minecraft, Minecraft, OH GOD HELP ME JESUS, I CAN'T FIND THIS CLASS!" and dies.
  9. Oh god, oh god, oh god oh god ohgodohgodohgod There is virtually nothing correct about what you have. Some of it is still a direct copy of my own code without any attempt to change it. Your button still does fuckall because you gave it an empty stub method, that still takes a string parameter that you do fuckall with, have fuckall purpose for, and even have made it clear that you don't even know why you have it (which is true, because it does fuckall). What the fuck is this shit. Why are you creating a tile entity? Why are you trying to send a tile entity across the network? Not that you ever even call that method.
  10. Those are two things: 1) A library is a set of widely used common functionality (Math is a good example, as is LWJL) 2) An API is a collection of exposed objects and interfaces that allow other programs/code to interface with another program/code without having to expose (make public) the implementation or source. An API is a contract that says, "I solemnly swear that these methods exist and do what the documentation says they do." You just do. I have one. I'm the only one using it, but I have it. It also happens to be both a library (I put my registry handlers in it) and an API (it is where I expose the interfaces for my capabilities).
  11. Where does it NPE? Also, use Logger, not System.out
  12. What part of Didn't you understand?
  13. You don't, you listen for them. See also: https://mcforge.readthedocs.io/en/1.13.x/events/intro/
  14. sendPacketToServer() https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/industry/client/gui/FilterGuiContainer.java#L83 (Yes, you will need at least one new class)
  15. https://mcforge.readthedocs.io/en/1.13.x/concepts/registries/#registering-things
  16. Don't create RegistryEntries in static initializers, only do so in Forge controlled vents so that instantiation happens at a known and controllable point. Yes, only register your items on the client side. Nothing could go wrong here... Speaking of, this is wrong, you should be using the registry events. Use @ObjectHolder annotations instead. ModelLoader.setCustomModelResourceLocation exists for a reason. Do not use the Model Mesher. If you aren't on 1.12, update. This value is probably null here, because your block hasn't been registered yet. Also, D7 ninja'd me.
  17. Use one function and multiple if...else if..else statements. The difference between your examples is this: Which is faster? creeperCheck(); zombieCheck(); skeletonCheck(); or (a properly built, using else) deathCheck();
  18. cry

    Draco18s replied to matorassan's topic in Modder Support
    You "create" tags by creating a json data file in modid/data/tags In this case, you want forge:copper, so you create a file called copper.json inside forge/data/tags/blocks For example: https://github.com/Draco18s/ReasonableRealism/tree/1.14.4/src/main/resources/data/forge/tags/items
  19. I haven't looked at non-TE systems myself, but looking at the Crafting Table is a start (be aware that the crafting table UI requires the player to interacting with only the crafting table).
  20. cry

    Draco18s replied to matorassan's topic in Modder Support
    Vanilla handles those via JsonReloadListener instances. Unfortunately, these need to be registered with the MinecraftServer instance (have fun getting a reference to one) and the thing you need to register with is private. But if you manage that (note that my code is a Forge PR, so I can inject my manager directly), you pass the folder you care about to super and when the game loads, you get a list of resource locations found there.
  21. Not a whole lot has changed, really. You register your gui handler differently,* but aside from some renames, everything is pretty similar. *Implement INamedContainerProvider on your TileEntity and call NetworkHooks.openGui()
  22. cry

    Draco18s replied to matorassan's topic in Modder Support
    Yes, I am aware. I don't see why the code I supplied won't work. There is no current "data pack" feature that creates and registers blocks, if you want something like that, you're going to have to do it yourself.
  23. The screen warp effect is almost certainly 100% tied into the game's main rendering system and hard coded to check for Nausea.

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.