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

Hey, so I have two Techne blocks in my client right now, one of them looks like a Classic Minecraft Block and the other looks like a pile of Rubble.

 

The problem is, when I place the one that looks like a Block, it shares the rubbles model.

 

Despite it looking the same as Rubble when placed? it must still render correctly, because this is what my Block SHOULD look like when placed, but it doesn't

 

 

I have a logic error somewhere but I don't know exactly where it is.

 

 

Anyone had this issue before?

 

 

**UPDATE**

 

So, I created a Base class for Techne Blocks so I could call the BaseTechneBlock class when I was creating a new TechneBlock (Rather than the BaseBlock class for normal blocks) Reason I did this was to cut down on repeated code, and it makes sense not to have loads of un-needed code when I can extend generic information from a Base Class.

 

The problem I have is in my BaseTechneBlock Class and I've narrowed it down to one line.

 

 

The Method that's causing my issue is the TileEntity method, because it's currently returning a new TileEntityJohnnyBlockRubble, when it should have the ability to return any tileEntity

 

When I change this to my other block (TileEntityJohnnyBlock) I get the exact opposite issue.

 

 

In my BaseTechneBlock class how would I create this method but return the correct TileEntity in my subclasses?

 

How do I NOT return a TileEntity in my Base class?

 

*UPDATE 2**

 

solved, all I had to do was call the TileEntity and in my subclass just call the correct TileEntity I actually wanted.

 

Looks good :D

 

Think Java is tough? try BrainFuck!

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.