mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Configurable end credits
This commit is contained in:
parent
1fed104464
commit
b083157a8c
1 changed files with 8 additions and 4 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
|
||||
@@ -58,6 +69,10 @@
|
||||
@@ -58,9 +69,14 @@
|
||||
@Override
|
||||
protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
|
||||
if (entity.canUsePortal(false)) {
|
||||
|
@ -35,7 +35,11 @@
|
|||
if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -74,11 +89,11 @@
|
||||
+ if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits
|
||||
if (!entityplayer.seenCredits) {
|
||||
entityplayer.showEndCredits();
|
||||
return;
|
||||
@@ -74,11 +90,11 @@
|
||||
|
||||
@Override
|
||||
public TeleportTransition getPortalDestination(ServerLevel world, Entity entity, BlockPos pos) {
|
||||
|
@ -49,7 +53,7 @@
|
|||
} else {
|
||||
boolean flag = resourcekey == Level.END;
|
||||
BlockPos blockposition1 = flag ? ServerLevel.END_SPAWN_POINT : worldserver1.getSharedSpawnPos();
|
||||
@@ -87,7 +102,7 @@
|
||||
@@ -87,7 +103,7 @@
|
||||
Set set;
|
||||
|
||||
if (flag) {
|
||||
|
@ -58,7 +62,7 @@
|
|||
f = Direction.WEST.toYRot();
|
||||
set = Relative.union(Relative.DELTA, Set.of(Relative.X_ROT));
|
||||
if (entity instanceof ServerPlayer) {
|
||||
@@ -99,13 +114,21 @@
|
||||
@@ -99,13 +115,21 @@
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
|
|
Loading…
Reference in a new issue