Jump to content

rich1051414

Forge Modder
  • Posts

    160
  • Joined

  • Last visited

Everything posted by rich1051414

  1. Bad time for this, the Mojang crew is currently reworking it's nbt tag system(it's own data mapping system).
  2. I am not going to hold your hand, look up how maps work, and learn how java works in general, and then maybe I will help.
  3. Well, I can tell you how I hide items from NEI. Make a package in your client side package called: codechicken.nei.api Make a new class called: API Paste this in: package codechicken.nei.api; public class API { public static void hideItem(int id) { } } Then in both your proxy's, add this: public void doNEICheck(int id) {} Then in your Client proxy, add this to the body of that method(DO NOT IMPORT codechicken.nei.api!!!): if (Minecraft.getMinecraft().thePlayer != null ) { Iterator modsIT = Loader.instance().getModList().iterator(); ModContainer modc; while (modsIT.hasNext()) { modc = (ModContainer) modsIT.next(); if ("Not Enough Items".equals(modc.getName().trim())) { codechicken.nei.api.API.hideItem(id); return; } } } When you release, DO NOT INCLUDE the codechicken.nei.api package. Players with NEI will already have it, and IT will do the hiding for you. Players who don't have nei will never reach the statement to error out. Edit: Oh almost forgot, see how i check if the player exists? I do this because I remove the items after the player loads a world, this ensures your items are removed after nei adds them, and that idresolver hasn't changed any of your ID's in between.
  4. The code I posted is everything you need to know. If you need more info, your issue stems deeper than this...
  5. If you return true to cancel a block's activation, it also prevents onItemUseFirst from running on the server entirely, you can reproduce this like this. Make a generic item and override onItemUseFirst, do a System.out.println(FMLCommonHandler.instance().getEffectiveSide()) then return true. It will only say client. Do it again only returning false and it will return client and server, but then the blocks menu will activate. Surely this is not intended, The server SHOULD cancel the activating block, but it shouldn't cancel the items onItemUseFirst as well(or maybe the client is prevented from sending the packet)... I understand that System.out.println() could be reporting wrong, BUT I have other methods called from it, and those also do not run server side. When I call functions before returning true that should run both sides, it seems those are also only working client side, like playing sounds. When I call the exact same function from OnItemUse, the sounds work, but from OnItemUseFirst, they do not. Edit: OH i see the problem, the function is triggered by theItemInWorldManager.activateBlockOrUseItem, and returning true prevents the server from going into any item use calls... God knows why OnItemUseFirst isn't simply ran on both server and client, and it can see for itself whether or not to activate the block... It's not a problem to force it to client side unless it is returning false from the method itself I solved it by just sending a packet and doing the server stuff from my packet handler.
  6. ugh, talk about a backasswards approach, but a lot would have to be changes to do it efficiently. Ore counters/timers seem to work with only rare special cases causing false positive results.
  7. try adding a call to: scheduleBlockUpdateOnLoad or something like that, under world. It is my understanding that will schedule an update when the chunk loads(might also need to be rescheduled)
  8. Ohhh, thanks again! What do you think would be a good number for the tick rate for this sort of thing? I've not really messed with ticks on MC yet, not sure on how they work. 20 world ticks per second, a setting of 4 would tick 5 times a second. It depends on how responsive you want the effect to be.
  9. You have to reschedule it after doing your action, sorry I forgot to meantion that.
  10. like this: public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate); } this gets called when it ticks: public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); //Do your stuff here }
  11. I'm getting the visual but not the damage. I haven't set anything telling it to be client only, though. Your hook is random display tick, this is client only. You need to schedule a block update.
  12. I tested entity.setfire and it works fine, Are you sure the entity is getting set on fire server side and client side(client side is visual only, server side is damage only)
  13. Looks pretty interesting. I am the creator of the PaintGun Mod as well as the Damage Indicators Mod and I would help if you need it. I don't mind to use skype, but I do not own a mic, as it is normally not required. I have experience is almost everything, but modeling and texturing is not my thing, I find it tedious and uninteresting. So I guess advanced coder. Minecraft is not the first game I have made mods for, I first started modding after taking programming in high school, with the original unreal tournament(mutators). I have been to school for computer science, so experience is a non-issue. I use netbeans or eclipse, and I always keep both sharing the same repository, so IDE is also a non-issue. I always use forge for modding, so of course I have an understanding of forge, and a deep dislike for modloader to boot . I am 28 years old. I believe that about covers it. Let me know if you need a hand
  14. Why use a db? For minecraft servers that is more than you need, you just need packet handling and a local map. I recommended using minecraft's built in compressor for saving and loading. maps can be saved directly to the disk and reloaded: http://www.minecraftforge.net/forum/index.php/topic,3211.msg21401.html#msg21401 That is the easiest option because after the save and load, you just use the map normally. Forge offers an event on the event bus so you can save when the world saves.
  15. https://github.com/MinecraftForge/MinecraftForge/issues/248 I already made a fix for this, just waiting on some kind of response on the matter. A few others responded with other, more wide spread fixes.
  16. I would like to know too, I also had to allow all light to pass through the block so the block is shaded correctly without the 'ghost shading'. I know minecraft stairs and slabs used to allow all light through, so obviously a workaround in in there somewhere, but I haven't been bothered enough by it yet to track it down.
  17. Updated libraries download at runtime, which is a great feature, but if you want to go offline, upload your .minecraft directory onto a flash drive. This is 2012, so that is a quite rare request now a days. You should be able to do that, how are you getting forge to your offline computer in the first place? Once it see's it has it's required libraries, it will run fine even without a net connection.
  18. This is a cool idea. I have a mod that is in stable smp condition(only minor visual bugs currently known) but have not been tested in a large scale environment yet. One thing that is hard to test is server performance and any changes that need to take place, because rarely do things behave as well as they do on paper, or while dual-boxing your own server. My minecraft name is the same as here, rich1051414, and my mod is paint mod. Much thought as went into balance but again, this has not actually been tested by me in a real smp environment. Also I am sure there is some rare situations that may cause visual bugs I may not recreate in my usual testing. Because of this, I have resorted to many micro-updates to iron out bugs as they appear, but something like that could make my releases more substantial and stable at the same time.
  19. It is possible, but you would have to do your particle rendering manually. Do your particle rendering on fxlayer 2, and do a draw->startdrawingquads before and after changing the texture and remember to put everything back to defaults.
  20. Add the mod to the mod's directory of where your IDE put's it's compiled versions. You don't need to have the other mod's sources, they do not change minecraft+forge directly. If you are working on compatibility, ask that modder for an api.
  21. In BlockPane, this: public final boolean canThisPaneConnectToThisBlockID(int par1) { return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Block.glass.blockID; } needs to be changed to this: public boolean canThisPaneConnectToThisBlockID(int par1) { return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Block.glass.blockID; } It feels sloppy being force to do this in the constructor to allow blocks extending blockpane to connect with thin glass or iron fences: Block.opaqueCubeLookup[myblockid] = true; Block.opaqueCubeLookup[block.fenceIron.blockID] = true; Block.opaqueCubeLookup[block.thinGlass.blockID] = true; btw, this setting is separate from what returns from isOpaqueBlock or isNormalBlock, so changing it does not effect rendering from what I have seen, it seems opaqueCubeLookup is a behavioral mapping, so this work around doesn't cause too many issues, but obviously is could if something is truely expecting an opaque block by looking in there.
  22. You need packet handling, but tile entities are easy, here is an example out of one of my mods: @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); this.writeToNBT(tag); Packet p = new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, tag); p.isChunkDataPacket = true; return p; } @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { NBTTagCompound tag = pkt.customParam1; this.Color = tag.getInteger("Color"); this.OrigBlockID = tag.getInteger("OrigBlockID"); this.OrigMeta = tag.getInteger("OrigMeta"); this.blocktype = tag.getInteger("BlockType"); this.incomplete = tag.getBoolean("incomplete"); } I pass an incomplete boolean so the tile entity can realize when it needs to be updated, and then call a world.markBlockAsNeedsUpdate when it changes.
  23. No, i said to call new ModelRenderer, not new RenderFlameshot EntityFlameshot must extend EntitySnowBall to use EntitySnowBall functions.
×
×
  • Create New...

Important Information

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