File tree Expand file tree Collapse file tree
common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_5to1_21_4/rewriter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,6 +168,36 @@ protected void registerRewrites() {
168168 final Holder <WolfVariant > variant = Holder .of (type );
169169 data .setTypeAndValue (mappedEntityDataTypes .wolfVariantType , variant );
170170 return ;
171+ } else if (id == entityDataTypes .frogVariantType .typeId ()) {
172+ final int value = data .value ();
173+ final String variantKey = protocol .getRegistryDataRewriter ().getMappings ("frog_variant" ).idToKey (value );
174+ final int newValue = (variantKey == null ) ? 0 : switch (variantKey ) {
175+ case "cold" -> 2 ;
176+ case "temperate" -> 0 ;
177+ case "warm" -> 1 ;
178+ default -> 0 ;
179+ };
180+ data .setTypeAndValue (mappedEntityDataTypes .frogVariantType , newValue );
181+ return ;
182+ } else if (id == entityDataTypes .catVariantType .typeId ()) {
183+ final int value = data .value ();
184+ final String variantKey = protocol .getRegistryDataRewriter ().getMappings ("cat_variant" ).idToKey (value );
185+ final int newValue = (variantKey == null ) ? 1 : switch (variantKey ) {
186+ case "all_black" -> 10 ;
187+ case "black" -> 1 ;
188+ case "british_shorthair" -> 4 ;
189+ case "calico" -> 5 ;
190+ case "jellie" -> 9 ;
191+ case "persian" -> 6 ;
192+ case "ragdoll" -> 7 ;
193+ case "red" -> 2 ;
194+ case "siamese" -> 3 ;
195+ case "tabby" -> 0 ;
196+ case "white" -> 8 ;
197+ default -> 1 ;
198+ };
199+ data .setTypeAndValue (mappedEntityDataTypes .catVariantType , newValue );
200+ return ;
171201 }
172202
173203 int mappedId = id ;
You can’t perform that action at this time.
0 commit comments