Jump to content

MoxEmerald

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by MoxEmerald

  1. I'm inclined to believe that generation begins with public void func_151539_a(IChunkProvider p_151539_1_, World p_151539_2_, int p_151539_3_, int p_151539_4_, Block[] p_151539_5_) but clearly that method is intended for use while the world is first generating. I imagine that you could copy the chunks you want to spawn the village in into block arrays and then try generating using that method. I also suppose that you could world.setBlock any blocks that are changed in the block arrays. I don't really know what you would pass into IChunkProvider though. Perhaps a class that copies the chunks into block arrays? It might be easier just to write your own code to generate a village though. No matter how you do it, generating a village outside of the world generation code strikes me as an ambitious proposition. If you were to write your own code I would recommend starting by creating items that spawn each individual structure. Then in your final item you could try to mimic the code used to decide where to place roads and structures inside a village.
  2. ...obliterate? It shouldn't change anything about the world. I guess it's not very important though.
  3. Somehow the method that exists in your eclipse environment does not exist in the server. It is a pretty straightforward error message after all. The code you posted at the beginning is far from compatible with forge for Minecraft 1.7.2. If you have that exact same code in an eclipse environment using forge for Minecraft 1.7.2 then reality is starting to break apart in your immediate vicinity. I would recommend learning hypothetical physics in a hurry. Or you could correct me and give a code example accompanied by the version of forge it uses. The easiest answer (for me at any rate) is that you made a mistake somewhere with your versions. But I would be willing to try to reproduce the error. And like Kriki98, I do prefer 1.7.2.
  4. Try: ChunkCoordinates spawn = par3EntityPlayer.getBedLocation(player.dimension); spawn = EntityPlayer.verifyRespawnCoordinates(par2World, spawn, true); par3EntityPlayer.setPosition(spawn.posX, spawn.posY, spawn.posZ); Although it doesn't seem to check whether the bed is still there.
  5. Just going out on a limb here, but maybe there really is no such method? In 1.7.2 there is a void addChatMessage(IChatComponent var1); method, but you are trying to use a method: void addChatMessage(String var1);
  6. Thanks for the clarification. BUT: That textures not working thing isn't reproducible for me. Oh well, still good to know.
  7. And I would like to remind you that a dedicated server has a completely separate jar file. Those @SideOnly annotations are what Mojang uses to differentiate what should be compiled where. And although you never stated item-stacks synced nbtdata you did say the reason I didn't have a problem was because it was an itemstack instead of a tile-entity. Furthermore, if single-player is just multi-player with one user why wouldn't my mod still work with multiple users? I already said the server and client stay in sync just fine, but I'll have to test it sometime. @TheMoleTractor and don't forget the tile-entity already has a built in reference to the coordinates, world, and the block. Metadata too.
  8. @TheMoleTractor Try updating in the tile-entity class. It makes more sense anyways(the value is stored there after all). And if it were that clear cut the client would be required to ask the server side for the nbttag. As we can see though it doesn't do that. If we want that hierarchy we have to build it ourselves. It is not the default for the tile-entity nbttags to sync the way you seem to think Itemstack nbttags automatically sync. Large parts of the game exist on both sides. The client side is more hybrid than you would think, after all minecraft used to run without a server side. What you're describing is an actual client-server relationship, Which would be true enough if we were talking about an actual server- but we're talking about the server side of the client application. As such we are allowed much more flexibility than all that. After all, it all runs on the same processor. There are even scenarios out there where the "clients" do the processing and the "server" distributes the data and handles user input/output. A sort of Cloud Computing scenario could follow those rules.
  9. The purists still don't like that. But that's why I call them purists.
  10. The fog is starting to lift, however I feel that the renderer is secondary to the tile-entity. If his tile-entity exists on both sides and it is falling out of sync then isn't this indicative of a problem that could be fixed a little more simply? Adding a packet will correct the situation at specified intervals, but the client and server ticks happen the same number of times per second. As long as the code has reproducible results the two sides shouldn't be falling out of sync. For something more complicated using a packet would be more efficient. However, we're just incrementing a value. If his code is made reproducible running it twice shouldn't hurt anything. Unless Minecraft code isn't as sturdy as I had thought. It occurs to me that I don't know how his value gets changed. Perhaps he's applying a sort of bonemeal, or maybe it's just a matter of time. I suppose that might make the difference as well. I guess that this is a long winded way of saying that jumping right to a custom packet seems frivolous to me. It should be noted that I have never used packets and as such I've never really had to go through the thought process of deciding I need them. I've always determined that I don't. I apologize for being so meticulous and even spammy, but I hope I'm at least communicating my point of view clearly, if not concisely. @TheMoleTractor you posted while I was typing so... I... don't know. Maybe it's just packet delay (packet does imply a network of sorts). Networks are allowed to... take their time when necessary.
  11. So in my mod I have a tileentity for a ..."custom furnace" that contains an itemstack that contains a custom item that holds a numerical value in it's nbttag. in essence I have an itemstacknbt contained inside of a tilentity nbt. The value gets incremented every 1 second and try as I might I can't find any problems/bugs with it when I save and quit or anything. I am not using packets and I fail to see the difference since I am verifying the value from a description when you hover the itemstack which is on the client side... right? Is verifying the value from the texture used different then from the gui? Or is the gui's value secretly coming from the server side? I simply fail to see why TheMoleTractor would need a packet when I do not.
  12. Since you're now going with packets I'm assuming that the onBlockActivated from the client call gave the wrong number but the onBlockActivated call from the server gave the correct number. If so good call Kwibble. But if this were a packet issue why doesn't it manifest itself before a save and quit?
  13. Try playing with this method: public IIcon getIcon(int side, int meta)
  14. I would change your getBerryAmount method to: public int getBerryAmount() { if (this.worldObj.isRemote) System.out.println("client"); else System.out.println("server"); System.out.println(bAmt); return bAmt; }
  15. It all looks fine... try System.out.println(bAmt) right before the switch statement and System.out.println("rendering " + whatCaseThisIs) in each case of the switch statement. I know it sounds weird but that switch statement has opengl calls and to me they seem the most likely offenders in this scenario. I'll look again and let you know if anything dawns on me.
  16. I've been told that registering your block during construction is technically incorrect. You can get around this by having a method public Block register(){ GameRegistry.register(this, this.getUnlocalizedName()); return this; } and when you create your block: public static final Block myBlock = new MyBlock().register(); because you can guarantee that the Block is created before you call GameRegistry.register(args).
  17. Well, it is a static method. But it's not one of my init methods. It's just a static block. Like this: static{ /* * stuff */ }
  18. That would point us towards your render code. You probably have a higher range for the berry amount than metadata can handle, but if not you could always use metadata instead.
  19. None of my initialization methods are static.... I just register my blocks from a static block....
  20. Sounds like your code is in onItemUse, try moving it to onItemRightClick. For the other issue I'm not as confident in my answer, but try changing your isFull to !isFull or isEmpty since in vanilla code it passes true when the bucket is full... of air that is.
  21. My blocks are registered in the static method of my main class(technically inside the static method of a different class that is initialized by the static method of my main class), but the init method should be equally valid. Can't imagine why it would effect your textures but, if for curiosity's sake, you tried registering them in preInit I would like to know if you get the same problem.
  22. The issue being here: if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11 - Block.lightOpacity[this.blockID]) ^^^^^ If you don't know what that error is then you're not just a modding noob; you're a java noob too. Direct your question to a google search or a java teacher of some kind, not the modder support forums. e.g. [lmgtfy]Java Cannot make a static reference to the non-static method[/lmgtfy] Additionally, you should get out of the habit of using blockIDs, it won't work at all in 1.7.x.
  23. Can you confirm that the tile-entity is created and initialized in the first place?
  24. public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float px, float py, float pz) You can use that method inside your item class to access player.inventory and switch out the empty container item for a full one.
  25. Let's be perfectly clear. You have essentially copy-pasted a series of methods from the furnace class which contain algorithms that make slots with ids 0, 1 and 2 work. Now you need to add additional algorithms which will be almost identical to the originals, except that they will use slots 3, 4 and 5. You already have the code in front of you so the only other things you need are 1) understand the code and 2) step by step logic. Learning how to code is time consuming and we can't do it for you even if we wanted to. As someone who only started with java a year ago I can't recommend that you start learning java through Minecraft.
×
×
  • Create New...

Important Information

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