Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/12/19 in all areas

  1. The entity bounding boxes need to have the same length and width (i.e. square base). I believe this is to simplify path-finding. Similarly note that the bounding box never rotates even when the model does, so it wouldn't be that helpful even if you could specify different values. EDIT: Also the setEntityBoundingBox() method set's the actual box in the world meaning the values of the box would be related to the entity position. If the size was 2.0 wide and the entity is at x position of 300 then the bounding box would go from 299 to 301. You shouldn't ever use the setEntityBoundingBox() method as it is meant for updating the position of the bounding box based on the size and position.
    1 point
  2. Might've changed, I might've remembered wrong. public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
    1 point
  3. Is there a file called jxbrowser something in your mods folder?
    1 point
  4. I believe that OnBlockPlacedIntoWorld is called after its placed by worldgen.
    1 point
  5. I don't think your code will move them in a circle. It might spawn them in a circle, although the code for that looks a little weird for that too. Let's go through you update() method in the hastebin link. The first important thing is -- where is this update code? If you want to move the particles it would need to be in the particle class, but I kind of suspect you have it somewhere else like in an entity. So your first mistake is that your code isn't moving the particles, it is just spawning them constantly. It might also be possible to used particles in fixed positions and "animate" them by killing and spawning them quickly but I don't think it would work well visually. So I think you need your particle class to remember the center of the circle and the angle, and then in the update method for the particle you would add some angle and adjust the position (not respawn) accordingly. Additionally, I think your math is still suspicious. Your code to use trigonometry to adjust the X and Z positions looks like: double angle = Math.toRadians(degrees); double vx = (pos.getX() + 0.3) * Math.cos(angle) - pos.getZ() * Math.sin(angle); double vz = pos.getX() * Math.sin(angle) + pos.getZ() * Math.cos(angle); I'm pretty sure the math is wrong here. The X and Z positions are the values in the world, so they can be numbers like 600 or 0 or -600. Instead I think you should be multiplying by a radius for the circle as the vx and vz fields presumably indicate the difference in position relative to the center. Also, you're mixing up the two dimensions. Sin and Cos functions already take and angle and separate it into the two dimensional components, so I think it should be something more like: double angle = Math.toRadians(degrees); double radius = 2.0D; double vx = radius * Math.cos(angle); double vz = radius * Math.sin(angle); Then instead spawning the particles again, you should just move them. Also, you shouldn't move them based on current position, but recalculate from the center of the circle. So the new positions would be something like (this is pseudo code because you need to put the code into the right place with a field for the center: this.setPos(particleCenterX + vx, this.getPosY(), particleCenterZ + vz); Summary Putting it all together: The movement code needs to be in the update for the particle class which runs on the client side. You can't just keep spawning particles. I would have the particle "remember" where the center of the circle should be. You need to have a sense of "radius" for the circle. You simply update the particle position with very simple trigonometry such as center + radius * cos(angle)
    1 point
  6. Yes, there's a problem - you posted a screenshot of your IDE instead of your crash log.
    1 point
  7. Unfortunately splash texts are a normal resource meaning you can only replace it, not add new entries. The only resource you can add entries to are lang files since they are merged after being collected. Any other resource is just replaced by the one supplied by the last resource pack to be loaded. The best you can do is use the GuiOpenEvent, detect the GuiMainMenu, read the splash text yourself, collect a list of entries, then do a random.nextInt(list.size) == 0 and if it is true change the value of GuiMainMenu.splashText
    1 point
  8. Let's look at the vital parts of the error log: Description: Exception in server tick loop java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP at packets.DemoMod.<clinit>(DemoMod.java:24) I see one big problem here, do you see it? Let me point it out for ya: Description: Exception in server tick loop and then: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP Your mod is trying to access a CLIENT class on the server side for some reason. Remember that the server has no client files, it has no concepts of rendering and so on. And it does not have an EntityClientPlayerMP class as it's a Client only class. Therefore it will crash when trying to find a class which does not exist in the servers code. In case you aren't convinced read the lover parts of the output: Caused by: java.lang.RuntimeException: Attempted to load class bdi for invalid side SERVER Now the first thing you must to is to test your mod on a server only modded by forge! Regular forge not the bukkit/forge crossover. And NO other mods! If that works then try the bukkit forge thing, and if that works add one and one mod until it crashes. The problem is with that mod most likely, or your mods interaction with it but I doubt that
    1 point
×
×
  • Create New...

Important Information

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