• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I am rendering an entity in 1.16.2, but the texture is getting FileNotFoundExceptions. I added loot tables and lang files but they didn't work either, so I think my resource folder is just not getting recognized. I made sure everything in my java code is correct, such as modid, but I'm not too sure about build.gradle and the other non-java files. Here is my build.gradle:  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' apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.16.2-' group = 'com.david.minecraft.testmod' archivesBaseName = 'testmod' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { mappings channel: 'snapshot', version: '20200514-1.16' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { testmod { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { testmod { source sourceSets.main } } } data { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' args '--mod', 'testmod', '--all', '--output', file('src/generated/resources/') mods { testmod { source sourceSets.main } } } } } dependencies { minecraft 'net.minecraftforge:forge:1.16.2-33.0.3' } jar { manifest { attributes([ "Specification-Title" : "testmod", "Specification-Vendor" : "david", "Specification-Version" : "1", "Implementation-Title" : project.name, "Implementation-Version" : "${version}", "Implementation-Vendor" : "david", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } } What have I done wrong?
    • I was able to use data parameters to sync client and server data
    • So...i tried to code that myself and i made it work, but my solution may not be the best or the most elegant one. Turns out that onEntityCollision happens only if the shape of the block is set to be smaller than the full block. So i set two different voxel shapes, a null voxel shape and one that is slightly smaller than the cube, with dimensions: Block.makeCuboidShape(0.1F, 0.1F, 0.1F, 15.9F, 15.9F, 15.9F) which doesn't basically change anything visually but lets the collision event happen (For some reason i am still unable to understand). Inside the event i just check for the condition and select the appropriate voxel shape, which then needs to be returned by getShape (not getCollisionShape). It works but as i said before this seems to be a slightly "hacky" solution and also present some issues: 1) you will be able to walk on the border of your block when in its solid form 2) any other entity will be able to walk through your block while you are inside the block with your condition being verified 3) being the voxel shapes static and shared between all blocks of the same type, when you make one of them not solid, if other are present they will all become not solid
    • porfavorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
    • I did cancel the collision shape of the block (in the very first try) and I'm sure the condition is satisfied since when I have the item, I can clip into the block (and it covers my screen), but there is a force constantly pushing me out and doesn't allow me to walk through the block. Without that item, the block just acts like normal block.
  • Topics

  • Who's Online (See full list)