Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

So I was wanting a block that I can place and have it's top surface face me wherever I place it, but I was using the source code from logs, and that wasn't working out too well, so I decided to base my block code off of the piston's code. Well, that worked, but some of the sides of the block(especially the bottom) were flipped/textured incorrectly or just looked weird, so I decided to learn how to make my own renderer based on the vanilla source code for pistons, and I found out that the minecraft source code has a feature that you can use to flip textures called "renderer.flipTexture". So great, I thought, now I can manually edit the block's sides based off of the block's metadata, right? Nope, only some of the sides would even listen to the renderer.flipTexture boolean, and I wanted to find out why(There's even a block rendering tutorial that tells you that renderFaceYNeg/Pos ignores renderer.flipTexture!). So, I dug deep into the minecraft code and found those renderFace**** methods and then I looked through them and, after hours of tinkering, I was able to reproduce working copies of those methods! And better yet, I was also able to add another kind of texture flipping: VERTICAL flipping! So I re-named the original texture flip boolean to "flipTextureHorizontally" and named the new one "flipTextureVertically" so that others can use it. I then tested those booleans out and MAN, did they work! I think it's so awesome that it would be selfish of me NOT to share this with others and see what they think, so here you go, here is the rendering class where all the magic is, and the block class that I used to test the rendering class:

 

Rendering class:

http://redsandbox.no-ip.org/Files/Minecraft/My_Mods/MINERSCROLLS/Java_Files/RenderCustomBlock.java

 

Block class:

http://redsandbox.no-ip.org/Files/Minecraft/My_Mods/MINERSCROLLS/Java_Files/MultiTexturedBlock.java

 

I hope you guys find this useful! A lot of work and time went into this!

P.S. Here's a link to that tutorial I mentioned: http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html

 

EDIT: I've just finished changing and updating these two classes and have managed to create this so far:

 

(Almost)Completely rotatable blocks: http://redsandbox.no-ip.org/FTP_Files/Pictures/2014-08-29_19.38.32.png

Can only rotate vertical facing blocks so far: http://redsandbox.no-ip.org/FTP_Files/Pictures/2014-08-29_19.38.32_1.png

FYI, there's something called pastebin.

 

Would you like me to move your thread to modder support?

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

  • Author

Okay, I'll set up the text in pastebin or just leave the link to the text document version on there. Would modder support be a better suited forum? If so, then yes please! :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.