Jump to content

Busti

Forge Modder
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Busti

  1. Start this and then stop the server: Runtime.getRuntime().exec("serverRestarter.jar"); //Should be an executable The other program: public static void main(String [ ] args) { Thread.sleep(50000); //50 Seconds Runtime.getRuntime().exec("server.jar"); //Start the server... }
  2. Try to create another thread or open another instance of java which restarts the server after a few seconds and then closes itself. This is just an Idea so I wont post any code here.
  3. WOOO I SOLVED IT Just override this in your entity class: @Override public void setPositionAndRotation2(double x, double y, double z, float a, float b, int par1) { this.setPosition(x, y, z); this.setRotation(a, b); }
  4. Sorry but I am asking again since i still cant fix the Problem I am trying to make an Entity Noclip but it is always glitching out of the Block it should be inside. I already tried the noclip flag as well as a Custom movement system. It is not doing it when I don't register it. How can I make it noclip? I am trying this for ages now but it seems like you can't disable the collision detection by just setting the entity noclip. When I place 2 Blocks above it it will stay between Block 1 and Block 2 BBB BBB BBB R AAA APA AAA A = Block 1 B = Block 2 P = Entity Position R = Render Position Please help me... Busti EDIT1: I just found out that the coordinates just moves upwards on the client.
  5. Thanks
  6. Hello, how can I use custom Language packs and where do you register them? Busti
  7. Try to enable blend only for the glass. I dont know if it will help but it will decrease the CPU usage when you do it on the model too.
  8. Oh sorry its hard to keep track of so much code in a forum Its supposed to be: TheCorrespondingBlock.setRenderType(ModelOldWallLampRendererID); EDIT 1: You need to set it to the already initialized block in your mod Class. You basically have to set the Blocks renderID the same as teh TESR's
  9. Oh sorry my bad You need to register it like this in the proxy: int ModelOldWallLampRendererID = RenderingRegistry.getNextAvailableRenderId(); ModelOldWallLampRenderer OldWallLampRender = new ModelOldWallLampRenderer(ModelOldWallLampRendererID); //You need to have the id in the class as a variable so you have quick access to it. TheCorrespondingBlock(ModelOldWallLampRendererID); //You also need to give the block the id and save it there as a variable. ClientRegistry.bindTileEntitySpecialRenderer(YourTileEntity.class, OldWallLampRender); RenderingRegistry.registerBlockHandler(OldWallLampRender); Now to save the id in the renderer: protected int renderID; public ModelOldWallLampRenderer(int renderID) { model = new SoulMagnetModel(); this.renderID = renderID; } Now you need to override this function in the renderer and let it return the render id. You should have saved it as a variable in the renderer. @Override public int getRenderId() { return this.renderID; } Now you need to set the blocks renderId to the given render id: (just add this to your block) protected int renderType; public SoulMagnetBlock setRenderType(int id) { this.renderType = id; return this; } @Override public boolean renderAsNormalBlock() { return false; } @Override public int getRenderType() { return renderType; } @Override public boolean isOpaqueCube() { return false; } Sorry if it is a bit messy but this is the system I use to handle the rendering if blocks. BTW: keep the ISimpleBlockRenderingHandler implemented
  10. Just do the same thing but with a Translation / Position value and make it change direction when it has reached its final / Start position. You can perform any type of animation using this basic concept.
  11. You can implement the ISimpleBlockRenderingHandler. That will give you all the functions you need to render it as an Item as well. @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {} @Override public boolean shouldRender3DInInventory() { return true; }
  12. You can check if the entity is a mob by doing this: @Override public void onEntityWalking(World world, int x, int y, int z, Entity entity) { if (entity instanceof EntityMob) { entity.setDead(); // or something like that. } }
  13. You need to activate the alpha channel so transparent textures will work. GL11.glEnable(GL11.GL_BLEND); But dont forget to deactivate it after the transparent part renderes because it will consume a lot of cpu. GL11.glDisable(GL11.GL_BLEND);
  14. I found a mojang bug ticket here: https://mojang.atlassian.net/browse/MC-5321
  15. http://www.minecraftforge.net/wiki/TileEntitySpecialRenderers_and_Animation The tutorial is now online but I cant add it to the tutorial list.
  16. Uh sorry i thought that this was a moadloader file. Yo will need to set your mod parameters first. Use this tutorial: http://www.minecraftforge.net/wiki/Basic_Modding
  17. I don't always bump a post. But when I do its a serious problem.
  18. Try to use the forgemodloader. Its better
  19. I am using the TileEntitySpecialRenderer for the rendering. Its render functions are called every tick and the TileEntity is given so I can use its variables. The coordinates are for the renderer and relative to the player which is always 0, 0, 0 Use this setup for the rendere: @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTickTime) { Rendere here... } I will upload a Tutorial tomorrow at 8:00GMT featuring the TileEntitySpecialRenderer and animations
  20. I guess the TileEntity of the Engine in Buildcraft just changes the Speed of the movement. The actual animation is done in the Renderer which uses the given PartialTickTime (PTT) which is a float variable to sync the Animation to the Framerate. If you just want to make something rotate try to increase the new rotation by the PTT and multiply it with the speed. Try it out and experiment a bit with it. If you want to have a more advanced style of animation you have to write a System which can handle Wavefront keyframes.
  21. Hello, I've made an Entity which should noclip. The noclip flag is set to true and I've also tried to make a custom movement system but when it is inside a block it always renders above it. How can I create true noclip? Busti
  22. Oh I've never thought about that Thanks
  23. Uh. I forgot about that... I am using a superclass extending Block.class which holds this specific variable to let my pipes connect to other pipes and a subclass for the different blocks I guess it will work like this: public class BlockPipes extends Block { public boolean isPipe = true; //More stuff? } public class SpecificPipe extends BlockPipes { //The BLOCK } try { return ((BlockPipes)Block.blocksList[world.getBlockId(x, y, z)]).isPipe; }catch{Exception e} return false; }
  24. Use this if your boolean won't change ever (always true) for instance if you are checking for a Specific Block type. try { return ((YourBlockClass)Block.blocksList[world.getBlockId(x, y, z)]).yourBoolean; }catch{Exception e} return false; } Or this when it changes (You need a TileEntity for that) try { return ((YourTileEntityClass)world.getBlockTileEntity(x, y, z)).yourBoolean; }catch{Exception e} return null; }
  25. I guess it "gets buggy" because the normal chest searches for a class of its own type nearby and your chest is extending this class so it will also count as a chest.
×
×
  • Create New...

Important Information

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