TwinAndy Posted March 7, 2013 Share Posted March 7, 2013 I was looking for a tutorial on how to make glass but i cant find any any suggestions? Quote Link to comment Share on other sites More sharing options...
Dambob Posted March 7, 2013 Share Posted March 7, 2013 Try looking at the default glass block. net.minecraft.block.BlockGlass Quote Link to comment Share on other sites More sharing options...
Tomalla Posted March 7, 2013 Share Posted March 7, 2013 Glass, like a stock glass block in Minecraft? Just follow the basic block tutorial on the Forge wiki and the actual BlockGlass.java, but there's nothing fancy really. The transparency of the block is due to the texture itself ( in comparison: the ice block uses blending and is a bit more difficult to implement ). Quote Link to comment Share on other sites More sharing options...
TwinAndy Posted March 7, 2013 Author Share Posted March 7, 2013 Try looking at the default glass block. net.minecraft.block.BlockGlass I did but when i change: http://paste.minecraftforge.net/view/91d35da5 To: http://paste.minecraftforge.net/view/385da035 Then there is a red line under: new AltorGlass (763, 6) http://paste.minecraftforge.net/view/9cd22d14 Quote Link to comment Share on other sites More sharing options...
TwinAndy Posted March 7, 2013 Author Share Posted March 7, 2013 Glass, like a stock glass block in Minecraft? Just follow the basic block tutorial on the Forge wiki and the actual BlockGlass.java, but there's nothing fancy really. The transparency of the block is due to the texture itself ( in comparison: the ice block uses blending and is a bit more difficult to implement ). Its not just a normal block Quote Link to comment Share on other sites More sharing options...
Tomalla Posted March 7, 2013 Share Posted March 7, 2013 I did but when i change: http://paste.minecraftforge.net/view/91d35da5 To: http://paste.minecraftforge.net/view/385da035 Then there is a red line under: new AltorGlass (763, 6) http://paste.minecraftforge.net/view/9cd22d14 You change your constructor to receive four arguments instead of two, so no wonder you get the error. Its not just a normal block But the glass block is. You've asked for glass, you've got glass. What else do ya need then? Quote Link to comment Share on other sites More sharing options...
TwinAndy Posted March 7, 2013 Author Share Posted March 7, 2013 I did but when i change: http://paste.minecraftforge.net/view/91d35da5 To: http://paste.minecraftforge.net/view/385da035 Then there is a red line under: new AltorGlass (763, 6) http://paste.minecraftforge.net/view/9cd22d14 You change your constructor to receive four arguments instead of two, so no wonder you get the error. Its not just a normal block But the glass block is. You've asked for glass, you've got glass. What else do ya need then? I mean glass block Quote Link to comment Share on other sites More sharing options...
Tomalla Posted March 7, 2013 Share Posted March 7, 2013 Its not just a normal block But the glass block is. You've asked for glass, you've got glass. What else do ya need then? I mean glass block Oh I don't know, then I suppose 90% of the blocks in game must not be normal to you. Fine then: a glass block is not normal. But I feel like I'm missing the point Quote Link to comment Share on other sites More sharing options...
Dambob Posted March 7, 2013 Share Posted March 7, 2013 Super calls the constructor for the base class. If you have extended blockGlass then Super() MUST have the same number and type of parameters as the BlockGlass() function. Quote Link to comment Share on other sites More sharing options...
TwinAndy Posted March 7, 2013 Author Share Posted March 7, 2013 Super calls the constructor for the base class. If you have extended blockGlass then Super() MUST have the same number and type of parameters as the BlockGlass() function. can you please explain this to me Quote Link to comment Share on other sites More sharing options...
Dambob Posted March 7, 2013 Share Posted March 7, 2013 That's basically what I've explained. This is standard code. It seems like you need to learn how to program first. class foo { foo(int par1, int par2) { } }; class bar extends foo { bar(float par1, int p1, int p2) { super(p1, p2); } }; Quote Link to comment Share on other sites More sharing options...
TheGrovesyProject101 Posted March 7, 2013 Share Posted March 7, 2013 put this in your block file: public boolean isOpaqueCube() { return false; } and then use a transparent texture in your texture file like the one glass has Quote My youtube channel for forge tutorials: http://www.youtube.com/user/TheGrovesyProject101?feature=mhee if i helped please press thank you Link to comment Share on other sites More sharing options...
Mazetar Posted March 7, 2013 Share Posted March 7, 2013 Super calls the constructor for the base class. If you have extended blockGlass then Super() MUST have the same number and type of parameters as the BlockGlass() function. can you please explain this to me Sure: http://thenewboston.org/list.php?cat=31 Watch number 17 about constructors and number 49 about inheritance. Oh and while you're at it, you should watch them ALL to learn the basics you need <3 Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.