Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. You're asking to convert from centigrade to pounds.
  2. You're saying "for every element that gets drawn on the screen, draw my GUI."
  3. This statement makes no sense. You can't "convert" a block to a TileEntity. You can't even assume that a block only has one TE it supplies.
  4. That is not how the game works. The registry name should always be compile-time-constant. The fact that registry events run before your mod has access to Forge-supplied configs is intentional. Do not try and work around the system. If you want an item with a randomized display name, then override the appropriate methods to return a randomized display name, but do not fuck with its registry name.
  5. There's a method that I believe is called isReplacable which, if it returns true, allows your blocks to be replaced when placing other blocks. But as d7 says, we need to see your code to know for sure what's going on.
  6. Its in your external resources. The first one is most of the code, client-extra.jar has a lot of the recipes, blockstates, and such.
  7. By the way, your mods.toml file is wrong That should be your modid. Ditto commenting out/removing all of the optional values you left with dummy text in them. You should also use MainModClass.MOD_ID for this line (and other similar lines, like your @Mod annotation).
  8. Show your asset folder(s)
  9. There's also: ItemStackHandler.insert(stack, true).isEmpty()
  10. Someone asks about this every week. If you are creating a subclass of block, the methods are safe to override. Deprecation means "do not invoke" as you are supposed to do that through the blockstate. Do not subclass BlockState.
  11. https://minecraft.gamepedia.com/Tag
  12. 0 = none 1 = wood 2 = stone 3 = iron 4 = diamond
  13. This cannot return null.
  14. That's a function of interpolation. Chrome's pretty good at it. Raw OGL is not. If you scale the images down to the desired size yourself you'll have the most control.
  15. Seriously, stop pretending to know what the important bits are and post the whole thing. And your code. Preferably as a git repo
  16. This has nothing to do with the question at hand.
  17. You also have it in PlayerData: Assuming the class still exists (it is unclear, as we don't have your full source code, eg. a github repository). Use your IDE to search for references to the register() method and find where you're calling it in your code and I bet you'll find the offender.
  18. This is why orElseThrow is a better idea for the event.
  19. Show updated code for that event method.
  20. LivingEntity player = event.getEntityLiving(); IPlayerData data = player.getCapability(PlayerDataProvider.capability).orElseThrow(IllegalStateException::new); You only attach data to the player. LivingEntity is not necessarily a PlayerEntity.
  21. By the way These two methods on your capability make no sense. If you have the capability, getting a capability from it is nonsense (capabilities are not themselves capability providers, unless they are, in which case you would have to additionally extend that interface). Anyway, I think your classes have gotten confused with each other in what each one's purpose is, so the thing you're attaching and trying to get back out isn't actually the same thing as the object you expect to hold the data. Or it isn't being attached, registered, or retrieved properly. Little unclear because you haven't shown where you're trying to get it at (you've shown the code you're using but not its enclosing scope). Either way, I suggest taking a look at my code: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/api/capability/CapabilityMechanicalPower.java
  22. This line: https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/McAndGuns.java#L77 References this class https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/client/StaticClientEventHandler.java Which the JVM needs to insure that it is valid, and does not know which parts, if any, may be executed (thus all further references the JVM needs to make sure have already been loaded, or can be loaded if needed). But it cannot because it references this class: https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/entity/RenderBullet.java which references: https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/entity/RenderBullet.java#L6 Which the JVM cannot find. I should note that this annotation: https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/client/StaticClientEventHandler.java#L20 registers that class to the event bus on the client only. This line: https://github.com/InterdimensionalCat/McAndAGun/blob/master/src/main/java/com/benthom123/mcandguns/McAndGuns.java#L77 registers the same method on both sides.
×
×
  • Create New...

Important Information

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