Keyed cat Type (#7901)
This commit is contained in:
		
					parent
					
						
							
								82fbae146b
							
						
					
				
			
			
				commit
				
					
						ae952f4189
					
				
			
		
					 1 changed files with 40 additions and 0 deletions
				
			
		
							
								
								
									
										40
									
								
								patches/api/Keyed-Cat-Type.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								patches/api/Keyed-Cat-Type.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
 | 
			
		||||
Date: Wed, 8 Jun 2022 18:23:17 -0400
 | 
			
		||||
Subject: [PATCH] Keyed Cat Type
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
 | 
			
		||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 | 
			
		||||
--- a/src/main/java/org/bukkit/entity/Cat.java
 | 
			
		||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
 | 
			
		||||
     /**
 | 
			
		||||
      * Represents the various different cat types there are.
 | 
			
		||||
      */
 | 
			
		||||
-    public enum Type {
 | 
			
		||||
+    public enum Type implements org.bukkit.Keyed { // Paper
 | 
			
		||||
         TABBY,
 | 
			
		||||
         BLACK,
 | 
			
		||||
         RED,
 | 
			
		||||
@@ -0,0 +0,0 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
 | 
			
		||||
         WHITE,
 | 
			
		||||
         JELLIE,
 | 
			
		||||
         ALL_BLACK;
 | 
			
		||||
+
 | 
			
		||||
+        // Paper start
 | 
			
		||||
+        private final org.bukkit.NamespacedKey key;
 | 
			
		||||
+
 | 
			
		||||
+        Type() {
 | 
			
		||||
+            this.key = org.bukkit.NamespacedKey.minecraft(name().toLowerCase(java.util.Locale.ROOT));
 | 
			
		||||
+        }
 | 
			
		||||
+
 | 
			
		||||
+        @NotNull
 | 
			
		||||
+        @Override
 | 
			
		||||
+        public org.bukkit.NamespacedKey getKey() {
 | 
			
		||||
+            return key;
 | 
			
		||||
+        }
 | 
			
		||||
+        // Paper end
 | 
			
		||||
     }
 | 
			
		||||
 
 | 
			
		||||
     // Paper Start - More cat api
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue