@@ -101,16 +101,12 @@ public void onInitialize() {
101101 conditionFeatures .put (CustomWoolFeature .ID , data -> new CustomWoolFeature (Identifier .tryParse (data .get ("texture" ).getAsString ())));
102102 conditionFeatures .put (CustomShearedWoolFeature .ID , data -> new CustomShearedWoolFeature (Identifier .tryParse (data .get ("texture" ).getAsString ())));
103103
104-
105104 featureDeserializers .put (CustomEyesFeature .ID , CustomEyesFeature ::deserialize );
106105 featureDeserializers .put (CustomLightingFeature .ID , CustomLightingFeature ::deserialize );
107106 featureDeserializers .put (CustomRenderLayerFeature .ID , CustomRenderLayerFeature ::deserialize );
108107 featureDeserializers .put (CustomWoolFeature .ID , CustomWoolFeature ::deserialize );
109108 featureDeserializers .put (CustomShearedWoolFeature .ID , CustomShearedWoolFeature ::deserialize );
110109
111-
112-
113-
114110 /*ServerLifecycleEvents.SYNC_DATA_PACK_CONTENTS.register(VariantAPI.id("sync_variants"), (player, joined) -> {
115111 ServerPlayNetworking.send(player, new S2CResetVariants());
116112 VariantAPI.variantPacketQueue.forEach((packet) -> ServerPlayNetworking.send(player, packet));
@@ -169,10 +165,6 @@ public static ArrayList<Variant> getSuitable(ArrayList<Variant> variantsToChoose
169165 sorted .add (variant );
170166 }
171167
172- // Split the random to ensure no off-thread access of ThreadLocalRandom occurs
173- // This fixes issues with Distant Horizons and C2ME
174- //var random = new CheckedRandom(randomSeed);
175- // Handle modifiers
176168 Iterator <Variant > i = sorted .iterator ();
177169 Variant variant ;
178170 while (i .hasNext ()) {
@@ -184,59 +176,7 @@ public static ArrayList<Variant> getSuitable(ArrayList<Variant> variantsToChoose
184176 continue ;
185177 }
186178 }
187-
188- // Discard if not in spawn biome
189- /*if (spawnBiome != null && variant.hasSpawnableBiomeModifier()) {
190- if (!variant.isInSpawnBiome(spawnBiome)) {
191- i.remove();
192- continue;
193- }
194- }*/
195-
196- // Discard if special breeding result (handled later)
197- /*if (variant.hasBreedingResultModifier()) {
198- i.remove();
199- continue;
200- }*/
201-
202- // Discard if variant is discardable
203- /*if (variant.shouldDiscard(random)) {
204- i.remove();
205- continue;
206- }*/
207-
208- // Discord if variant has nametag override
209- // Note: they shouldn't be in this pool in the first place, but better safe than sorry
210- /*if (variant.isNametagOverride()) {
211- i.remove();
212- continue;
213- }*/
214179 }
215-
216- // Create weighted bag from variants
217- //VariantBag bag = new VariantBag(mob, variants);
218-
219- // If we've been provided 2 parents
220- /*if (breedingResultData != null) {
221- // Collect all specialized breeding combination results
222- List<MobVariant> possibleVariants = new ArrayList<>();
223- for (MobVariant v : getVariants(mob)) {
224- if (v.hasBreedingResultModifier() && v.canBreed(breedingResultData.parent1(), breedingResultData.parent2()) && v.shouldBreed(random)) {
225- possibleVariants.add(v);
226- }
227- }
228-
229- // If there are no specialized results, handle generic breeding case
230- if (possibleVariants.isEmpty()) {
231- if (random.nextDouble() >= VariantSettings.getChildRandomVariantChance()) {
232- return random.nextBoolean() ? breedingResultData.parent1() : breedingResultData.parent2();
233- }
234- } else { // If there are specialized results, switch to that pool
235- bag = new VariantBag(mob, possibleVariants);
236- }
237- }*/
238-
239- //return bag.getRandomEntry(random);
240180 //testLootCondition(context.getSource(), IdentifierArgumentType.getPredicateArgument(context, "predicate"))
241181 return sorted ;
242182 }
0 commit comments