Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.

lv 0 irid fix; pawn loot tweak

+10 -6
+6 -1
common/src/main/java/net/lerariemann/infinity/entity/custom/ChaosPawn.java
··· 5 5 import net.lerariemann.infinity.util.RandomProvider; 6 6 import net.minecraft.block.BlockState; 7 7 import net.minecraft.block.Blocks; 8 + import net.minecraft.component.ComponentMap; 9 + import net.minecraft.component.DataComponentTypes; 8 10 import net.minecraft.entity.EntityData; 9 11 import net.minecraft.entity.EntityType; 10 12 import net.minecraft.entity.LivingEntity; ··· 18 20 import net.minecraft.entity.data.TrackedDataHandlerRegistry; 19 21 import net.minecraft.entity.mob.*; 20 22 import net.minecraft.entity.player.PlayerEntity; 23 + import net.minecraft.item.ItemStack; 21 24 import net.minecraft.loot.LootTable; 22 25 import net.minecraft.nbt.NbtCompound; 23 26 import net.minecraft.predicate.entity.EntityPredicates; ··· 233 236 if (!this.isChess()) { 234 237 String s = RandomProvider.getProvider(Objects.requireNonNull(world.getServer())).registry.get("items").getRandomElement(world.random); 235 238 double i = Objects.requireNonNull(this.getAttributeInstance(EntityAttributes.GENERIC_MAX_HEALTH)).getBaseValue() / 10; 236 - this.dropStack(Registries.ITEM.get(Identifier.of(s)).getDefaultStack().copyWithCount((int)(i*i))); 239 + ItemStack stack = Registries.ITEM.get(Identifier.of(s)).getDefaultStack().copyWithCount((int)(i*i)); 240 + stack.applyComponentsFrom(ComponentMap.builder().add(DataComponentTypes.MAX_STACK_SIZE, 64).build()); 241 + this.dropStack(stack); 237 242 } 238 243 } 239 244
+2 -2
common/src/main/java/net/lerariemann/infinity/iridescence/Iridescence.java
··· 51 51 52 52 public static int color(BlockPos pos) { 53 53 int i = pos.getX() + pos.getY() + pos.getZ(); 54 - return Color.HSBtoRGB(i / 600.0f + (float)((Math.sin(pos.getX()/12.0f) + Math.sin(pos.getZ()/12.0f)) / 4), 1.0F, 1.0F); 54 + return Color.HSBtoRGB(i / 600.0f + (float)((Math.sin(pos.getX()/12.0f) + Math.sin(pos.getY()/12.0f) + Math.sin(pos.getZ()/12.0f)) / 4) , 1.0F, 1.0F); 55 55 } 56 56 57 57 public static java.util.List<String> colors = List.of("minecraft:white_", ··· 111 111 } 112 112 113 113 public static boolean shouldUpdateShader(int duration, int amplifier) { 114 - return getEffectLength(amplifier) - duration == ticksInHour; 114 + return getEffectLength(amplifier) - duration == ticksInHour - 1; 115 115 } 116 116 117 117 public static void updateShader(ServerPlayerEntity player) {
+2 -3
common/src/main/java/net/lerariemann/infinity/iridescence/IridescentEffect.java
··· 28 28 if (entity.hasStatusEffect(ModStatusEffects.IRIDESCENT_SETUP)) { 29 29 entity.removeStatusEffect(ModStatusEffects.IRIDESCENT_SETUP); 30 30 } 31 - if (entity instanceof Angerable ang) { 32 - ang.stopAnger(); 33 - } 31 + if (entity instanceof Angerable ang) ang.stopAnger(); 32 + if (entity instanceof ServerPlayerEntity player) Iridescence.updateShader(player); 34 33 } 35 34 36 35 public void onRemoved(LivingEntity entity) {