Jump to content

dylandmrl

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by dylandmrl

  1. Wtf, ok something is wrong with my intelliJ then. Thanks for your time.
  2. What did you mean ? Ok so this an intellij error ?
  3. It is, with all-warning enable. This is on intellij.
  4. Here it is: > Configure project : As part of making the publishing plugins stable, the 'deferred configurable' behavior of the 'publishing {}' block is now deprecated. Please add 'enableFeaturePreview('STABLE_PUBLISHING')' to your settings file and do a test run by publishing to a local repository. If all artifacts are published as expected, there is nothing else to do. If the published artifacts change unexpectedly, please see the migration guide for more details: https://docs.gradle.org/4.9/userguide/publishing_maven.html#publishing_maven:deferred_configuration. In Gradle 5.0 the flag will be removed and the new behavior will become the default. at build_djo6g6vwo7zjge74uphn4saye.run(D:\Passion\gsbe\build.gradle:14) (Run with --stacktrace to get the full stack trace of this deprecation warning.) New Dep: net.minecraftforge:forge:1.15.2-31.0.14_mapped_snapshot_20190719-1.14.3 CONFIGURE SUCCESSFUL in 14s Could not resolve: org.junit.jupiter:junit-jupiter:5.6.0 The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
  5. The « nothing worked » is the line: unable to resolve junit.5.6 inside the build console.
  6. Hello guys, My gradle can't resolve the junit artifacts inside my build.gradle. My build.gralde: 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 = '0.0.1' group = 'me.me.gsbe' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'gsbe' 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: '20190719-1.14.3' // 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 { examplemod { 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 { examplemod { 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', 'gsbe', '--all', '--output', file('src/generated/resources/') mods { examplemod { 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.0.14' // 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 testImplementation 'org.junit.jupiter:junit-jupiter:5.6.0' } test { useJUnitPlatform() } // Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ "Specification-Title": "examplemod", "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 // we define a custom artifact that is sourced from the reobfJar output task // and then declare that to be published // Note you'll need to add a repository here def reobfFile = file("$buildDir/reobfJar/output.jar") def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar' builtBy 'reobfJar' } publishing { publications { mavenJava(MavenPublication) { artifact reobfArtifact } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } } I tried many stuff such as testCompile, plugins {id "java"], version 4 of junit, taking the artifact directly from Maven but nothing worked.. Thanks in advance.
  7. Then when you have to work with GUIs are you building your own system that extends the usual screen and screenContainer class or are you still using the Minecraft's one and just keep the "messyness"?
  8. Hello guys, For my mod I need to work a lot with GUI and for once nothing wrong is happening. However, I find the code of Minecraft very messy and inconstitent. I don't have the code in front of my eyes right now but I have figured out many things that are very stranger. As an example, all widget has a renderbutton when a widget isnt always a button. Container has a guiLeft when a widget as a x. The screen has a width variable for the width of the whole screen and not for his own width. KeyPressed in container doesnt focus on the widget focused first. When you resize the screen init is called when we could just move childrens and avoid to re initialise everything. And so on. I am maybe wrong with several principles. In general, what do you think about GUI. How do you handle them, do you have subclass like MyScreen and MyContainerScreen for consistency ? Because I am wondering about redo everything from focusable gui even my own container screen and so on..
  9. What the fuck you have a whole tutorial section that I never saw, you really should to create a place on forge forum with all that usefull tutorials that are not so easy to find out. For people who want to check his amazing tutorials: https://cadiboo.github.io/tutorials/1.15.1/forge/
  10. Since I just want to, at least, provide a prototype of my mod that works first, I will pass for the moment with all that capabilities stuff even if it doesn't seem to be difficult at all. Thank you again :)!
  11. I know about this one is just the whole stuff about capability, I don't really understand why they are useful when you store variables for you own stuffs and I need a good and simple tile implementation to produce something clean. I will look for it on github.
  12. I will need to find an example since I am not sure about my own implementation but thanks you. I will may come back if I have more question. Again thank you for your help diesieben07!
  13. That's why I am blocking, I have only one capability storage since it is only one capability and I can't use direction in my class that implement IStorage<E>. And I see no place where you link your Storage to your provider. If I am understanding (and I am not sure that I am), all is link using the interface of our implementation. So what can I do ?
  14. Ok ok, I will check that out. I see just one problem, capability has their own NBT storage or do they "insert" their own storage inside the tile entity write and read functions ? Because since I will have two times the same storage's tags maybe they will overlap ?
  15. Because honestly I didn't know, thank you ! However that doesn't fix my problem.
  16. I don't know for the first one since the capability is in both case very different, one is a buffer the other one if a storage but both implementation are exactly similar. For your second comment, sorry I didn't use the good vocabulary's word. I am talking about all the tile entity stuff to store data without using capabilities (handleUpdateTag and stuff). However it was simple with this, since the block that use two times the queue was extending by the one using only one queue. I just had to override the writeNBT and readNBT to add the second one and create an new instance inside the second block with another name. if (te instanceof TileAbstractPipe) { event.addCapability(new ResourceLocation(Datacraft.MOD_ID, "buffer_capability"), new PacketsProvider()); } if (te instanceof TileAnalyser) { event.addCapability(new ResourceLocation(Datacraft.MOD_ID, "packet_capability"), new PacketsProvider()); } You see it's something like this where TileAnalyser extends TileAbstractPipe so the analyser should have both capability. Of cours here the provider is the same, it won't work but since the provider depend of an interface I can't create another one. Or maybe my block can have two times this capability but one with the direction "north" and another one with the "sud" hmmm ?
  17. Hello guys, happy new year, I am facing again another problem with capabilities, first of all I decided to remove every NBT for capabilities, am I right or not ? If I am right, then I am facing a problem. Indeed, I am trying to add two capabilities that are exactly the same. Let me explain, I have a storage capabilities that store a queue of number and I want to have two queues inside a same object. I could reimplement my code two times as two different capabilities but I will just reuse the same code again and I don't really like it. Do I have another choice ? I know that I need two different provider but a provider are directly linked to his interface or the interface should be the same twice so how can I do this well? For the moment I just think about adding two interface that are extending the parent one but then I have to write two times the same implementation on that implements interface 1 and another one interface 2. Also I can't immediatly create a capability that contains both queue since another tile depend on only one queue. I am sure I am missing something but what ?
  18. Check this video, it helped me a lot with config file:
  19. Okay I got it, everything should be fine now. Thank you very much to take your time like this! The Debugger class is mine but I will just create my own exception and throw something instead.
  20. Okay I have tried to figure out how to do without blowing everything (I have certainly made mistakes again): public static Field field = ObfuscationReflectionHelper.findField(Container.class, "field_177758_a"); I have found "field_177758_a" as an equivalent of listeners in the website that you provided. try { List<IContainerListener> listOfListeners = (List<IContainerListener>) DCContainer.field.get(this); for(IContainerListener listener: listOfListeners){ if(listener instanceof ServerPlayerEntity){ this.sendUpdate(listener); } } } catch (IllegalAccessException e) { Debugger.error(e); } For this one, I am not sure at all.
  21. For people who don't know how to do, I have something like : Inside your container: public void detectAndSendChanges() { super.detectAndSendChanges(); if(this.tileEntity.isDifferent()){ this.tileEntity.setDifferent(false); Field f = null; try { f = Container.class.getDeclaredField("listeners"); f.setAccessible(true); try { List<IContainerListener> listOfListeners = (List<IContainerListener>) f.get(this); //IllegalAccessException for(IContainerListener listener: listOfListeners){ if(listener instanceof PlayerEntity){ // Send the packet } } } catch (IllegalAccessException e) { e.printStackTrace(); } } catch (NoSuchFieldException e) { e.printStackTrace(); } } } Correct me if I am wrong but normally everything is ok! isDifferent is set as true if the tileentity receive any modification. Basically I have a function that make the tile entity dirty and put this variable to true at the same time.
  22. Ok so basically, when I detect a change, I need to send a packet to each player using listener that I am getting using reflexion to update their client tile entity based on my server side tile entity and my container will retrieve the data from their own tile entity ?
  23. Ah yes this was my bad trully sorry, however my main problem is still the same, how can I send a "complex change" I mean, I don't have an array of int inside my tile entity but a list of list that store several values. I can't just update the whole data structure when I observe a changement ?
  24. Ok I've implemented the container but I don't understand how to properly handle the "detectAndSendChanges" function. My tile entity contains a rather complex structure and I only see this function: "listener.sendWindowProperty(this, varToUpdate, newValue);" to communicate a change or, I need to change a whole structure which is not only composed of ints... Also, I can't access the listeners list since the variable is private.
×
×
  • Create New...

Important Information

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