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.

Artsicle

Members
  • Joined

  • Last visited

  1. With my new tile entity, my nbt isnt importing when reloading the world, and all of the nbt data is being shared across all the blocks. Also it said something like "Tile Entity is missing a mapping!" before I added the auto inserter register. That makes sense, however the NBT is still not working for the auto inserter but it is for the extractor (Using 1.12.2) GameRegistry.registerTileEntity(TileEntityExtractor.class, Reference.MOD_ID + "TileEntityExtractor"); GameRegistry.registerTileEntity(TileEntityAutoInserter.class, Reference.MOD_ID + "TileEntityAutoInserter"); http://prntscr.com/gqxlsm public class TileEntityAutoInserter extends TileEntity { static int redstoneCount; static int OreCount; @Override public NBTTagCompound writeToNBT(NBTTagCompound compound) { compound.setInteger("OreCount", OreCount); compound.setInteger("Count", redstoneCount); return super.writeToNBT(compound); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); OreCount = compound.getInteger("OreCount"); redstoneCount = compound.getInteger("redstoneCount"); } Also, I'm doing @Nullable @Override public TileEntity createNewTileEntity( World worldIn , int meta ) { return new TileEntityAutoInserter(); } From BlockAutoInserter.java
  2. Would I do it sort of like this? container.getCapability(Capability<IItemHandler.class>,EnumFacing.NORTH); EDIT: Found it. itemhandler = container.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.NORTH);
  3. But what do I do after? TileEntity container = worldIn.getTileEntity(po);
  4. Artsicle changed their profile photo
  5. Well that's the container.
  6. I've been trying to add an item to a chest, but I dont know exactly how to do it. if(worldIn.getBlockState(po).getBlock() == Blocks.CHEST) { Block chest = worldIn.getBlockState(po).getBlock(); chest. } That's my code, the chest. is there from me trying to find something from auto complete but I don't know what to do. If anyone knows please reply! Thanks!
  7. Try getting the players look vector so you can then change the velocity of the particles
  8. I've been trying to get my block to accept redstone. I already have this @Override public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { return true; } But I don't know how to get if it's actually getting power, and what level of power it is. Tried this @Override public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { if(super.getWeakPower(blockState, blockAccess, pos, side) >=1) { powered = true; } else { powered = false; } return super.getWeakPower(blockState, blockAccess, pos, side); } but it didnt work, and minecraft doesnt have a default "Powered" blockstate property if you were gonna suggest that, unless its named strangely then do suggest it. Thanks!
  9. Thanks, I got it! (For those who want to know, here is the code) @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(FACING, placer.getHorizontalFacing()); }
  10. to port over this may help https://shadowfacts.net/tutorials/forge-modding-112/
  11. I know how to do this in 1.10 I think but /*@Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { super.onBlockPlacedBy(worldIn, pos, state, placer, stack); }*/ I'm not used to that method ^ I'm used to /*@Override public IBlockState onBlockPlaced*/ but that's not in 1.12. I tried doing super.onBlockPlacedBy(worldIn, pos, state.withProperty(FACING, placer.getHorizontalFacing()), placer, stack); But that didnt work. If anyone knows please reply.

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.