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

BudRunBun

Members
  • Content Count

    96
  • Joined

  • Last visited

Community Reputation

0 Neutral

About BudRunBun

  • Rank
    Stone Miner

Converted

  • Gender
    Male
  • Location
    Russia

Recent Profile Visitors

676 profile views
  1. Thank you! I didn't know that Renderer is a singleton, I thought that for every TE there is its own renderer object but this makes much more sense.
  2. Renderer: package com.budrunbun.lavalamp.renderer; import com.budrunbun.lavalamp.LavaLamp; import com.budrunbun.lavalamp.model.BarrelModel; import com.budrunbun.lavalamp.model.OBJModel; import com.budrunbun.lavalamp.model.OBJModelHandler; import com.budrunbun.lavalamp.tileentity.TurretTileEntity; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.sun.javafx.geom.Vec3d; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client
  3. If I place two turrets far away from each other and an enemy next to the first one, the first turret will start the animation as intended, but the other turret, which is far away and out of range of the enemy, will open too, then freeze, since there is no enemy nearby. However, as soon as the enemy is dead, turrets start shutting down simultaniously.
  4. I have a turret tile entity class with an animator field(basically just a ticking animation machine) but somehow two different turrets access the same animator object. Why is this happening? How to fix it? Tile entity class: package com.budrunbun.lavalamp.tileentity; import com.budrunbun.lavalamp.renderer.Animator; import com.sun.javafx.geom.Vec3d; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.MobEntity; import net.minecraft.entity.monster.IMob; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.NetworkManager; import net.minecraft.network.play
  5. Minecraft#shutdown could work but I don't know what you need it for. Also, it does not save the world data, so you need to call World#sendQuittingDisconnectingPacket first.
  6. The correct function, for whose, who need it, is: public static void normaliseVector(Vector3f vector) { float mu = vector.getX() * vector.getX() + vector.getY() * vector.getY() + vector.getZ() * vector.getZ(); vector.mul((float) MathHelper.fastInvSqrt(mu)); }
  7. Problem solved, it was with the Vec3f#normalize method. Because of the incorrect length multiplier resulting vector was not unit. Now it looks like this:
  8. I have a structure, which generates in a world but I want it to be a part of a village. How would I do that?
  9. I have made some progress. I tried loading OBJ model myself(it works fine) and rendering it with triangles, not quads. Now ambient lighning works but diffuse doesn't: colour is changing every frame in random order, i.e the surface keeps flashing even when I stand still and look at it. I believe that problem is connected with normals but I can be wrong. My code: 1) TE renderer: package com.budrunbun.lavalamp.renderer; import com.budrunbun.lavalamp.LavaLamp; import com.budrunbun.lavalamp.model.OBJModel; import com.budrunbun.lavalamp.model.OBJModelHandler; import com.budrunbun.lava
  10. I also checked WorldRenderer#getCombinedLight(world, pos) for my block, for some reason it is always zero
  11. I am stuck. I have looked up #getPackedLightmapCoords but I still don't know how Minecraft calculates the brightness parameter(I suspect via ambient occlusion). Since my model is rendered on top of the block, can I somehow "borrow" color from the top face of it?
  12. I will try to explain it a little bit more verbosely. Basically, your entity is first created on the server and then a message with SSpawnObjectPacket, which is created by Entity#createSpawnPacket, is sent to the client, then magical client-side Mojang algorithms(look at ClientPlayNetHandler#handleSpawnObject), that are hard-coded, just throw your entity away since it's not of vanilla EntityType and don't add it to the ClientWorld lists. So, in effect, you have a strange situation when the entity is operating perfectly fine on the server and client doesn't even know of its existance. The funni
×
×
  • Create New...

Important Information

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