Jump to content

suppergerrie2

Members
  • Posts

    18
  • Joined

  • Last visited

Converted

  • URL
    https://www.suppergerrie2.com

Recent Profile Visitors

2194 profile views

suppergerrie2's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Oh cool! Thanks! Didn't mean to make it sound like I was trying to hurry you sorry.
  2. I'm fairly sure I know what happened then, I went to bed and closed my laptop but my headset cable or something else got stuck between it and pressed buttons. Atleast that is the only thing I can think off. (Which would also explain why the battery was dead this morning). I guess the policy is that bans are permanent and non-reversable?
  3. I didn't but my cat may have.... I honestly dont remember leaving my laptop open but my cat has done stranger things, around what time was it?
  4. Hello, Today I woke up and saw I couldn't check the forge discord for updates and when I tried the invite it said I was banned. I'm not sure what happened because I was asleep. If possible I'd like to know the reason because I'm afraid my account was compromised and used for some kind of spam. I know this will probably not help my chance of getting back on the discord server but my priority at the moment is making sure my account isn't compromised and being used in some kind of bot network. My discord account is suppergerrie2#7018
  5. Any reason you dont just do "F3+P" to enable it? It even gets saved so you only have to do it once, and if you want to turn it off just press "F3+P" again
  6. The jar gets put into META-INF/libraries and extracted to mods/1.12.2 on game launch. I know at least some of the jar files are loaded because it can find classes from ChaosNet-1.0-SNAPSHOT.jar. debug.log
  7. Anyone have an idea for a solution? I know some dependencies are loaded because it can find some of the classes from the dependencies.
  8. Hello, I am working on a mod and I am using a custom dependency. I added the jar files according to the docs and used a build.gradle based on PaleoCrafter. If I open the jar file I can see all of the .meta and .jar files and I can also see forge extracting them into the mods/1.12.2 folder. But when the game is launched the mod crashes during initialization due to java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper It runs fine in intellij This is my build.gradle: buildscript { repositories { jcenter() maven { url = "https://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. version = "1.0" group = "com.suppergerrie2.dependencytest" archivesBaseName = "sdependencytest" repositories { mavenLocal() } sourceCompatibility = targetCompatibility = '1.8' compileJava { sourceCompatibility = targetCompatibility = '1.8' } minecraft { version = "1.12.2-14.23.5.2814" runDir = "run" mappings = "stable_39" } processResources { inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version':project.version, 'mcversion':project.minecraft.version } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } //From https://github.com/PaleoCrafter/Dependency-Extraction-Example/blob/library-embedding/build.gradle configurations { // Configuration that holds JARs to embed inside the mod JAR embed // Make embedded dependencies actually available during compilation/to IDEs compile.extendsFrom embed } dependencies { embed group: 'com.schematical.chaosnet', name: 'ChaosNet', version: '1.0-SNAPSHOT' } // Custom task to generate the metadata files required for our dependencies task generateMetaFiles { // Code for execution after the whole buildscript was parsed and loaded doLast { // Clear the dependencyMeta directory since we don't want old dependencies to still be listed in there file("${buildDir}/dependencyMeta/").deleteDir() configurations.embed.resolvedConfiguration.resolvedArtifacts.each { // Create a meta file for each dependency in a specified directory def metaFile = file("${buildDir}/dependencyMeta/${it.file.name}.meta") metaFile.parentFile.mkdirs() // Use the Gradle notation provided by the API ('group:artifact:version') for the meta file... def artifactRef = it.moduleVersion.toString() // ...and append the classifier if present if (it.classifier != null) { artifactRef += ":${it.classifier}" } // Write the artifact information to the meta file, to be used by the metaFile.text = "Maven-Artifact: $artifactRef" } } } // Use the standard JAR task as container for the main jar and the contained dependencies (from the embed configuration) jar { into('/META-INF/libraries/') { // Add all of the dependency JARs to the main JAR for later extraction from configurations.embed // Also include all dependency meta files from "${buildDir}/dependencyMeta/" } manifest { // The crucial manifest attribute: Make Forge extract the contained JARs attributes 'ContainedDeps': configurations.embed.collect { it.name }.join(' ') } // Only run the main jar task after the meta files were built dependsOn generateMetaFiles } And this is the only class in the mod: package com.suppergerrie2.dependencytest; import com.schematical.chaosnet.ChaosNet; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.Logger; @Mod(modid = TestMod.MODID, name = TestMod.NAME, version = TestMod.VERSION) public class TestMod { public static final String MODID = "sdependencytest"; public static final String NAME = "Test Mod"; public static final String VERSION = "1.0"; private static Logger logger; @EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); ChaosNet sdk = ChaosNet.builder() .build(); logger.info(sdk); } @EventHandler public void init(FMLInitializationEvent event) { } }
  9. Ah that makes sense thanks! Yeah EnumFacing.UP was just for testing, will change that later.
  10. So I should do something like this? IBlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block.hasTileEntity(state)) { TileEntity tileentity = world.getTileEntity(pos); if (tileentity != null) { if (tileentity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP)) { itemHandler = tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); } } }
  11. Ah seems like getItemHandler is doing exactly that! Thanks!
  12. Hello, For my mod I need to know if a block can hold items (like a chest or hopper). I'm currently checking if it is an instance of BlockContainer but that doesn't seem to work on modded chests. Is there a way to check if a block has an inventory without hardcoding all of the names or something strange like that? edit: I am now using VanillaInventoryCodeHooks.getItemHandler() and checking if the result is null. It seems to work but are there any negative effects I didn't think about?
×
×
  • Create New...

Important Information

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