Open warior456 opened 1 year ago
This is doable with CustomIgnitionSource.
Create a static instance of PortalIgnitionSource:
public final static PortalIgnitionSource BLUE_FIRE = PortalIgnitionSource.CustomSource(new Identifier("test","bluefire"));`
When registering your portal specify this as the ignition source:
CustomPortalBuilder.beginPortal() .frameBlock(Blocks.DIAMOND_BLOCK) .customIgnitionSource(BLUE_FIRE) .destDimID(new Identifier("the_end")) .tintColor(45,65,101) .registerPortal();
Then you need to trigger the ignition when the block is placed. Add this to your Blue Fire block:
@Override public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) { PortalPlacer.attemptPortalLight(world, pos, BLUE_FIRE); }
This doesn't work
This is doable with CustomIgnitionSource.
Create a static instance of PortalIgnitionSource:
When registering your portal specify this as the ignition source:
Then you need to trigger the ignition when the block is placed. Add this to your Blue Fire block: