Jump to content

saxon564

Forge Modder
  • Posts

    490
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by saxon564

  1. Ill give you a hint, some screens make commas and periods hard to tell apart.
  2. This is no where near right, you need to give the package path for your client proxy and server proxy, not your mod name and version. With this code forge is looking for a client proxy class at package location "Cobalt Mod" and a server(common) proxy at package location "1.0" You need to give it the correct locations.
  3. we need to see your code to really help you. it looks like your proxy classes are missing which is crashing the mod. as for formatting codes to set things up in windows like this just [ code ][ /code ] and to set things up in spoilers use [ spoiler ][ /spoiler ] you can nest a code tag inside a spoiler as such [ spoiler ][ code ][ /code ][ /spoiler ] All this without the spaces in the brakets Please share your code so we can see what the exact error is.
  4. I was just saying the biome name, not the name of the class when I said Deep Ocean, but looking at BiomeGenBase, it looks like you will want to override generateBiomeTerrain, this is making it so that is the top block is less than 56 it is set to gravel. overriding this method will allow you to generate your top block the way you want it.
  5. Unfortunately, it does not unpress the key in enough time so it still breaks the block. There doesn't seem to be an ideal way to deal with keyboard inputs. It seems it will unpress any other key except the key to break the block. The more I thought about it, the more I realized that doing that still wont accomplish what I am trying to do. I am trying to make my fire work just like the vanilla fire and you can click on the side of a surrounding block the fire is on to put the fire out. doing it the way you are suggesting means you can only hit the bottom to put out the fire.
  6. That may work, but I think I have to make my own block model for it? Im not sure though.
  7. Ok, I will have to try this later when I get home.
  8. Have you looked at how Deep Ocean generates? It most likely is a mutated Ocean with a custom set of properties, you may have to override those properties to get rid of the stone and gravel.
  9. That still will not fix it, im am testing in creative because thats where this is the biggest problem, the client will assume you still broke the block until the server says the block is still there. So it doesnt matter how I set up the PlayerInteractEvent, the client will always break the block until it hears back from the server saying not to break yhe block. That is why the check has to be done on the client because the client does all the actions, then sends the information to the server.
  10. Ahh ok, I will see what I can figure out using that. But the issue, as I have told CoolAlias, its not that it doesnt work, it does, but the block the fire is on still breaks on the client, then the server tells that client to put the block back, so it isnt as smooth of a process as I'd like it that way.
  11. I figured that out, but it seems to crash saying that the event cannot be canceled. Plus it doesnt do MouseInput so I would have to have both Events anyway. Im thinking once I get one of them completed, then it should be easy to add the other one. So you are saying to use onBlockClicked in my fire class, to update the blockstate? I'm not sure that would work, again because collidable is false, it has no hitbox to interact with, so you would have to be checking for the hit on the block it's next to, which unless it's one of your own blocks the only way to do it would be via an Event. I could be misunderstanding what you are saying, but that is what I am getting from what you are saying. If I'm wrong, post a bit of "sample" code just to give me an idea of what you are talking about, and when I say "sample" I mean just through something together using b.s. variables so you cant say you gave me the code.
  12. Thats a good idea, but how would I get the key that was pressed? I dont see anything for that event that will tell me what was pressed.
  13. Ah, I see. In that case, then you will have to use the PlayerInteractEvent for LEFT_CLICK_BLOCK, then check if the block ABOVE the block clicked is your custom fire; if so, set your fire to air and cancel the event. That's what I would do, anyway. Diesieben has already shared this idea, and found out it is only on the server, not client, so the client side isnt smooth and causes the block to break and return if you are in creative or if the block is a block that takes 1 hit to break. I think I am getting somewhere with it though. I'm starting to get things going to the server through packets that will allow the server and client to be in sync.
  14. The idea is that player should be able to swing their weapons through the fire too, to do it your way, they will have to do an extra click because they will have to break the fire before they can hit anything beyond it. I am trying to get my fire to work exactly like the vanilla fire works.
  15. Heres the issue, I am not finding a ItemInteractEvent. There is a PlayerInteractEvent and an EntityInteractEvent, both of which as far as I am aware are on the server side and do not send the information to the client. MouseEvent is not hackery, otherwise it wouldn't be an event added by MinecraftForge to use. Currently MouseEvent is the only thing that will work due to the bit of code public boolean isCollidable { return false; } if it wasnt for that, I could easily remove the fire, but that removes the hitbox and you have to use another block to find the fire. P.S. I am sorry for how I responded, I was thinking of someone on another topic that didnt bother to read the topic and gave answers that had nothing to do with the issue. For some reason I was thinking it was you, but I did go back and look at that topic again and realized my mistake.
  16. Ummm Im sorry, but do you actually read topics? I cant say how many times ive seen you comment on topics and clearly dont know what the topic was about to begin with. How does particles have anything to do with putting out a fire? I am doing what I need to do to get the fire to go out on the server and client.
  17. Which is fine. It was whether or not it returned a blockPos that was 1 unit away or if it returned the offset necessary to calculate the block 1 away. Oh I misunderstood you, it returns the block that is 1 or however many, if you specify farther, away.
  18. I have added the network handlers that I need, but for some reason null information is being sent. here are my updated classes Registering the Messaging Class: public static SimpleNetworkWrapper network; @EventHandler public void preInit(FMLPreInitializationEvent event) { network = NetworkRegistry.INSTANCE.newSimpleChannel("moChickens"); network.registerMessage(FireMessage.Handler.class, FireMessage.class, 0, Side.SERVER); } Event Handler: Message Class:
  19. Ok, thank you. Now hopefully my final question here, do you know of any good tutorials on the basics of packets? I have never even looked into them before so I have no idea what I need to be doing with them.
  20. pos.down() does NOT permanently lower pos, it tells the value to give the modified value instead. for example boolean check() { BlockPos pos = player.getPosition(); BlockPos pos2 = pos.down(); if (pos == pos2) { return true; } else { return false; } } Will return False. I have been using this quite a bit.
  21. ok, ok. As I said, I'm playing around with it. my only issue with the MouseEvent is you have no info from in game. I am not finding any info out as to how to get anything from the game, such as the player and the block pos.
  22. ok. Well I'm playing around with it and it seems that if you cancel MouseEvent it causes the event to freak out and just spam click. Here is what I have for testing this, as I said, I'm playing around with it. What do you think?
  23. private void extinguishFire(EntityPlayer player, BlockPos pos, EnumFacing face, World world, PlayerInteractEvent event) { pos = pos.offset(face); if (world.getBlockState(pos).getBlock() == MoChickens.blockChickenFire) { world.playSoundEffect(player.posX, player.posY, player.posZ, "random.fizz", 1.0F, 1.0F); world.setBlockToAir(pos); event.setCanceled(true); } } Where I put the setCanceled(true) is in this method, should I put it sooner in the event?
  24. I have added a player event handler for the interact event. So what is happening, I click the fire and get the fizz sound indicating that the fire is out, but it still break the block the fire is on. I know i can do event.setCanceled(true); to stop the block from breaking, but it just replaces the block and stops the block from dropping anything. Unless you mean to call it in the class for my fire block. Though I'm not sure what good that would do since fire is ignored as a breakable block so none of the general block interaction methods would be firing on it.
  25. So I just added an event handler and really at this point all it's doing is adding the fizz sound. If you are in creative it's still destroying the block the fire is on, I know I can cancel the event and continue to remove the fire, but that way causes the block to disappear and reappear which looks terrible. How can I cancel the BlockBreak event without having block still "break" and come back?
×
×
  • Create New...

Important Information

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