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

Hello,

I have a working custom door, but i want to make it lockable.

To save the data i want to use NBT, but that needs a TileEntity.

For that i have to extend BlockContainer, but i can't because then the door will not work.

So, how can i use NBT fo a block that extends BlockDoor?

Thanks!

Hello,

I have a working custom door, but i want to make it lockable.

To save the data i want to use NBT, but that needs a TileEntity.

For that i have to extend BlockContainer, but i can't because then the door will not work.

So, how can i use NBT fo a block that extends BlockDoor?

Thanks!

 

src pls

Here could be your advertisement!

  • Author

Never mind just figured out.

I have to make a custom BlockDoor class that extends BlockContainer.

So my door now extends CustomBlockDoor and its working!

Never mind just figured out.

I have to make a custom BlockDoor class that extends BlockContainer.

So my door now extends CustomBlockDoor and its working!

Just wanted to post this:

 

 

package net.dimensionshift.mod.block;

 

import net.dimensionshift.mod.DimensionShift;

import net.dimensionshift.mod.energy.TileEntityBasicWire;

import net.dimensionshift.mod.tileentity.TileEntityAncientDimensionStoneBricks;

import net.minecraft.block.BlockContainer;

import net.minecraft.block.material.Material;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

public class BlockAncientDimensionStoneBricks extends BlockContainer{

 

public BlockAncientDimensionStoneBricks(Material material) {

super(material);

this.setCreativeTab(DimensionShift.tabDimensionshift);

 

}

 

@Override

public TileEntity createNewTileEntity(World var1, int var2) {

 

return new TileEntityAncientDimensionStoneBricks();

}

 

}

 

 

 

 

 

that would have been such an easy "thank you" D;...

 

@MultiMote, i think he only asked for the TileEntity, not for the nbt

Here could be your advertisement!

  • Author

@MultiMote: Thanks, but just figured out how to do it. The tut is realy good, but i want to write my system.

 

@Jacky2611: I already know how to use NBT for a normal block.

 

 

I probably try harder next time before instant requesting for help.

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.