Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. https://mcforge.readthedocs.io/en/1.17.x/concepts/registries/
  2. Yeah that's why I said "more or less." I'm unfamiliar with the official mappings.
  3. player.world.worldinfo.dimension More or less.
  4. Why the fak are you to-stringing that? if(source instanceof ImpactDamage) works just fine. You could also create single static instances of your new damage type and use things like ModDamageTypes.SLASHING and the == operator, like vanilla does. Your damage type instances have NO custom data in them at all, so you should just do that (yes I realize my own, very old, code is not following that). This is not how localization works. ItemStacks are never null. The player could be, though. Use ifPresent() instead. You should use the logger Forge provides you instead.
  5. ...is not a real block. Glass would be a better thing to examine.
  6. Damage events don't have a player, you need to use event.getDamageSource() or event.getTrueSource() Be aware of the following: Source may be null Source may not be a player
  7. No, you would need capabilities for that (if an existing entity is resistant, or the player) unless only your own mobs are resistant.
  8. You don't need capabilities to create a new damage type. You just call... new DamageType(...) Super mega ultra old code, but its not like anything's changed much, if at all: https://github.com/Draco18s/Decaying-World/blob/master/draco18s/decay/items/IceNineShard.java#L38 https://github.com/Draco18s/Decaying-World/blob/master/temp-7-26-13/draco18s/decay/ColdDamage.java#L11
  9. If you want a tiny fraction of offset, use float.epsilon. 0.01 will actually be noticeable. It's about 1/6th of a texture pixel.
  10. Oh gosh, how simple. Oh boy howdy, how easy. If only the documentation matched. Oh wait it does. (I will note that I haven't messed with the code in like 3 years and I am sending and not verifying the TE pos)
  11. https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/#sending-to-the-server
  12. No, it's handled by Tags now.
  13. Basically you can't.
  14. Buttons are client side only, you must send a packet to the server saying "this button was pressed."
  15. Really what happened was that this parameter you were passing: worldIn.setBlock(pos, state, ... ); was this: BlockState state = worldIn.getBlockState(pos); when it should have been this: ModBlocks.SCORCHED_EARTH.get().getDefaultState()
  16. The Forge team can't support every version of Minecraft in-perpetuity. No software company does that with their software. Forge has decided that they will support the most recent major version (1.17) and a single LTS version (1.15) 1.12 is 4 years old at this point.
  17. Well, no. You need to be able to cast the thing you want to register (in this case, a block). You can't make a RegistryObject<Item> store a new Block() for instance. That's precisely what the new keyword does.
  18. This, by the way, doesn't need to be strictly typed to your class. You could just use RegistryObject<Block>
  19. Being a professional software developer, no, a "coder" is "someone who codes." A software developer is the professional term. At best, you're a script kiddie.
  20. False. Your first thread on this very forum on this topic was this one in which you were already under the assumption that items and blocks were done via datapacks. The first reply even says "no you don't" and linked you the relevant documentation. Unless you mean this post which was referring to the blockstate, model, and loot table files which was already in reply to your complaint that datapacks are a hassle.
  21. Having done this in the past, stepOn is not super reliable, it'll pick up about 2 in every 3 blocks (less if you're sprinting). And if you want it to break as if it was harvested and drop items, you'll need to call the drops function (which I don't know the name of off-hand).
  22. Oops, you were correct. I was having trouble finding the recipe and searched the entire repo. It did have the correct path in it though. Anyway, I see you got it.
  23. That's the wrong location. /resources/data/create/advancements/recipes/create.base/crafting/kinetics/cogwheel.json https://github.com/Creators-of-Create/Create/blob/mc1.16/dev/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/cogwheel.json
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.