Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

Cyan's Achievements

Stone Miner

Stone Miner (3/8)



  1. Hi, I am attempting to update my dimension from 1.8.9, and have a few questions/concerns on something I am doing wrong involving the BiomeProvider, or perhaps maybe even the WorldProvider itself. I have a multibiome dimension with all custom biomes, and yet everytime I try to set the BiomeProvider for it, I seemingly end up with a world that is only made up of Plains and Ocean biomes. My working understanding of how world generation works has led me to believe that the world is defaulting to these biomes because it cannot get the list of new biomes, whiiiich is where I run into trouble. Also for reference, I have tried plugging in the BiomeProviderSingle class with all of my custom biomes, and it works flawlessly, save for of course only being the single biome, so I know my problem lies somewhere within the realm of my new biomeprovider. My guess is that I am missing something pretty obvious, or there has been some kind of major change to the world generation code other than the WorldChunkManager becoming the BiomeProvider that I have completely overlooked. Below is the relevant code from each of the files. I didn't figure the rest of it needed to be included as it is either vanilla, or does not pertain to the generation of the dimension itself. WorldProviderCustom BiomeProviderCustom ChunkProviderCustom At this point in time, is just more or less a straight copy from vanilla and shouldn't be causing any issues, but I can provide it should I have missed something that's changed here that might be causing my problem. Disclaimer: It's entirely likely that I have missed something pretty obvious, as my programming skills are certainly not the best, but this is the first issue I have actually had with dimensions since first making one around 1.6 or so, so if I have missed something obvious please try not to beat me over the head too much Thank you in advanced for any insight you all may have in this matter!
  2. Hello all, I know that there were a few topics back for 1.7.2 that covered there being an error with using custom creature types, and I was just wondering if this was fixed for 1.7.10, because I keep getting a null point exception when trying to start up the game with a custom creature type. For reference, I'm declaring it as public static final EnumCreatureType testSub = EnumHelper.addCreatureType("TestSubject", EntityTestSubject.class, 10, Material.air, true, true); And then of course sticking it into correct parameter for EntityRegistry.addSpawn Not sure if there are still some errors with the code, or if I have done something wrong. Is there a certain place I should be declaring the creature type at? I've just been doing it in my main file. Thanks for any help you may be able to provide!
  3. I feel like such an idiot. Didn't even occur to me to cast it to entity. Such an obvious thing. Yep. That solved the problem. All hail CoolAlias(and the others who have been patient enough to help me) Thank you all
  4. Alright, so let's see if I got any closer. I added an integer to be sent in the message, and have sent the id along with the new nickname: testmod.ModBase.testmod.snw.sendToServer(new NicknameMessage(testScreen.getNickname(), testScreen.getEntityId())); And then my packet is now looking as follows: public class NicknameMessage implements IMessage { private String text; private int entityid; public NicknameMessage() { } public NicknameMessage(String text, int entityid) { this.text = text; this.entityid = entityid; } @Override public void fromBytes(ByteBuf buf) { text = ByteBufUtils.readUTF8String(buf); entityid = buf.readInt(); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeUTF8String(buf, text); buf.writeInt(entityid); } public static class Handler implements IMessageHandler<NicknameMessage, IMessage> { @Override public IMessage onMessage(NicknameMessage message, MessageContext ctx) { ctx.getServerHandler().playerEntity.worldObj.getEntityByID(message.entityid); // setNickname(message.text); // Still not entirely sure how to reference the entityfile here without a static variable return null; } } } This may not even be close to what was meant by sending the entityID/using the world to get the ID, but its kinda how it came together in my head. STILL not sure how I am going to make a reference to the setNickname function though. I'm sure that I am just overlooking a simple way to do it.
  5. I was under the impression that I would need to use the setNickname() method from my entity file in the message. But if I understand correctly, you are saying that I only need to make sure that the recieved message is going to the entity?(via the entity's ID) In hindsight, I feel like that's what diesieben07 was trying to tell me from the beginning in a lot less words.
  6. Yep so I totally was misunderstanding what you posted about the onMessage, but I went back to the tutorial and saw where I was being stupid(several hours later). I need to call the nickname during onMessage, and I feel like a total idiot for reading over the part about it being receiving the packet but anyway, So I guess my question would be how to best make a call to the entity file without getting into a bunch of trouble with static variables? ALSO should mention this is for 1.7.2, in case anything new was added for these type of situations in 1.7.10
  7. I figured the handler probably had nothing to do with it, but I guess I just thought I would double check I had my understandings of it right Well I mean, setNickname() is setting the new text into the entity already, or am I just misunderstanding what you meant?
  8. Hey, So I'll just go ahead and admit that I am not the best when it comes to sending things from one side to the other, but at the moment I am attempting to create a GUI with a renaming feature, that is, you type the name into the gui, and the name(which is attached to a datawatcher), will update to the new name. Whiiich is where the problem naturally is. So in the GUI, I have the packet being sent to the server when the key is typed: Which triggers fine, other than the fact that it does not send the updated name to the server. GRANTED I may need to do something else in NicknameMessage#OnMessage, but if that is not the case, I don't have the slightest clue where I have went wrong. NicknameMessage, which is more or less the basic string message from the tutorials. public class NicknameMessage implements IMessage { private String name; public NicknameMessage() { } public NicknameMessage(String name) { this.text = name; } @Override public void fromBytes(ByteBuf buf) { name = ByteBufUtils.readUTF8String(buf); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeUTF8String(buf, name); } public static class Handler implements IMessageHandler<NicknameMessage, IMessage> { @Override public IMessage onMessage(NicknameMessage message, MessageContext ctx) { System.out.println(String.format("Received %s from %s", message.name, ctx.getServerHandler().playerEntity.getDisplayName())); return null; } } } Again, sorry if this is something simple, but packets is pretty much a new territory for me. Thanks for any help you can provide, Cyan
  9. Hey there, just a quick question for setting up a non-containered GUI. I have a GUI that simply displays text, nothing fancy there. I suppose I'm running into a problem with figuring out what the server element should be. Normally that would be where the container goes, right? Right. In the case of not needing a container, I thought I would just return it as null. However, that does absolutely nothing(or I have made an error elsewhere) SO back to the main point, what is the proper way for setting this up? Should I be creating an empty container? If I should be returning null, I will be glad to post up all the code to see where else I may have made an error. Thanks for any info you may be able to provide.
  10. Edit: Thats okay..I managed to figure out what I did wrong without a sarcastic remark.
  11. So I'm having a similar problem to this, except that when I click on the multiplayer option, the test server doesn't show up at all. Its essentially stuck at "Scanning for games on your local network...", and never budges. The server launches perfectly however. Not sure what I have done to not make the client acknowledge it though.
  12. Turned out to be a rather stupid error with a misplaced bracket. Woops. Make that the second freshmen error made in this topic. Thanks anyways!
  13. YES IT DOES!!!! I found it! You know what the problem was? I accidentally erased @EventHandler. You're the bomb! Thanks for being so patient! Hi. I was following along with this to see if any major revelations were made in the getting biomes to work in 1.7. Was just wanting to ask you if you are declaring your new biomes any differently from 1.6? Or something different in the biome files themselves? I have successfully managed to add in a new biome, but the name that pops up is "null" rather than the custom biome name I have set, and it is rather laggy. The only thing I figure is that I have missed something that wasn't mentioned in-topic, and I thought I would ask. Thanks.
  14. Sorry sorry. I meant to say language file, instead of registry. Slight typo. But I will definitely try the StatCollector, thanks. EDIT: Works like a charm, many thanks.
  15. Not necessarily what I am looking for. I have a rather large amount of custom entities, and there is nothing there that really satisfies what I am trying to do. I would still need to go through and set each entities name individually in their respective files. Which: A) Is irrelevant. I am trying to figure out if there is a way I can use EntityList to return the names without it returning as "modid.mobname", as EntityList seems like the best way to set names for over 240 entities without individually going through each file. B) Use the language registry, so it will reflect the language(I.E. Using a spanish lanuage file rendering "Pollo" over a chicken, rather than "Chicken"
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.