Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. I think you should register custom renderer for the entity. You can process some GL calls in the Render#doRender(...), and call the original renderer's Render#doRender there. And to change color, you can call GL11.glColor(r, g, b, alpha) or GL11.glColor(r, g, b).
  2. No, you should convert them to matrix and multiply them.
  3. You simply can't. Since quaternion cannot represent a coordinate system, you need something with more data than that, like Matrix. In OpenGL, (0,1,0,yaw) and (1,0,0,pitch) is changed into matrix form, and multiplied.
  4. Make your own button using GuiButton. Its code will tell you how to texture the button
  5. Then you can use custom blockstate for that.
  6. Actually he provided all of this code using Github:
  7. If you do not use metadata or TileEntity, every block would have same texture. Is that okay?
  8. So is it not a problem of client-server syncing?
  9. So Is DimensionManager for new dimensions? (EDIT: the provider field is final, so I should use Reflection. But that's okay)
  10. Would that work properly? Oh I really hadn't thought about it; I must be fool. I thought I really cannot change the provider field.
  11. You might use TickEvent with Type.Render As I know, there is no way to render blocks in unloaded chunk without that.
  12. Till this time, there were no mods discovered incompatible without Optifine. Even terrafirmacraft is compatible in this version. And I should replace overworld provider just to change the celestial angle. (I really hate this way, and I want some PR but I strongly doubt that these kind of PR can be accepted)
  13. Anyway, there is currently 2 model systems: 1. Json models, for blocks/items 2. Entity models for entities Armor is special, since it is basically item but can be worn by entities. So it has Json model as item, and Entity model as armor worn by entity.
  14. Maybe this can be client server sync issue. I think you should call World#markBlockUpdate on readFromNBT. (I solved similar problem in this way)
  15. On postInit, I do this: for(Side side : Side.values()) StellarWorldProvider.preProviders[side.ordinal()] = DimensionManager.createProviderFor(0); DimensionManager.unregisterDimension(0); DimensionManager.unregisterProviderType(0); DimensionManager.registerProviderType(0, StellarWorldProvider.class, true); DimensionManager.registerDimension(0, 0); When StellarWorldProvider is my own provider overlapping the existing provider. preProviders are the original providers registered in the DimensionManager. These are how I use preProviders: @Override protected void registerWorldChunkManager() { this.parProvider = worldObj.isRemote? preProviders[0] : preProviders[1]; parProvider.setDimension(this.dimensionId); parProvider.registerWorld(this.worldObj); this.worldChunkMgr = parProvider.worldChunkMgr; } Most of StellarWorldProvider's methods just calls the same method of preProviders. Only these are different: @Override public float calculateCelestialAngle(long par1, float par3) { if(StellarSky.getManager().Earth.EcRPos == null) StellarSky.getManager().Update(par1+par3, isSurfaceWorld()); IValRef<EVector> sun = EVectorSet.ins(3).getSTemp(); sun.set(StellarSky.getManager().Sun.GetPosition()); sun.set(ExtinctionRefraction.Refraction(sun, true)); sun.set(VecMath.normalize(sun)); double h=Math.asin(VecMath.getZ(sun)); if(VecMath.getCoord(sun, 0).asDouble()<0) h=Math.PI-h; if(VecMath.getCoord(sun, 0).asDouble()>0 && h<0) h=h+2*Math.PI; sun.onUsed(); return (float)(Spmath.fmod((h/2/Math.PI)+0.75,2*Math.PI)); } @Override public int getMoonPhase(long par1) { if(StellarSky.getManager().Earth.EcRPos==null) StellarSky.getManager().Update(par1, isSurfaceWorld()); return (int)(StellarSky.getManager().Moon.Phase_Time()*; }
  16. So forge_clj.core.ClojureAdapter does exist, but forge can't find the class? It might be a problem with underbar(_), so try removing it.
  17. Can you post console log? It would be so helpful.
  18. Did you implement getDescriptionPacket and onDataPacket? Then calling worldObj#markBlockForUpdate() from server will synchronize the block and update rendering.
  19. That is event for naturally generated mobs. I think you should use EntityJoinWorldEvent.
  20. So you want to make it so that all blocks with the block type are unbreakable?
  21. Oh; Just worldObj#markBlockForUpdate() worked for me. It should update rendering.
  22. I think you should have 2 mods for that. first mod is java mod and contains ILanguageAdapter. second mod is clojure mod loaded by first mod.
  23. You should worldObj.markBlockForUpdate() with appropriate flag. I think I used 3 and worked well.
  24. It is not Json model format. It is just normal Entity model format. (Especially It is net.minecraft.client.model.ModelBiped, which is for player) See the player model format.
×
×
  • Create New...

Important Information

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