Everything posted by Failender
-
[1.8] Tree gen for vanilla biomes
no idea to be honest, i started with 1.8 . try it out i guess..
-
[SOLVED]Item Effect don't work as I want.
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
-
[1.8] Tree gen for vanilla biomes
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
-
[SOLVED]Item Effect don't work as I want.
also you dont need to compare the items, the boolean should tell u if the item is equipped or not
-
[SOLVED]Item Effect don't work as I want.
dont use ids to compare, use the instance of the item u create to register the item. so use equippedItem==myItem
-
Event.block
for gods sake learn java. NEW BlockPos
-
Event.block
use new BlockPos(x,y,z). blockpos is the new wrapper class for posuitiohns
-
Event.block
should be event.state.getBlock()
-
Event.block
how about you tell us which version you are in? if its 1.8 , 1.8 ios working wit hblocksates
-
[1.7.10]Saving an int with NBT [Solved]
if you know what static means then you know where ur issues come from.
-
[1.8] Tree gen for vanilla biomes
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
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
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.....?
-
SimpleNetworkWrapper.registerMessage has arguments that are not applicable.
Sorry that I answered on your first problem.
-
SimpleNetworkWrapper.registerMessage has arguments that are not applicable.
for your handler implement IMessageHandler and your message needs to implement IMessage. that will fix the problem with not applicable args
-
SimpleNetworkWrapper.registerMessage has arguments that are not applicable.
never ever copy paste cody. it wont help you
-
[1.8] Missunderstanding setHarvestLevel
the thread is month old why are u responsing here?^^ i had it in preinit
-
[1.8] The handle is invalid
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 )
-
[1.8] The handle is invalid
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?
-
[1.8] The handle is invalid
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
-
BiomeRegistry
hint of the day: learn java x)
-
Getting EntityPlayer KeyInputEvent
it might be better to create ur SNW by using the constructor SimpleNetworkWrapper(String channelname) but i am not sure with that
-
Getting EntityPlayer KeyInputEvent
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
-
Getting EntityPlayer KeyInputEvent
show the PacketDispatcher. I feel like theres sth wrong. You should be creating ur own SimpleNetworkWrapper
-
(1.8)Ore not spawing.
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);
IPS spam blocked by CleanTalk.