GotoLink
Members-
Posts
2012 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GotoLink
-
You can also change the metadata, and use different icons according to metadata. world.markBlockForUpdate(x,y,z); would still be needed.
-
Of course, my fixes only stop repeats from the input key, not from the event. The event will continue fire endlessly while there is living entities to render (that is, until world is closed). For now, we have it so cancelPre boolean is only changed once each time you press the key. We should add so only players have their name tags removed, right ? So let's do only if(event.entity instanceof EntityPlayer) { event.setCanceled(true); } Oh by the way, stop using ModLoader.
-
In your keybinding, you set this field. private EnumSet tickTypes = EnumSet.of(TickType.CLIENT); You should use it here: @Override public EnumSet<TickType> ticks() { return null; } instead of null.
-
In your packet handler, the only method I see changing the tileentity is: mod.runTest(); this should at least get the prosition as an argument..don't you think ?
-
I don't see anything calling blockBreak or setBlockToAir... The issue isn't here, though if commenting out this method solve the issue... what do you need those data [group,partners,speed,ticksTillCheck] for ?
-
[SOLVED][1.6.2] Draw GuiTextField on GuiContainer
GotoLink replied to Graphicscore's topic in Modder Support
What hydroflame said. And this.markName.setMaxStringLength(40); this.markName.setMaxStringLength(30); meh. -
Maybe you can use ItemBlockWithMetadata ? This is the first coding thread I have ever seen that doesn't contain any code after 15 messages. Anyway, maybe the OP would like to ask his question again, with more details ? Because the more I read, the less I understand what the issue and the way planned are.
-
*main class* boolean[] repeat = {true}; Set to false to stop the repeating keybind. @Override public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { if(tickEnd)//so it doesn't fire twice cancelPre = (!cancelPre); }
-
Extending the EntityFishHook is good. Copying its private values inside your class is bad. <= when you do this, the new private values are just new, they won't affect the values in the parent class. At best it doesn't work, at worst it is confusing you and your class. Remove every private values you copied from the parent class. If you need to change those values, you'll have to find a work-around. (using the Entity NBT at best, using reflection at worst)
-
At line 109 of AccessTransformer: com.google.common.io.Resources.getResource("fml_at.cfg"); The failing try block in CoreModManager: try { IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance(); Map<String,Object> callData = new HashMap<String, Object>(); callData.put("mcLocation", mcDir); callData.put("classLoader", classLoader); callData.put("coremodLocation", pluginLocations.get(plugin)); callData.put("deobfuscationFileName", FMLInjectionData.debfuscationDataName()); call.injectData(callData); call.call(); } I don't know if that would help. The coremod issue might be due to the fact that coremods folder has been merged with the mods folder in newer versions of Forge. Maybe you want to report this in the Support & Bug Report section.
-
In tile entity: @Override public boolean isUseableByPlayer(EntityPlayer entityplayer) { // TODO Auto-generated method stub return false; } In container: @Override public boolean canInteractWith(EntityPlayer entityplayer) { // TODO Auto-generated method stub return false; } I don't think you want those to be always false.
-
Why aren't you extending ItemFishingRod ? Why are you extending EntityFishHook AND copying its content ?
-
Then make a TileEntity, and set NBT data with your ItemStack when you need to give your block.
-
Well, this is going to be long. Let's start from the beginning, shall we ? For the server to know what the client is doing, (and vice-versa) information needs to be sent. You need to remember that client part is distinct from server part, because they can be, like, 1000 kilometres apart. On your case, you have a client input (a click). You need to send this info to the server. But rough info can't travel through the internet (which is the commonly used communicating system), as it would be slow and insecure. You send packets containing the info. How it is done: You (as client here) write info into a DataOutputStream in a sequence (of Byte arrays), then put it into a new Packet. You send the packet. (from your client, to the server, in your case) *packet travels safely through the internet* You receive the packet in your (server here) packet handler class. (IPacketHandler is our common backbone for receiving packets, so you get a call by onPacketData) You (as server here) read info with a DataInputStream, in same sequence as it was written. You (as server here) do the changes the data tells. Do you understand till here ? [You don't really need to understand what DataOutputStream and DataInputStream are doing to the packet, though you need to use them]
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
GotoLink replied to Graphicscore's topic in Modder Support
Can we see the code where you return the container, and the one which returns the gui ? -
Use a different ID, and start counting the metadata from 0 again.*herpderp
-
Issues with texturing the ItemBlock for my meta Tile Entity
GotoLink replied to Flenix's topic in Modder Support
I don't need to touch the meta because the issue isn't here. If it was, the world blocks wouldn't render any different. Though I just noticed you are talking about an ItemBlock in your title. pelep already asked, but you didn't answer. If you have a custom ItemBlock, you should show it now. Or basically, is it an ItemBlockWithMetadata ? -
[SOLVED][1.6.2] Custom GUI with textfield and Button
GotoLink replied to Graphicscore's topic in Modder Support
If you don't want a Container, return null instead of your Gui in getServerGuiElement. (untested, might still crash) -
If the crash is the same, you didn't fix anything, obviously. ProHint: "file" (all lower case) is a variable you can set as a field in your class, to initialize yourself (need some knowledge of File class) NoobHint: PreInit event can provide an already set config file
-
The tutorial is fairly complete. You can still ask questions on specific part you don't understand.
-
That should be mcp/src/minecraft/assets/mobdrops/textures/armor, but close enough
-
I hope by "copied" you meant "extended", because if not, you should learn some Java. Seriously. Since you don't show any worthwhile code, let's assume you registered block and tileentity ?
-
From the Gui, send a packet to server when mouseClicked() is called, with enough data to change the tileentity state on the server side. I would recommend using this.mc.getNetHandler().addToSendQueue(packet); With packet being constructed with your "prosition" data. Then in a class implementing IPacketHandler, read the data and change the tileentity state. You'll need to register channel and packet handling class in your @NetworkMod annotation.
-
You didn't register your event. MinecraftForge.EVENT_BUS.register(new eventClazz()); With your event class having an @ForgeSubscribe(receiveCanceled=true) above the method.
-
Issues with texturing the ItemBlock for my meta Tile Entity
GotoLink replied to Flenix's topic in Modder Support
Sorry, forgot to add: @Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) { return false; }