Jump to content

brandon3055

Forge Modder
  • Posts

    444
  • Joined

  • Last visited

Everything posted by brandon3055

  1. I just started playing with a custom teleport class but so far i haven't been able to get it to work properly (when teleporting to the overworld the world dosnt load until you relog) I will check out yours and see what im doing wrong thanks! Edit: What are "Dimension_Multiplyer" & "World_Properties"?
  2. Dose anyone know how to send a player to another dimension (any dimension) without the problem with nether portals spawning? My goal is to come up with a method that works almost exactly like the mystcraft txp command. So I would give it the player the dimension id and the x y z coordinates I want the player sent to. I have looked at the travelToDimension method but I cant figure out exactly how it works any ideas? It would be really nice if we could come up with something that works because I have seen a few posts about this but no one that i have seen has been able to come up with a good solution.
  3. unfortunately no i am very new no modding. I just know that if you delete a dimension the game will re generate it Edit: maby look into how the world is deleted if you die in hardcore mode.
  4. No problem. You dont need multiple computers to test multiplayer!!! simply start both the client and the server i your eclipse workspace (at the same time) and connect to the server using ":25565" (the server port) Im not sure if you were actually planning to run 1 instance in server mode or two clients (with one open to lan) but just in case you dont know how to run your project in multiplayer mode you need to do the following. 1. create a new run configuration called "server" (or whatever you want) 2. set the main class to cpw.mods.fml.relauncher.ServerLaunchWrapper 3. leave Program arguments blank and in VM arguments add -Xincgc -Xmx1024M -Xms1024M and thats it hit run and and the server should start and you should get the server gui instead of the regular minecraft window. Edit: Just tested lan multiplayer works just fine probably because the server also has a client so its essentially the same as singleplayer just with an extra client.
  5. Is there any way to delete the specific world folder so that it will re generate the next time the world is loaded?
  6. You can improve it a bit by doing the following @SubscribeEvent public void entferneTodesNachricht(ClientChatReceivedEvent event) { String player = event.message.getUnformattedText().substring(0, event.message.getUnformattedText().indexOf(" ") + 1); if(event.message.getUnformattedText().contains(player + " fell out of the world")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + " was slain by")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "was pricked to death")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "drowned")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "blew up")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "was blown up")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "was doomed to fall")) { event.setCanceled(true); } if(event.message.getUnformattedText().contains(player + "was shot")) { event.setCanceled(true); } //Etc }
  7. will that also remove regular chat messages that contain those key words? Edit: Yes it dose
  8. Yup that was the problem. I probably should have been able to figure that out without making a post but i didn't really look into the problem to much because the problem didn't exist until i updated forge so i assumed it must be a forge bug. Oh well thanks for the help.
  9. yea i will look into that later the packet handling is my biggest concern right now
  10. Hmm i will have to add it to the list of things to figure out. My current setup is based on a couple o tutorials and it hasnt been a problem untill now
  11. ^That last one was a trick question I just updated from forge build 1061 to 1071 and now when i launch the game i get the following warning for most of my blocks and items. [12:00:05] [Client thread/WARN] [FML]: **************************************** [12:00:05] [Client thread/WARN] [FML]: * Illegal extra prefix tolkienaddon for name tolkienaddon:sunFocus, invalid registry invocation/invalid name? [12:00:05] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:733) [12:00:05] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:139) [12:00:05] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:127) [12:00:05] [Client thread/WARN] [FML]: * at tolkienaddon.items.ModItems.register(ModItems.java:86) [12:00:05] [Client thread/WARN] [FML]: * at tolkienaddon.items.SunFocus.<init>(SunFocus.java:10) [12:00:05] [Client thread/WARN] [FML]: * at tolkienaddon.items.ModItems.init(ModItems.java:61)... [12:00:05] [Client thread/WARN] [FML]: **************************************** This is the item that the above warning is referring to: My Mod Item class: My mod Items class My Common proxy (where Mod Items is initialized) and my main mod class: It seems the only items that dont get this error are my tools e.g.
  12. Ok so i essentially deleted and re-downloaded EVERYTHING event deleted the .gradle/caches/minecraft folder so it would re download all the minecraft files and Updated to forge 1070. Unfortunately it didnt fix anything although now when i load the game i get the following error for all my blocks and items... [10:33:47] [server thread/WARN] [FML]: **************************************** [10:33:47] [server thread/WARN] [FML]: * Illegal extra prefix tolkienaddon for name tolkienaddon:testBlock, invalid registry invocation/invalid name? [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:733) [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:211) [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:167) [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:156) [10:33:47] [server thread/WARN] [FML]: * at tolkienaddon.blocks.ModBlocks.register(ModBlocks.java:27) [10:33:47] [server thread/WARN] [FML]: * at tolkienaddon.blocks.TestBlock.<init>(TestBlock.java:23)... [10:33:47] [server thread/WARN] [FML]: **************************************** [10:33:47] [server thread/WARN] [FML]: **************************************** [10:33:47] [server thread/WARN] [FML]: * Illegal extra prefix tolkienaddon for name tolkienaddon:sunFocus, invalid registry invocation/invalid name? [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:733) [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:139) [10:33:47] [server thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:127) [10:33:47] [server thread/WARN] [FML]: * at tolkienaddon.items.ModItems.register(ModItems.java:86) [10:33:47] [server thread/WARN] [FML]: * at tolkienaddon.items.SunFocus.<init>(SunFocus.java:10) [10:33:47] [server thread/WARN] [FML]: * at tolkienaddon.items.ModItems.init(ModItems.java:61)... [10:33:47] [server thread/WARN] [FML]: **************************************** But everything still works so i have no idea what thats all about or how to fix it... I think for now i will just wait to see if you have the same problem. Edit: The error seems to be forge related i downgraded back to 1061 and it fixed it. I think it may be a bug because i cant see anything about it in the change log unless im looking in the wrong place? (changelog on the forge downloads page)
  13. 1. It I put a debug println in the catch but it wasnt called 2. I tried sending it to the player that clicked the block but it made no difference. 3. As long as we can eventually figure this out I dont mind the trouble at all I have found that in some cases you learn a lot more about how something works when it dosnt work Can you give me an estimate as to when you will be able to help more? (when do you finish work?) Edit: you beat me to the post lol Edit2: I tried both in eclipse and i compiled it and tried outside eclipse Edit3: I will try a couple of things and get back to you.
  14. Common proxy: Client proxy: Server packet handler: Client packet handler: Packet: Test block: Dose it work for you in multiplayer?
  15. you need to use worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); to call them so when you want the server to send a sync packet to the client put worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
  16. I see the problem. When you are writing the steam value you write it as "Steam" but when you try to read it you use "steam" see the problem? these strings are case sensitive. Edit: ondata and getDescription should get called both when the world loads or when you use worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
  17. Oh and i think you need to put the super calls at the end of your read and write methods
  18. Try this @Override public Packet getDescriptionPacket() { NBTTagCompound tagCompound = new NBTTagCompound(); this.writeToNBT(tagCompound); return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tagCompound); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); }
  19. After learning how to run two separate consoles in eclipse and a lot more debugging i think i am getting closer to figuring out the problem. First off there was a problem with the server packet handler that was preventing the packets from being read I had to change if (channelName == Tolkienaddon.networkChannelName) to if (channelName.equals(Tolkienaddon.networkChannelName)) The client packet handler was the same but for some reason it wasnt causing any problems (packets where getting through) And that's where the problem is. When the server tries to ether read or send a packet it crashes. Logs: Sending from client to server: #####Client##### [DEBUG]TestBlock: Send packet from Client [DEBUG]PacketTolkienaddon: createTestPacket #####Server##### [DEBUG]ServerPacketHandler: onServerPacket channel = tolkienaddon Looking for: tolkienaddon [DEBUG]ServerPacketHandler: Channel Name is correct [03:37:38] [server thread/ERROR] [FML]: NetworkEventFiringHandler exception rest of crash log: It crashed at PacketTolkienaddon.processPacketOnServerSide(event, event.packet.payload(), event.packet.getTarget()); Sending from server to client: #####Server##### [DEBUG]TestBlock: Send packet from Server [03:48:14] [server thread/ERROR]: Encountered an unexpected exception rest of the crash log: it crashes at Tolkienaddon.channel.sendToAll(PacketTolkienaddon.createTestPacket((byte)42)); I cant figure out whats going on any ideas?
  20. If you just want more damage then you can definitely just extend the vanilla arrow entity in fact if you wernt doing custom rendering you wouldn't have to make your own arrow at all (you can modify the damage coursed by a vanilla arrow when you spawn it) Just dont forget to remove the fields: public int canBePickedUp; public int arrowShake; and public Entity shootingEntity; Or you will get the common "Arrow hits shooter" problem It is also a good idea to replace super.onUpdate() in the onUpdate method with super.onEntityUpdate(); otherwise both the onUpdate from the vanilla arrow and you custom onUpdate method will run and you probably dont want this.
  21. Remove public int canBePickedUp; public int arrowShake; public int ability; public Entity shootingEntity; and that should fix it Oh and change super.onUpdate() in the onUpdate method to super.onEntityUpdate();
  22. I can tell you how i have mine set up maby it will help. Use a separate class for your tab mine looks like this: (change TolkienTab to whatever you want your tab class to be called) And in your main class put: private static CreativeTabs tolkienTab = new TolkienTab(CreativeTabs.getNextID(), References.MODID); Then to add something to the tab use: this.setCreativeTab(Tolkienaddon.getCreativeTab()); note: Tolkienaddon is the name of my main class
  23. I just run into one more problem... I just tested it in multiplayer and... It dosnt work I havent done any debugging yet but any idea why it isnt working in multiplayer? Edit: More specifically packets sent from the client to the server don't seem to get through and sending packets from the server to the client crashes the server. "ava.lang.NoClassDefFoundError:" @ Tolkienaddon.channel.sendToAll(PacketTolkienaddon.createTestPacket((byte)42)); Full crash log
  24. Yeah, perfect. Brandon, events usually pass world and player to you. Always good to check the fields and methods of the event to use them well. I have been trying to figure it out GotoLink told me how to get the player from the event but how can i get the world? it may come in handy. Edit: I think i figured it out you have to get the player from the event then get the world from the player World world = ((NetHandlerPlayServer) event.handler).playerEntity.worldObj;
×
×
  • Create New...

Important Information

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