Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Location

perry's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I have a metal that requires a 2 layer effect for the ingot item, the block item, and the block placed in world. On the first layer I have a coloured texture, on the second I have a mask that is multiplied by a sinusoidal function in my IItemColor and IIBlockColor handlers to get a pulsing effect. The items work great in inventory and as entity items dropped into the world but when I place the block it seems the colour is queried once and then baked in. So the block will only update its colour if a block update is called. Here is the block state JSON and model JSON: { "forge_marker": 1, "defaults": { "model": "mod:cube_tinted_overlay", "textures": { "layer0": "mod:blocks/demongoldblock", "layer1": "mod:blocks/blockmask" }, "transform": "forge:default-block" }, "variants": { "normal": [{}], "inventory": [{}] } } { "textures": { "particle": "#layer0" }, "elements": [ { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { "down": { "texture": "#layer0", "cullface": "down", "tintindex": 0 }, "up": { "texture": "#layer0", "cullface": "up", "tintindex": 0 }, "north": { "texture": "#layer0", "cullface": "north", "tintindex": 0 }, "south": { "texture": "#layer0", "cullface": "south", "tintindex": 0 }, "west": { "texture": "#layer0", "cullface": "west", "tintindex": 0 }, "east": { "texture": "#layer0", "cullface": "east", "tintindex": 0 } } }, { "from": [ 0, 0, 0 ], "to": [ 16, 16, 16 ], "faces": { "down": { "texture": "#layer1", "cullface": "down", "tintindex": 1 }, "up": { "texture": "#layer1", "cullface": "up", "tintindex": 1 }, "north": { "texture": "#layer1", "cullface": "north", "tintindex": 1 }, "south": { "texture": "#layer1", "cullface": "south", "tintindex": 1 }, "west": { "texture": "#layer1", "cullface": "west", "tintindex": 1 }, "east": { "texture": "#layer1", "cullface": "east", "tintindex": 1 } } } ] } The block is simple, all it does is override canRenderInLayer to true so that it renders in all layers as I need a solid and translucent pass. I'd like to use the same method I do for the items for the block but not sure how to get it to query the colour each frame. Is there a simple solution to this? If not I'll consider using animations for the ingots and blocks but I like freedom I get with the colour multiplier & mask. Cheers
  2. I'm interested to know what solutions people have come up with for Gradle dependencies on public projects that do not publish maven artifacts. A simple solution is to download the deobfuscated JAR or build it locally then drop it in the libs folder. Not only does this involve a fiddly manual task but it can cause problems with automated builds. For my Jenkins server to successfully build I would need to include the JAR in my git repo which I don't want to do for copyright reasons nor do I want to constantly be pushing a binary blob up to my server. My current solution is to add a git clone task the buildscript that fetches a github repo. Though I haven't yet figured out how to set up the dependencies so that clone is executed automatically. build.gradle buildscript { repositories { jcenter() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' classpath 'org.ajoberstar:gradle-git:0.6.3' } } ... clone.dependsOn { tasks.findAll { task -> !task.name.equals("clone") && task.name.startsWith('clone') } } task cloneMod(type: GitClone) { def destination = file("../mod") uri = "https://github.com/user/mod.git" branch = "1.9.4" destinationPath = destination bare = false enabled = !destination.exists() } Then in settings.gradle I include the project and add it as a dependency in build.gradle: settings.gradle include ':mod' project(':mod').projectDir = new File(settingsDir, '../mod') build.gradle dependencies { compile project(':mod') } With this set up I can get a successful build with gradlew clone && gradlew build. This solution should also involve a pull to get the latest updates for the given branch but I haven't gotten that far yet as I'm not sure if I'm going to keep handle dependencies like this. This approach has several drawbacks however. For one builds are much slower as Gradle has to spool up and run through all the tasks on the dependent mod, even if the tasks are up to date it still takes a while before we get to building our own mod. Additionally it seems that tasks like gradlew runClient will run for both projects. This means that after closing the one instance on MineCraft another one will start up. It's quite annoying but can be avoided if you halt the gradle task before closing the first instance. I'm sure there's a way to avoid this in the build script but I currently haven't figured that out yet. Another option could be to use my Jenkins server to compile dependent mods. I could then either figure out a Jenkins script to publish artifacts to my own maven repo which my mods build.gradle can use as a dependency. Though this would probably also cause some copyright issues as I would be publicly distributing other peoples mods. The other option for this approach could be to push the scripting to mod's build.gradle where a script could check if we have the latest Jenkins build. If we don't have the latest build it would remove the old one and pull down the latest deobfuscated JAR to the libs folder. I believe it this would be fine so long as downloading artifacts requires authentication on the Jenkins server. A third option that I am warming to would be a variant on my current solution but without depending on a sub project. Instead the script would check if we have the mod JAR in libs, if not it would clone, build, and copy the deobfuscated JAR into the libs folder. I'm sure there would be opportunity to code in version numbers / commit IDs to have more control over which version of the mod we need to depend on. Fourth option.. I could ask the mod author to publish artifacts. Thoughts? Anyone else have any solutions? [move]Perry[/move]
  3. I'm currently experiencing huge lag spikes every few seconds that make the game unplayable. I have a fair few 1.9.4 mods installed and I can't seem to find what is causing the spikes. Are there any tools currently available that could point to the issue? Cheers
  4. I'm currently experiencing huge lag spikes every few seconds that make the game unplayable. I have a fair few 1.9.4 mods installed and I can't seem to find what is causing the spikes. Are there any tools currently available that could point to the issue? Cheers
  5. Was certain I did this but re-ran the command and now I can see the JAR contents. Thanks!
  6. Hi all, just getting back into modding and trying to remember the workflow. I'm certain that before I was able to view the source of a unobfuscated JAR within IntelliJ. I have the the JARs in the libs folder but in IntelliJ I cannot drop down/expand the jar to see its content. There is a way to do this right?
  7. Just checked the dependencies bit in intelliJ, the Blood Magic API is already listed in there but still not way of importing or viewing any of the files. Bet I've done something dumb and it'll take me days to figure out.
  8. I have a libs folder in my project root with the Blood Magic API inside (Blood Magic API - v1.1.0 (1.7.10).zip). My build.gradle file is as follows: buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'scala' apply plugin: 'forge' version = "0.1" group= "com.perry.automation" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "automation" minecraft { version = "1.7.10-" assetDir = "eclipse/assets" } dependencies { compile 'com.google.code.findbugs:jsr305:1.3.9' compile group: 'com.google.guava', name: 'guava', version: '12.0' compile fileTree(dir: 'libs', include: '*.zip') compile fileTree(dir: 'libs', include: '*.jar') } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } However in intelliJ I cannot import any of the classes from the API. Further I used to be able to expand the API in the libs folder and see the classes inside it, now I just get a yellow highlight over the zip and cannot expand it from intelliJ. (See http://i.imgur.com/QVTP0mh.png) Any ideas?
  9. I understand they are different build systems, in the documentation it has instructions on linking an external Maven or Ivy repository to use as a dependency. Can you not link to an external repository that uses gradle to build, or am I missing something fundamental here?
  10. Ah I'm new to these build systems. After looking it up it seems you can only depend on Maven and Ivy repositories remotely, can you not depend on a remote repository that uses Gradle to build? The 3 lines you said to add to build.gradle, just to clarify, is that compiling the lib source files into a jar or is it taking an already compiled jar in compilation of my project? Not sure if that's quite right about TE as dependency, many mods use it and you can use those mods without TE installed (such as ExtraUtils and AE2). Thank you
  11. Thank you but I was referring specifically to the gradle build system and dependencies as briefly explained here https://github.com/MinecraftForge/ForgeGradle/wiki/Dpendencies. The instructions you gave involve cloning the repo, compiling the jar and linking in eclipse (I'm using IntelliJ anyway). What I'm wondering is if the Gradle build system can do essentially the same thing automatically by listing it as a dependency in the build.gradle file.
  12. Is there a way to have the RF API available on Github as a dependency in build.gradle or is there a better way to depend on it? The repo is located at https://github.com/CoFH/RedstoneFlux-API
  13. perry

    [1.7.2] ApolloMod

    ApolloMod 0.1 An inbetweener mod. Currently allows collecting samples of mobs in order to spawn them at the cost of RF and fluids acquired from killing mobs. Download http://mod-deploy.appspot.com/download/apollomod-0.1.jar Brief Guide First craft yourself a diamond blade with a stick and diamond. Now cut some needles and glass slides with the blade with iron ingots and glass respectively. Right click on an entity with the needle to get a sample (kills the entity). Place a slide in the sampler by right clicking it with the slide in hand. Now right click with the sample to get a mob sample. Right click on the cloning device with the mob sample to place it inside (or use pipes). (Who needs GUIs?) The cloning device requires Redstone Flux (RF), fluid flesh, and a focus on the block above. Fluid flesh is collected by killing mobs above grates. (Pump out with liquid transfer nodes for example). Mod Interop ExtraUtilities: Added a crafting recipe for ender lily seeds, a seed and ender pearl. #lazy TODO The following may happen: Splicing mobs together. At minimum the ender cow will emerge. Nerf the extrautils recipe. An item tank that collects fluid flesh from killing mobs in the field Discussion Suitable to post here: Bug reports, crash log and a description. Suggestions. If your post is short and not that related to this thread (e.g. mod advice) please PM me instead, often these mod threads get way too cluttered.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.