Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. It doesnt have anything to do with your getMetaFromState method that is only used to serialize your block to the disk. Your ItemBlock needs to be an ItemSlab.
  2. Some of your jsons are syntactically wrong. Specifically your dirt_ball model.
  3. No dont do this. Or any of this. Instead use onItemRightClick perform your own RayTracing then spawn the LightningBolt using ServerWorld#addLightningBolt
  4. No you need to cast to ServerWorld and call addLightningBolt instead of addEntity.
  5. Yes its fully possible to change the textures and models of items/blocks using a mod. It functions exactly as a resource pack would. The problem is that you want to do it conditionally. There is no way to do it conditionally that immediately comes to mind. Like I said you would have to do some resource reload listener stuff. Aka you would have to make your own listener for when resources reload and replace the texture(s) based off the config setting. And also reload all the resources whenever that config setting has changed. Just changing one block for another will not work.
  6. I'm sure this is semi possible, but it's not as easy as it sounds. Theres no option in a model file to say if this then do this. So the only option would be to have some sort of Resource reloading listener that does what you want. Or you could just give them a resource pack they can download along with the mod. Yes resource packs can affect modded textures and models.
  7. You never register an Item for your slab block. You've commented it out.
  8. I never said "I give up" but I do have a life outside helping on this forum. The part where I said this is the constructor to my @Mod class goes in your main class, specifically in your constructor. The second part where it's in my CrystalConfig class this would go into whatever class you want to store your config information in.
  9. You need to bind the texture that the game expects to be bound after you do all your rendering. Take a look at IngameGui.class.
  10. I cant find that error message in the code, even searched the github. Are you using the most up to date 1.12.2 forge?
  11. Sounds like a client server desync. Put all of your onItemRightClick method in an if statement with !world.isRemote. This is because one stack has nbt and the other doesnt have the same nbt. Try using a custom capability that way they should stack.
  12. You've imported the wrong Supplier you need java.util.function.Supplier
  13. Translations are applied later so by string concatenating you aren't applying a translation. So instead use a method on TextComponentTranslation to add a sibling or a child not sure what it is in this case. Then call getFormattedText()
  14. Have you taken a look at the code? They are two speed values one for when the entity they need to avoid is far and when it is near. What priority did you give it when you added it?
  15. This is the constructor to my @Mod class. I create a Pair variable and set it equal to ForgeConfigSpec.Builder#configure CrystalConfig is a class that has this as it's constructor. It takes in a Builder and inside this constructor I create my config file using Builder#push(...) Builder#comment etc. I store the config values here as well. Now I store the CrystalConfig value from the pair into my @Mod class. Then I register the other value as a config.
  16. This is how I have mine set up. public static CrystalConfig CONFIG; public CrystalMod() { Pair<CrystalConfig, ForgeConfigSpec> pair = new ForgeConfigSpec.Builder().configure(CrystalConfig::new); CONFIG = pair.getLeft(); ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, pair.getRight(), "modid.toml"); } // Where CrystalConfig is a class that looks like this. public CrystalConfig(ForgeConfigSpec.Builder builder) { // DO config stuff. }
  17. Do you ever call OreGenConfig.init? If you don't then the values you set in there are always null.
  18. I didn't ask to see OreGenConfig I asked to see OreGeneration.
×
×
  • Create New...

Important Information

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