Failender
Forge Modder-
Posts
1091 -
Joined
-
Last visited
Everything posted by Failender
-
no idea to be honest, i started with 1.8 . try it out i guess..
-
To make it simple. if(Player.getCurrentEquippedItem() !=null && Player.getCurrentEquippedItem().itemID == this.itemID NO if(Player.getCurrentEquippedItem()==MyItem) YES if you dont understand this go back, learn some java and come backj then
-
Im not gonna spoon feed you. If you got some specific questions I might help you but im not gonna throw a bunch of code on you
-
also you dont need to compare the items, the boolean should tell u if the item is equipped or not
-
dont use ids to compare, use the instance of the item u create to register the item. so use equippedItem==myItem
-
for gods sake learn java. NEW BlockPos
-
use new BlockPos(x,y,z). blockpos is the new wrapper class for posuitiohns
-
should be event.state.getBlock()
-
how about you tell us which version you are in? if its 1.8 , 1.8 ios working wit hblocksates
-
if you know what static means then you know where ur issues come from.
-
use an IWorldGenerator, to check which chunk u are in use World#getBiomeGenForCoods Also if u have a question add which version u are in please.
-
[1.7.10] Help with initializing TradeHandler
Failender replied to general223's topic in Modder Support
Your tradehandler code is never getting called. the FMLInit events are only called in the Mainmod class. So you need to call the villager stuff from your main mod class -
[1.7.10] Help with initializing TradeHandler
Failender replied to general223's topic in Modder Support
ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); ModItem.mainRegistry(); what the f.....? -
the thread is month old why are u responsing here?^^ i had it in preinit
-
Was already using that, just dont realized that I need to use the relative path, seen from the jar. Thank you anyway. (So we were talking about learning java.. :'D )
-
I was so confused with the exception with the handler that i dont thought about the thrown ioexception Actually I dont care, because I want to crash the game anyway if there is something wrong in that part, because then my mod will be useless as fk. But yeah it is a FileNotFound exception. java.lang.RuntimeException: java.io.FileNotFoundException: F:\Server\mods\minigames-1.8-1.0.jar\assets\minigames\maps\archer.fail (Das System kann den angegebenen Pfad nicht finden) I just realized that my problem is, that my file inside a jar, so its technically not a file. So I need to read the file inside the jar. The way to do that was getClassCloader and getResourceAsStream (right?) so my problem is.. im inside a static method i cant use this.class. Whats the correct way to do that?
-
Hey guys, to describe my situation. I got additional data saved in the assets under assets.minigames.maps , that I need to access on server side. So i save the path of my data in the preInit Event using path = event.getSourceFile().getAbsolutePath(); The files are storing an int[][][] , saved with an ObjectOutputStream into the file. So I try to read that using the following method, where key is the name of the map (e.g. archerwars) private static int[][][] readFile(String key) { File file = new File(MiniGames.path+"/assets/minigames/maps/"+key+".fail"); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); int[][][] ret = (int[][][]) in.readObject(); in.close(); return ret; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(file.getAbsolutePath()); } } In eclipse this is working just fine. But once I compile the mod it crashes the server with the following crash log Any ideas? Greetz Fail
-
hint of the day: learn java x)
-
it might be better to create ur SNW by using the constructor SimpleNetworkWrapper(String channelname) but i am not sure with that
-
public void setMimicBlock(IBlockState state, boolean isClient) { this.state = state; if (isClient){ PacketDispatcher.sendToAll(new SyncCurrentMimicBlockState((EntityPlayer) this.player)); PacketDispatcher.sendToServer(new SyncCurrentMimicBlockState((EntityPlayer) this.player)); } else PacketDispatcher.sendTo(new SyncCurrentMimicBlockState((EntityPlayer) this.player), ((EntityPlayerMP) this.player)); } sendToAll should also send to server nevermind
-
show the PacketDispatcher. I feel like theres sth wrong. You should be creating ur own SimpleNetworkWrapper
-
are u registrating the generator? also there is really no need to create a new worldgenminable all the time.. create it in the constructor and just call generate instead of (new WorldGenMinable(dgr2Blocks.dark_ore.getDefaultState(), 2)).generate(world, rand, quisquePos);