Failender
Forge Modder-
Posts
1091 -
Joined
-
Last visited
Converted
-
Gender
Male
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Failender's Achievements
World Shaper (7/8)
119
Reputation
-
I need the library "reflections" for something I am triing. unfortunately minecraft crashes with an exception, once i add the library to my project. Is there something I can do to prevent the crash? build.gradle buildscript { repositories { jcenter() maven { url = "http://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.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "modid" sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = '1.8' } repositories { mavenLocal() } minecraft { version = "1.12.2-14.23.3.2655" runDir = "run" // 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 = "snapshot_20171003" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } dependencies { compile group: 'org.reflections', name: 'reflections', version: '0.9.10' // compile project(':easymods') // 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' // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, // except that these dependencies get remapped to your current MCP mappings //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' //deobfProvided '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 } 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 except the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } Crash: Exception in thread "main" java.lang.IncompatibleClassChangeError: Class com.google.common.base.Functions$IdentityFunction does not implement the requested interface java.util.function.Function at net.minecraftforge.server.console.log4j.TerminalConsoleAppender.formatEvent(TerminalConsoleAppender.java:184) at net.minecraftforge.server.console.log4j.TerminalConsoleAppender.append(TerminalConsoleAppender.java:178) at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156) at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129) at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120) at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84) at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448) at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433) at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417) at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403) at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63) at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146) at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091) at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1988) at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1960) at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1297) at net.minecraftforge.gradle.GradleStartCommon.parseArgs(GradleStartCommon.java:176) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:25)
-
why arent you extending the EntityFallingBlock..? I see a lot of copy pasta from that entity. Extend the entity and override what you need to
-
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
you can easyly compare using stack.getItem == Stone -
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
get the EntrySet of the furnaceRecipes. get the iterator. while(iterator.hasNext) get the iterator item if item.value is stone iterator.remove easy. -
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
If he is iterating over the entry set and checking if the VALUE is stone then he will remove all recipes that have stone as output that will also catch modded recipes if he is calling it AFTER modded recipes are added. -
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
Aaaah I see. FurnaceRecipes is a map, I remembered it as a list. That means that you need use the getSmeltingList.entrySet.iterator. You can than use that iterator to remove every entrance where value == stone -
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
oh okay. i made that up out of my mind. give me a sec ill look into it -
Removing a Vanilla Smelting Recipe [1.10]
Failender replied to minecraftbigfoot's topic in Modder Support
This is just pseudo code you will need to make it java urself recipes = Furnaceripes.instance.getList foreach(recipe in recipes) { if(recipe.output == stone) remove recipe } remember that you cant remove stuff while iterating over it with foreach so you will need to use the iterator methods -
I am 99% sure, yes. I dont know, because I didnt looked into it, but if you know java you know that this needs to be true, because if a class overriding / implementing a method it needs to follow the signature of the method it is overriding / implementing, and obfuscating is nothing but a simple rename, the files still need to follow the rules of java.
-
Your code looks way cleaner than mine Thank you! Found the error, it was me only opening the GUI on Client-Side so yeah. Just me beeing stupid.
-
Hey everyone, I am working on a custom GuiContainer in 1.11. I know that my problem is related to adding Slots to the Container. I added the code for my Custom Container, if you think the problem is elsewhere I will post related files public class ContainerBackpack extends Container{ private final int HOTBAR_SLOT_COUNT = 9; private final int PLAYER_INVENTORY_ROW_COUNT = 3; private final int PLAYER_INVENTORY_COLUMN_COUNT = 9; private final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; private final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; private final int VANILLA_FIRST_SLOT_INDEX = 0; private final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; private final int TE_INVENTORY_SLOT_COUNT = 27; public ContainerBackpack(IItemHandler itemHandler, EntityPlayer player) { this.itemHandler = itemHandler; for (int l = 0; l < 3; ++l) { for (int j1 = 0; j1 < 9; ++j1) { this.addSlotToContainer(new SlotItemHandler(itemHandler, j1 + l * 9, 8 + j1 * 18, 18 + l * 18)); } } for (int i = 9; i < player.inventory.getSizeInventory()-5; i++) { addSlotToContainer(new Slot(player.inventory, i, 8 + i % 9 * 18, 61 + 18 * (i / 9))); } } @Override public boolean canInteractWith(EntityPlayer playerIn) { return true; } public static ContainerBackpack build(EntityPlayer player, World world, int x, int y, int z) { ItemStack stack; if(x == 0) { stack = player.getHeldItem(EnumHand.MAIN_HAND); } else { stack = player.getHeldItem(EnumHand.OFF_HAND); } IItemHandler handler = stack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); return new ContainerBackpack(handler,player); } @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { Slot sourceSlot = (Slot)inventorySlots.get(index); if (sourceSlot == null || !sourceSlot.getHasStack()) return null; ItemStack sourceStack = sourceSlot.getStack(); ItemStack copyOfSourceStack = sourceStack.copy(); if (index >= VANILLA_FIRST_SLOT_INDEX && index < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) { // This is a vanilla container slot so merge the stack into the tile inventory if (!mergeItemStack(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT, false)){ return null; } } else if (index >= TE_INVENTORY_FIRST_SLOT_INDEX && index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { // This is a TE slot so merge the stack into the players inventory if (!mergeItemStack(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) { return null; } } else { System.err.print("Invalid slotIndex:" + index); return null; } if (sourceStack.getCount() == 0) { sourceSlot.putStack(null); } else { sourceSlot.onSlotChanged(); } return copyOfSourceStack; } } Greetz Failender
-
[1.11.2] Send message to all players on server
Failender replied to Failender's topic in Modder Support
thank you. -
[1.11.2] Send message to all players on server
Failender replied to Failender's topic in Modder Support
and how am i supposed to get the MinecraftServer? The getter method is not static. -
[1.11.2] Send message to all players on server
Failender replied to Failender's topic in Modder Support
PlayerList has no static getter method. Most of the methods calling stuff on the PlayerList are doing so by using the MinecraftServer::getPlayerList (sadly I dont really see a way to obtain the MinecraftServer Instance either, all the classes I see using it get it via constructor) So yeah. I searched for it otherwise I wouldnt be asking, maybe im just tarded -
[1.11.2] Send message to all players on server
Failender replied to Failender's topic in Modder Support
how to obtain the PlayerList instance?