-
Posts
624 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Busti
-
Do I have to use the Incremental Garbage collector?
Busti replied to Busti's topic in Modder Support
Also: Launch the game using the debugger and click the make button to hot-swap. -
Do I have to use the Incremental Garbage collector?
Busti replied to Busti's topic in Modder Support
It is totally awesome Since I use IntelliJ Idea I don't know if it exists for Eclipse. Here is its download repo: (you can also search for it in IntelliJ Idea itself) https://plugins.jetbrains.com/plugin/7245?pr=idea And here is a tutorial on how to use it. http://blog.jetbrains.com/idea/2013/07/get-true-hot-swap-in-java-with-dcevm-and-intellij-idea/ Don't forget to enable the serial garbage collector for it to work. I haven't noticed any lag by using it. -
Do I have to use the Incremental Garbage collector?
Busti replied to Busti's topic in Modder Support
It is just for debugging purposes. I have a Plugin that enables you to hot-swap whole classes and structural changes. Normally only method-bodies are possible. -
Do I have to use the Incremental Garbage collector?
Busti replied to Busti's topic in Modder Support
[bump] -
Direct rotation (not "smooth" and prettier 359 -> 0)
Busti replied to david476's topic in Modder Support
Shouldn't that be just a mathematical problem using the PartialTickTime and the update tick? -
Hello, by default the Incremental Garbage collector (java option: -xincgc) is enabled. Is there any particular (crashes) reason for it to be enabled or is it just for the ram performance? - Busti Why? I have to use the serial garbage collector for method hot-swapping to work...
-
Does Integer.maxValue() work?
-
Direct rotation (not "smooth" and prettier 359 -> 0)
Busti replied to david476's topic in Modder Support
Are you talking about GL.glRotated(x, y, z, rot)? -
You have to create the ItemStack for the test with all the damage values: new ItemStack(ModItems.forgeHammer, 1, Short.maxValue()) It might also be Byte.maxValue (I always mix those up)
-
The more efficient way would probably be to make a block renderer without using a TileEntity (What was that called again?) and a TickHandler that only checks the value once every tick and not once every frame. You could either store the value in the TickHandler or make a static variable in the renderer.
-
The BlockRenderer uses a predefined texture, the Texture Atlas which is basically a huge texture containing all block textures. It then uses the UV coordinates given by the registered IIcon to find the hoppers texture on the atlas. Since these are hard-coded into the RenderBlocks class you cant change them. The only method to change the texture would be to render it dynamically (every frame) and manually bind a texture. But then you could also render a model without using RenderBlocks.
-
It should use the renderBlockByRenderType() method in RenderBlocks. If you surround this with the following code you can get every block in the game to render wherever you want. Tessellator t = Tessellator.instance(); t.startDrawingQuads(); //The rendering code... t.draw(); You can of course call this from a TileEntitySpecialRenderer or an EntityRenderer.
-
Just make a TileEntitySpecialRenderer implementing ISimpleBlockRenderingHandler and only use the renderWorldBlock() method. To render the block just call the renderBlockHopperMetadata() method in RenderBlocks. You can use the Tessellators instance to manipulate the colors it has a method to do so. Also make sure to only return true in renderWorldBlock() if you actually render something otherwise the game will crash. You might also have to bind the default block texture atlas first for the textures to work. You can use this line of code to do so: Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); Good Luck
-
You could use the following code to get the current / equipped item and the item next to it. (I haven't actually tested it so you might have to add an offset to currentItem. Also make sure to test for another item when the last slot is selected.) @Override public ItemStack onItemRightClick(ItemStack s, World w, EntityPlayer p) { return super.onItemRightClick(s, w, p); p.inventory.currentItem; //To get the current equipped item... p.inventory.getStackInSlot(p.inventory.currentItem+1); }
-
ChickenBones Multipart - [Highly Advanced]
Busti replied to Busti's topic in User Submitted Tutorials
When you are looking for interaction between parts and parts or blocks and parts, I am going to create such a Tutorial soon. -
ChickenBones Multipart - [Highly Advanced]
Busti replied to Busti's topic in User Submitted Tutorials
A part is a bit like a mixture of the Part and the Block. It has all the interaction methods a block has. For instance onActivated() or onNeighbourChange(). You can use those to do stuff. Since parts already are TileEntitys (they are just specially coded ones) you can also interact with them. Have a look at the souces and look for the methods you could override. -
ChickenBones Multipart - [Highly Advanced]
Busti replied to Busti's topic in User Submitted Tutorials
Do you want to store items and have a gui? A part is not a block, but it has all the methods similar to those in a TileEntity. Just try to override the update() method. -
Where does an Entity get the light value to be rendeted with and how can it be calculated into a 0 - 255 value.
-
Is always seemed to be be the easiest solution to me... In the earlier versions I always got crashes when I only used hasTileEntity()
-
You have to extend BlockContainer for it to work...
-
The Entitys Render Light value is computed by world.getBlockBrightness(x,y,z) (or similar name) but that method returns pretty wired values ranging from 0 to a very high number. They are later computed into the actual light values but I cant get anything to work there. I think the value represents coordinates on the light texture (skylight x blocklight y) but it does not seem like the coordinates are just bit shifted into one integer.
-
Found it... I think you misunderstood me. I am not searching for the light value a Block emits, I am searching for the Light value a Block should be rendered with.
-
In what class should I search for that method?
-
Hi, How can I get a Blocks render-brightness by xyz coordinates? (e.g. The light level that is shown in the dev / F3 menu after "rl: ") It can be any type of number format for instance: float 0.0 - 1.0, int 0-15, int 0-255. But it would be much better to have a float / int 0-255 value Thanks - Busti EDIT: A Method to get a light value at a specific double xyz coord (entity light) would be great!