Jump to content

Awsome

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Awsome

  1. Sorry, I meant a json block model like the ones found in assets/models/block. How do I convert that into a baked model?
  2. Another question, how would I go about loading a baked model from a json file?
  3. I'm currently trying to figure out how to animate a baked model. So far, I've gathered that I need to have a TileEntity for the block as well as a TER for the block's tile entity. At first I was going to use forge's animation API to do the animation, but after some digging around I found out that the animation API wasn't fully implemented in 1.15+ (I'm not entirely sure if that's still correct, as the threads that I found were all from a few years ago, so correct me if I'm wrong). Basically what I want to do is apply some transformations to elements of the baked model when the block is clicked.
  4. I managed to fix it by serializing the NBT data inside the capability wrapper.
  5. It appears as if ItemStack::readShareTag is only getting called once (on stack creation) and never again. I'll try poking around with the debugger a bit more.
  6. Ok, so I think I'll go into a little bit more detail: The item has a custom capability that stores the ItemStack's temperature. When the stack is placed into the output slot of one of the tile entities in my mod, it is supposed to keep the temperature of the stack the same as the tile entity. However, it only does this for the stack on the server side (I've checked with eclipse's debugger). Here's the code for the tile entity, in case that helps: https://github.com/Awsomekeldeo/RealisTech/blob/f45e7b906509c6171c3bb71384f8c64c2356117c/src/main/java/awsome/realistech/tileentity/CrucibleTileEntity.java
  7. Forgot to post code: Item Class: https://github.com/Awsomekeldeo/RealisTech/blob/forge-support/src/main/java/awsome/realistech/items/CeramicMoldItem.java Capability Wrapper: https://github.com/Awsomekeldeo/RealisTech/blob/forge-support/src/main/java/awsome/realistech/capability/MoldCapabilityWrapper.java Capability: Interface: https://github.com/Awsomekeldeo/RealisTech/blob/forge-support/src/main/java/awsome/realistech/api/capability/energy/IHeat.java IStorage implementation: https://github.com/Awsomekeldeo/RealisTech/blob/forge-support/src/main/java/awsome/realistech/api/capability/energy/HeatCapability.java Implementation: https://github.com/Awsomekeldeo/RealisTech/blob/forge-support/src/main/java/awsome/realistech/api/capability/impl/HeatHandlerItemStack.java
  8. One of the items in my mod is supposed to be syncing it's NBT data to the client using ItemStack::getShareTag and ItemStack::readShareTag. I've tried putting breakpoints in these methods, but they don't seem to be getting called at all. Is something wrong with my installation? My forge version is 1.15.2-31.2.31, in case that helps. Any help would be appreciated.
  9. I want to add a custom fluid type to my mod. I'm currently trying to extend ForgeFlowingFluid, and am lost as to what to do with the method overrides in the class.
  10. I managed to get it working, I just looked at the campfire tile entity's renderer as an example.
  11. I would like to have a tile entity that renders it's items in-world on top of itself. Can I get some pointers as to where to look for examples of that sort of thing? Also, just a few more questions: 1. Is it possible to just use a TER for the items and have the block itself just be a baked model? 2. Do I need to use a container for the tile entity if I'm not going to add a GUI for it?
  12. If you already know basic java, I would suggest reading the forge documentation first: https://mcforge.readthedocs.io/en/1.15.x/ McJty's modding tutorial is also pretty good and covers most of the basics, found here: https://wiki.mcjty.eu/modding/index.php?title=YouTube-Tutorials
  13. Here's my build.gradle file, I forgot to post it. buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'awsome.techmod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'techmod' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { // The mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD Snapshot are built nightly. // stable_# Stables are built at the discretion of the MCP team. // Use non-default mappings at your own risk. they may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: 'snapshot', version: '20200913-1.15.1' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { client { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { techmod { source sourceSets.main } } } server { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { techmod { source sourceSets.main } } } data { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' args '--mod', 'techmod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { techmod { source sourceSets.main } } } } } dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft 'net.minecraftforge:forge:1.15.2-31.2.31' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version" // Real examples // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // These dependencies get remapped to your current MCP mappings // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' // For more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } // Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ "Specification-Title": "realistech", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } // Example configuration to allow publishing using the maven-publish task // This is the preferred method to reobfuscate your jar file jar.finalizedBy('reobfJar') // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing //publish.dependsOn('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } }
  14. Whenever I change the mappings version in the build.gradle file to something other than the default MCP mappings, it causes genEclipseRuns to be unable to resolve forge dependencies. Gradle Log:
  15. Whoops, forgot to put links to my source. Recipe Type Class: https://github.com/Awsomekeldeo/RealisTech/blob/6ec72fec9334633460b9ac9305626bc18272c680/src/main/java/awsome/realistech/api/recipe/NonConsumingShapelessRecipe.java Recipe Type Serializer: https://github.com/Awsomekeldeo/RealisTech/blob/6ec72fec9334633460b9ac9305626bc18272c680/src/main/java/awsome/realistech/api/recipe/NonConsumingShaplessRecipeSerializer.java
  16. So I have a recipe type that is supposed to not consume certain inputs. For some reason, whenever I craft a custom recipe of that type, it sets the output of the recipe to air after the output item is placed in the player's inventory. I've tried poking around with eclipse's debugger, but to no avail. If anyone knows why this is happening, help would be greatly appreciated.
  17. I would need the recipe to not consume an input, probably should have specified that.
  18. Just a quick question. I already know how to add a custom recipe type, but I don't know how to allow it to be used with the vanilla crafting table ore inventory crafting.
  19. So in my custom FeatureConfig class, I'm putting a list of BlockStates into the datafixer in the serialize() method. I would like to know if the unchecked cast warnings on lines 42 and 46 are unavoidable. I have a feeling that they are unavoidable since I need to cast to a generic type. I've looked online to see if the cast on those lines are unavoidable, but I didn't find anything helpful for my situation. I try to avoid writing code that gives warnings at all costs. Asking here because I couldn't find anything elsewhere. Any help would be greatly appreciated. Source: https://github.com/Awsomekeldeo/RealisTech/blob/b315e0472aedc4bb4d8f999e9d6984e126edddb1/src/main/java/awsome/realistech/worldgen/feature/ClayDepositConfig.java#L42
  20. I managed to get it to work. I put the recipe check inside the for loop inside of the fire() and canFire() methods. Fixed TileEntity: https://github.com/Awsomekeldeo/TechMod/blob/master/src/main/java/awsome/techmod/tileentity/KilnTileEntity.java
  21. In my mod, I have a tile-entity that behaves like a furnace. I gave it a recipe handler and everything, but it behaves strangely. Expected behavior: If I put an item in any of the 4 slots of the tile entity, it should begin the smelting progress. If I put an item with a valid recipe in the first slot and another different item with a valid recipe, it should smelt both of them according to each of their recipes. Actual Result: It begins smelting if an item with a valid recipe is put in the first slot. But if the first slot is empty but another slot has a valid item, it won't do anything. If I put 2 different items with valid recipes in the machine's input slot, then both items will be according to the recipe for the first item. Links to source code: TileEntity: https://github.com/Awsomekeldeo/TechMod/blob/forge-support/src/main/java/awsome/techmod/tileentity/KilnTileEntity.java Recipe Class: https://github.com/Awsomekeldeo/TechMod/blob/forge-support/src/main/java/awsome/techmod/api/recipe/KilnRecipe.java Recipe Serializer: https://github.com/Awsomekeldeo/TechMod/blob/forge-support/src/main/java/awsome/techmod/api/recipe/KilnRecipeSerializer.java Recipes: https://github.com/Awsomekeldeo/TechMod/tree/forge-support/src/main/resources/data/techmod/recipes/kiln
  22. Are you using Eclipse? You might need to hit F5 to refresh the workspace because Eclipse caches the non-java files in your mod, so Eclipse won't see them until you refresh the workspace.
×
×
  • Create New...

Important Information

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