• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I need help once again. I came up with a "special block", which is supposed to "preserve empty space" while the door is open. It acts as it should - doesn't block movement and is transparent, when installed manually, but when it's put instead of a door element by the renderer, it blocks movement. Also, it seems like renderer doesn't unload on block replacement. Any ideas on what gould have gone wrong are appreciated.    I know that removing block before placing a new one in not really necessery.    "special block" :        Renderer public class SpecialBlock extends Block { private static final BooleanProperty POWERED = BlockStateProperties.POWERED; private static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; public SpecialBlock (){ super(Block.Properties.create(Material.WOOD).doesNotBlockMovement()); } @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return VoxelShapes.empty(); } @Nullable @Override public BlockState getStateForPlacement(BlockItemUseContext context){ return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); } @Override public boolean canDropFromExplosion (Explosion explosion) {return false;}; @Override protected void fillStateContainer(StateContainer.Builder<net.minecraft.block.Block, BlockState> builder) { builder.add(FACING, POWERED); } @Override public BlockRenderType getRenderType(BlockState state) { return BlockRenderType.INVISIBLE; } @Override public boolean hasTileEntity(BlockState state) { return false; } } :    public class WindowTileEntityRenderer extends TileEntityRenderer <WindowTileEntity> { public WindowTileEntityRenderer(TileEntityRendererDispatcher rendererDispatcherIn) { super(rendererDispatcherIn); } IBakedModel model; Direction direction; BlockState state; private static DirectionProperty facing = BlockStateProperties.FACING; World world; BlockPos pos; boolean power; @Override public void render(WindowTileEntity tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) { state = tileEntityIn.getBlockState(); if (state.getBlock().equals(RegistryHandler.WINDOW_TILE.get().getDefaultState().getBlock())){ // float a = tileEntityIn.turnAngle(); pos = tileEntityIn.getPos(); world = tileEntityIn.getWorld(); direction = world.getBlockState(pos).get(facing); if (world.isBlockPowered(pos) == true) {power = true;} else {power = false;}; BlockRendererDispatcher dispatcher = Minecraft.getInstance().getBlockRendererDispatcher(); if (power) { world = tileEntityIn.getWorld(); world.removeTileEntity(pos); world.removeBlock(pos,false); System.out.println(state.toString()); System.out.println(direction.toString()); world.setBlockState(pos, RegistryHandler.SPECIAL_BLOCK.get().getDefaultState(),3); return; } model = dispatcher.getModelForState(world.getBlockState(pos)); matrixStackIn.push(); MatrixStack.Entry currentMatrix = matrixStackIn.getLast(); float red = 1; float green = 1; float blue = 1; IVertexBuilder vertexBuffer = bufferIn.getBuffer(RenderType.getTranslucent()); dispatcher.getBlockModelRenderer().renderModel(currentMatrix, vertexBuffer, null, model, red, green, blue, combinedLightIn, combinedOverlayIn, EmptyModelData.INSTANCE); matrixStackIn.pop(); } } @Override public boolean isGlobalRenderer(WindowTileEntity windowTileEntity) { return false; } }  
    • This will break outside the development environment. You need to use ObfuscationReflectinoHelper and SRG names. Also, store the Field in a static final field.
    • Hello There! Today we are back with The Dropper but this time it's Star Wars Themed! If you guys don't know Star Wars is my favorite movie of all time so this was a real treat just to play this map! There are so many hilarious moments and Star Wars References that I know you guys are gonna love! I hope you all enjoy this video and if you did don't forget to like and sub for more!  
    • Does this server have a display or is it just a terminal?
    • yo I put in the jrmcore mod and after i could only play without the mod how do i fix this  
  • Topics

  • Who's Online (See full list)