Jump to content

Sofften

Members
  • Posts

    16
  • Joined

  • Last visited

Sofften's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. No it’s not a seperate thing it is already in the source code as I don’t have any dependency error.
  2. Hi, I'm trying to set up Dynamic Surroundings sourcode in Idea but Minecraft keeps crashing when launching. I can run SetupDecompWorkspace or other gradle tasks, and no Java error is detected. Here is the Mc log errors : Apparently the coremod is missing, btw the game shows me a beautiful dirt screen : I've checked the build.gradle but nothing seems wrong : buildscript { repositories { jcenter() maven { name = "Forge" url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } if (file('secrets.properties').exists()) { println "Loading parameters from secrets.properties" ext.secrets = new Properties() file('secrets.properties').withReader {secrets.load(it)} } repositories { maven { url = "http://chickenbones.net/maven/" } // dem bones! maven { url = "http://dvs1.progwml6.com/files/maven" } // mezz maven { url = "http://maven.tterrag.com" } // Chisel maven { url = "https://repo.elytradev.com/" } maven { name = "CurseForge" url = "https://minecraft.curseforge.com/api/maven/" } } apply plugin: 'net.minecraftforge.gradle.forge' apply from: 'configuration.gradle' sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 compileJava { sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 } minecraft { if (project.ext.has('secrets')) { if (secrets.uuid != null) clientRunArgs += ["--uuid ${secrets.uuid}"] if (secrets.username != null) clientRunArgs += ["--username ${secrets.username}"] if (secrets.password != null) clientRunArgs += ["--password ${secrets.password}"] if (secrets.jvmArgs != null) { clientJvmArgs += secrets.jvmArgs serverJvmArgs += secrets.jvmArgs } } runDir = "run" replace '@VERSION@', project.ext.modVersion replace '@FINGERPRINT@', project.ext.fingerprint replace '@UPDATEURL@', project.ext.updateurl mappings = project.ext.snapshot } dependencies { compile "craftstudio-api:CraftStudio-1.0.0.93:mc1.12:alpha" compile "animania:animania:1.12.2:1.6.2" compile "serene-seasons:SereneSeasons-1.12.2:1.2.15:universal" compile "codechicken-lib-1-8:CodeChickenLib-1.12.2:3.2.2.353:universal" compile "forge-multipart-cbe:ForgeMultipart-1.12.2:2.6.0.79:universal" compile "ctm:CTM:MC1.12.2:${project.ctmVersion}" compile "cosmetic-armor-reworked:CosmeticArmorReworked:1.12.2:v3" compile "littletiles:LittleTiles_v1.5.0:pre122_mc1.12.2" compile "iron-chests:ironchest:1.12.2:7.0.54.838" compile "biomes-o-plenty:BiomesOPlenty-1.12.2:7.0.1.2422:universal" if (fileTree(dir: 'libs').filter { it.name.startsWith('OreLib') }.getFiles().size() == 0) compile "orelib:OreLib-1.12.2:3.5.2.2:deobf" //compile "creativecore:CreativeCore_v1.9.35_mc1.12.2" deobfCompile "mezz.jei:jei_${project.mcVersion}:${project.jeiVersion}:api" runtime "mezz.jei:jei_${project.mcVersion}:${project.jeiVersion}" deobfCompile "team.chisel:Chisel:MC${project.mcVersion}-${project.chiselVersion}" } 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' } } // Reobfuscate the output of the mod JAR task with SRG names, otherwise the mod won't be able to reference MC classes reobf { coreJar { mappingType = 'SEARGE' } } // Define a new task for the contained JAR // If you want to, you can distribute this as a separate artifact to a Maven task coreJar(type: Jar) { // Copy all compiled files and resources from the source set to the JAR // If you have additional source sets, add the same logic here from(sourceSets.main.output) { // Include the coremod package // If you need additional files, add some more includes include 'org/orecruncher/dsurround/asm/**' } // Standard coremod manifest definitions manifest { // Added benefit of separating mod and coremod: No need for FMLCorePluginContainsFMLMod attributes 'FMLCorePlugin': "org.orecruncher.dsurround.asm.TransformLoader" // Strictly speaking not required (right now) // Allows Forge to extract the dependency to a local repository (Given that the corresponding PR is merged) // If another mod ships the same dependency, it doesn't have to be extracted twice attributes 'Maven-Artifact': "${project.group}:${project.archivesBaseName}-core:${project.version}" } // Add a classifier to the JAR ('-core' at the end of the file name) // Distinguishes the mod JAR from the shipped one classifier 'core' group = 'build' } task sourcesJar(type: Jar, dependsOn: classes) { description = 'Creates a JAR containing the source code.' from sourceSets.main.allSource classifier = 'sources' } task deobfJar(type: Jar) { description = 'Creates a JAR containing the non-obfuscated compiled code.' from sourceSets.main.output classifier = "deobf" manifest { // The crucial manifest attribute: Make Forge extract the contained JAR attributes 'ContainedDeps': coreJar.archivePath.name attributes 'FMLAT': 'dsurround_at.cfg' attributes 'Maven-Artifact': "${project.group}:${project.archivesBaseName}:${project.version}" } } task signCoreJar(type: SignJar, dependsOn: reobfCoreJar) { // Skips if the keyStore property is missing. onlyIf { project.hasProperty('keyStore') } // findProperty allows us to reference the property without it existing. // Using project.propName would cause the script to fail validation if the property did not exist. keyStore = project.findProperty('keyStore') alias = project.findProperty('keyStoreAlias') storePass = project.findProperty('keyStorePass') keyPass = project.findProperty('keyStoreKeyPass') inputFile = coreJar.archivePath.absolutePath outputFile = coreJar.archivePath.absolutePath } task signJar(type: SignJar, dependsOn: reobfJar) { // Skips if the keyStore property is missing. onlyIf { project.hasProperty('keyStore') } // findProperty allows us to reference the property without it existing. // Using project.propName would cause the script to fail validation if the property did not exist. keyStore = project.findProperty('keyStore') alias = project.findProperty('keyStoreAlias') storePass = project.findProperty('keyStorePass') keyPass = project.findProperty('keyStoreKeyPass') inputFile = jar.archivePath outputFile = jar.archivePath } build.dependsOn signJar jar.dependsOn signCoreJar def libPrefix = 'META-INF/libraries' jar { // Don't include the coremod in the main JAR // If you have more coremod-related packages that aren't nested in the main one, add inclusions for them exclude 'org/orecruncher/dsurround/asm/**' // Add the output of the coremod JAR task to the main JAR for later extraction from(coreJar.archivePath.absolutePath) { include '*' // Due to the way Gradle's copy tasks work, we need this line for the JAR to get added into libPrefix } // Add CREDITS.md into('/') { from('CREDITS.md') } manifest { // The crucial manifest attribute: Make Forge extract the contained JAR attributes 'ContainedDeps': libPrefix + '/' + coreJar.archivePath.name attributes 'FMLAT': 'dsurround_at.cfg' attributes 'Maven-Artifact': "${project.group}:${project.archivesBaseName}:${project.version}" } } //Adds the artifact types added by this script to the actual artifacts list. artifacts { archives sourcesJar archives deobfJar } Here I'm stuck, If you have an idea let me know, thanks in advance ^^
  3. Ok, I tried to figure out what Sheet Object looks like as you said, but finally when I looked again to the formula : fontRenderer.drawStringWithShadow( index + " (" + EntityList.getEntityStringFromClass(EntityList.getClassFromID(Integer.parseInt(index))) + "): " + val, leftAlign, 2 + 9 * lineNumber, 0xFFFFFF); I saw that the main goal was to get a String, but in fact index is already a String so it's kind of loopy for nothing if i'm not wrong. Then I replace the code with simply this : fontRenderer.drawStringWithShadow( index + " (" + index + "): " + val, leftAlign, 2 + 9 * lineNumber, 0xFFFFFF); And it gives me no errror, but maybe the result is not the same ?
  4. Hi, I'm updating a mod source code but I don't know how to correct this : EntityList.GetEntityStringFromClass() this Method no longer exist in EntityList, I'm trying to use GetEntityString instead but i cant figure out which Entity it's trying to get the String of, as it's a really disgusting code : fontRenderer.drawStringWithShadow( index + " (" + EntityList.getEntityStringFromClass(EntityList.getClassFromID(Integer.parseInt(index))) + "): " + val, leftAlign, 2 + 9 * lineNumber, 0xFFFFFF); So please correct me if it's wrong, but if I understand correctly it's trying to get the String of an Entity by its Class (with Method 'getEntityStringFromClass'), then it's trying to get the Class from an ID (with method 'getClassFromID'), and then it's trying to get the ID converting a String (index) to an int (like an ID is) (with 'parseInt'). What I do not understand is what is index, which String is it refering to. If i know that I could use instead 'GetEntityString', as I need the Entity pointed here to use that. 'index' is refering to : for (String index : sort) Then 'sort' is refering to : List<String> sort = new ArrayList<String>(sheet.keySet()); ... then 'sheet' is refering to : private void debugScanWithSheet(final Sheet sheet, boolean isDeltaPass) ... So i'm lost, help please Here is the source code : VisualDebugger.java
  5. Please Help me for this : EntityList.GetEntityStringFromClass() this Method no longer exist in EntityList, I'm trying to use GetEntityString instead but i cant figure out which Entity it's trying to get the String of, as it's a really disgusting code : fontRenderer.drawStringWithShadow( index + " (" + EntityList.getEntityStringFromClass(EntityList.getClassFromID(Integer.parseInt(index))) + "): " + val, leftAlign, 2 + 9 * lineNumber, 0xFFFFFF); So please correct me if it's wrong, but if I understand correctly it's trying to get the String of an Entity by its Class (with Method 'getEntityStringFromClass'), then it's trying to get the Class from an ID (with method 'getClassFromID'), and then it's trying to get the ID converting a String (index) to an int (like an ID is) (with 'parseInt'). What I do not understand is what is index, which String is it refering to. If i know that I could use instead 'GetEntityString', as I need the Entity pointed here to use that. 'index' is refering to : for (String index : sort) Then 'sort' is refering to : List<String> sort = new ArrayList<String>(sheet.keySet()); ... then 'sheet' is refering to : private void debugScanWithSheet(final Sheet sheet, boolean isDeltaPass) ... So i'm lost, help please Here is the source code : VisualDebugger.java
  6. Maybe someone have a solution for the things that still don't work : - EntityList.getEntityID() corrected, it was in Entity and not in EntityList - EntityHorse.getType() corrected by deleting it, Undead (Skeleton and Zombie) is no longer a Type for Horse but new Entities (EntityZombieHorse and EntitySkeletonHorse) - EntityHorse.isChested() corrected with this : EntityHorse ride = (EntityHorse) xride; AbstractChestHorse chest = (AbstractChestHorse) xride; setValue("jumping", ride.isHorseJumping()); // functional ? setValue("rearing", ride.isRearing()); setValue("saddled", ride.isHorseSaddled()); setValue("leashed", ride.getLeashed()); setValue("chested", chest.hasChest()); setValue("tame", ride.isTame()); - EntityHorse.getHasReproduced() deleted for now, lets see if it works
  7. It works, thanks a lot. Maybe you have a solution for getEntityID and horse properties ? Also this : fontRenderer.drawStringWithShadow( index + " (" + EntityList.getEntityStringFromClass(EntityList.getClassFromID(Integer.parseInt(index))) + "): " + val, leftAlign, 2 + 9 * lineNumber, 0xFFFFFF); getEntityStringFromClass is undefined for the type EntityList (in eu.ha3.matmos.game.user.VisualDebugger)
  8. Is 'getEntityID' still in net.minecraft.entity.EntityList ? cause it tells me that it's not. Yes here, but also in L_legacy (linked) : setValue("armor_0_as_number", number(player.inventory.armorInventory[0])); setValue("armor_1_as_number", number(player.inventory.armorInventory[1])); setValue("armor_2_as_number", number(player.inventory.armorInventory[2])); setValue("armor_3_as_number", number(player.inventory.armorInventory[3])); and in M_ply_armor (linked) : EntityPlayerSP player = Minecraft.getMinecraft().player; for (int i = 0; i < 4; i++) { ItemStack item = player.inventory.armorInventory; ItemProcessorHelper.setValue(this, item, Integer.toString(i)); } hasChest doesn't work, except if it's not from net.minecraft.entity.passive.EntityHorse L__legacy.java M__ply_armor.java
  9. In fact I understand the text, but not the link with the errors I have ( This error :"The type of the expression must be an array type but it resolved to NonNullList<ItemStack>" ). Also the website does not contain help about getEntityID, getType, isChested and getHasReproduced errors.
  10. For the 'change list' I just found this : https://wiki.mcjty.eu/modding/index.php/Porting-1.10-1.11 which looks interesting, even if this : ItemStack changes This is the most significant change. An empty itemstack (like a slot in a chest that is empty or the player's hand that is empty) is no longer equal to null but to ItemStack.EMPTY instead! In fact 'null' ItemStack's are no longer allowed. You have to carefully go over all your code (use annotations where appropriate) to find all places where you use null for itemstacks and replace them. Also where you compare with null you have to replace this with a isEmpty() call. Be careful with things like ItemStack[] items because these are initialized to null. You need to ensure that all these items are initialized to EMPTY instead of null. It is recommended to use NonNullList<ItemStack> for this on 1.11 or else use ItemStackList from CompatLayer. is not fully understandable for me.
  11. Here is the mod source code package (gradle and mod files already updated for 1.11.2) MAtmos-r33.zip
  12. Well ok, but I found nothing about NonNullList<ItemStack> , getEntityID, getType, isChested and getHasReproduced, sadly.
  13. Well I don't understand why you send me that considering that it's absolutely not helping me in any way, but well if you dont want to help me that's sad, but no problem i will manage to find help ;).
  14. "Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. " Ok understood, on my way to read your online guide about java basics, except if you advise me another. Then I was thinking; is there a list of method changes trough version, so that I can find what I need ? Because once I've understood what this code that I posted means, I dont see how I will know where to find the new method, and in which class file. And also I still have some java knowledge, so just explain me what I need to do to repair those errors and I will manage to understand by readin java guides. Thx for answer.
  15. REPOST: sorry my post bugged Hi, I actually trying to uptade a 1.10 mod to 1.11.2, which is MAtmos (abandonned by Hurricane, and then updated by Sollace). It works with LiteLoader. Sorry but I'm not a modder, I'm only discovering it and I don't have knowledge in Java, I know you will tell me that this forum isn't a Java classroom but what I ask is very little, I'm not here to ask you how to create code or a whole mod. I've update the gradle and ant stuff to 1.11.2, but some classes files give me errors about mc source code and methods, I understood that it is because of the Minecraft source code which has changed from 1.10 to 1.11.2, because it works perfectly well in 1.10. I could repair it for really really simple things ('thePlayer' began 'player', 'theWord' began 'world') but there is some other things that I dont know how to repair. Here is a list : EntityPlayerSP player = mc.player; setValue("armor_0_as_number", number(player.inventory.armorInventory[0])); setValue("armor_1_as_number", number(player.inventory.armorInventory[1])); setValue("armor_2_as_number", number(player.inventory.armorInventory[2])); setValue("armor_3_as_number", number(player.inventory.armorInventory[3])); Error : The type of the expression must be an array type but it resolved to NonNullList<ItemStack> ItemStack item = player.inventory.armorInventory; Error : Same setValue("entity_id", EntityList.getEntityID(ride)); Error : The method getEntityID(Entity) is undefined for the type EntityList EntityHorse ride = (EntityHorse) xride; setValue("chested", ride.isChested()); setValue("type", ride.getType().isUndead()); setValue("reproduced", ride.getHasReproduced()); Error : The method getType() is undefined for the type EntityHorse Error : The method isChested() is undefined for the type EntityHorse Error : The method getHasReproduced() is undefined for the type EntityHorse int entityID = EntityList.getEntityID(e); Error : The method getEntityID(Entity) is undefined for the type EntityList int eID = e instanceof EntityPlayer ? 0 : EntityList.getEntityID(e); Error : The method getEntityID(Entity) is undefined for the type EntityList return player.inventory.armorInventory[this.zeronth]; Error : The type of the expression must be an array type but it resolved to NonNullList<ItemStack> .getEntityID(mc.objectMouseOver.entityHit) : MODULE_CONSTANTS.NO_ENTITY); Error : The method getEntityID(Entity) is undefined for the type EntityList If some files are missing to understand just tell me, i will upload it, but actually I think it's only due to methods changes in Minecraft classes files, so yeah I know I shouldn't try anything without knowing Java code, but I'm just asking to you if you could tell me what should I write (What is the new methods spelling), not necessary to explain me, but if you cant say me what to do just try to explain me it's always better I will do my best to understand
×
×
  • Create New...

Important Information

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