- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.8k
 
Fix allowEnteringNetherUsingPortals gamerule not being respected #13263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix allowEnteringNetherUsingPortals gamerule not being respected #13263
Conversation
| 
           The question would generally be, where is the OG check for this and why isn't it doing what is expected here? Looks like the OG check just needs to consider the level when it gets the gamemode, no need to manually patch this in  | 
    
| 
           I think that is because there is a new gamerule since 1.21.9 and not just the config file.  | 
    
| 
           Yes, but mojang already has this check implemented, it just doesn't consider the level so likely needs to be fixed to get the gamerule value from the level instead of the server  | 
    
| 
           Paper/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch Lines 1277 to 1280 in 9934c17 
 I am pretty sure that is some of the spigot fuckery required to call PortalEvent which I thought we no longer do anyway?  | 
    
| 
           No I think we'd want to revert the CB diff there completely?  | 
    
| 
           I've reverted the CraftBukkit diff completely as suggested. The fix now simply changes  Tested and confirmed working - the   | 
    
          
 which level you fetch the server from does not matter... you are still just defaulting to the servers overworld.  | 
    
| 
           Updated the implementation as requested. The  Changes made: 
 Testing: 
  | 
    
Description
The
allowEnteringNetherUsingPortalsgamerule was being ignored when players attempted to use nether portals. This PR adds a check inNetherPortalBlock#getPortalDestinationto returnnull(preventing teleportation) when the gamerule is set tofalse.Testing
/gamerule allowEnteringNetherUsingPortals falsetrueand confirmed normal portal behavior worksFixes #13261