Cleanup
This commit is contained in:
parent
34e7c442e4
commit
36ea4b8726
8 changed files with 32 additions and 57 deletions
|
@ -28,10 +28,10 @@ public class BackgroundRendererMixin {
|
|||
private static float fogEnd;
|
||||
private static float lerp;
|
||||
|
||||
private static final float SKY_RED = 21F / 255F;
|
||||
private static final float SKY_GREEN = 16F / 255F;
|
||||
private static final float SKY_BLUE = 20F / 255F;
|
||||
//private static final float NORMAL = 0.12757292F;
|
||||
//private static final float SKY_RED = 21F / 255F;
|
||||
//private static final float SKY_GREEN = 16F / 255F;
|
||||
//private static final float SKY_BLUE = 20F / 255F;
|
||||
private static final float NORMAL = 1.5F/ 0.12757292F; // 0.12757292F is max value for red channel after all transformations
|
||||
|
||||
@Shadow
|
||||
private static float red;
|
||||
|
@ -47,10 +47,10 @@ public class BackgroundRendererMixin {
|
|||
|
||||
FluidState fluidState = camera.getSubmergedFluidState();
|
||||
if (fluidState.isEmpty() && world.getDimension().hasEnderDragonFight()) {
|
||||
RenderSystem.clearColor(SKY_RED, SKY_GREEN, SKY_BLUE, 0);
|
||||
//red /= NORMAL;
|
||||
//green /= NORMAL;
|
||||
//blue /= NORMAL;
|
||||
//RenderSystem.clearColor(SKY_RED, SKY_GREEN, SKY_BLUE, 0);
|
||||
red *= NORMAL;
|
||||
green *= NORMAL;
|
||||
blue *= NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ import ru.betterend.world.generator.BetterEndBiomeSource;
|
|||
public class DimensionTypeMixin
|
||||
{
|
||||
@Inject(method = "createEndGenerator", at = @At("HEAD"), cancellable = true)
|
||||
private static void replaceGenerator(Registry<Biome> biomeRegistry, Registry<ChunkGeneratorSettings> chunkGeneratorSettingsRegistry, long seed, CallbackInfoReturnable<ChunkGenerator> info)
|
||||
{
|
||||
private static void replaceGenerator(Registry<Biome> biomeRegistry, Registry<ChunkGeneratorSettings> chunkGeneratorSettingsRegistry, long seed, CallbackInfoReturnable<ChunkGenerator> info) {
|
||||
info.setReturnValue(new NoiseChunkGenerator(new BetterEndBiomeSource(biomeRegistry, seed), seed, () -> {
|
||||
return (ChunkGeneratorSettings) chunkGeneratorSettingsRegistry.getOrThrow(ChunkGeneratorSettings.END);
|
||||
}));
|
||||
|
|
|
@ -27,23 +27,22 @@ import net.minecraft.world.World;
|
|||
import ru.betterend.recipe.EndRecipeManager;
|
||||
|
||||
@Mixin(RecipeManager.class)
|
||||
public class RecipeManagerMixin
|
||||
{
|
||||
public class RecipeManagerMixin {
|
||||
@Shadow
|
||||
private Map<RecipeType<?>, Map<Identifier, Recipe<?>>> recipes;
|
||||
|
||||
|
||||
@Inject(method = "apply", at = @At(value = "RETURN"))
|
||||
private void setRecipes(Map<Identifier, JsonElement> map, ResourceManager resourceManager, Profiler profiler, CallbackInfo info)
|
||||
{
|
||||
private void setRecipes(Map<Identifier, JsonElement> map, ResourceManager resourceManager, Profiler profiler, CallbackInfo info) {
|
||||
recipes = EndRecipeManager.getMap(recipes);
|
||||
}
|
||||
|
||||
|
||||
@Shadow
|
||||
private <C extends Inventory, T extends Recipe<C>> Map<Identifier, Recipe<C>> getAllOfType(RecipeType<T> type) { return null; }
|
||||
|
||||
private <C extends Inventory, T extends Recipe<C>> Map<Identifier, Recipe<C>> getAllOfType(RecipeType<T> type) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Overwrite
|
||||
public <C extends Inventory, T extends Recipe<C>> Optional<T> getFirstMatch(RecipeType<T> type, C inventory, World world)
|
||||
{
|
||||
public <C extends Inventory, T extends Recipe<C>> Optional<T> getFirstMatch(RecipeType<T> type, C inventory, World world) {
|
||||
Collection<Recipe<C>> values = getAllOfType(type).values();
|
||||
List<Recipe<C>> list = new ArrayList<Recipe<C>>(values);
|
||||
list.sort((v1, v2) -> {
|
||||
|
@ -51,9 +50,9 @@ public class RecipeManagerMixin
|
|||
boolean b2 = v2.getId().getNamespace().equals("minecraft");
|
||||
return b1 ^ b2 ? (b1 ? 1 : -1) : 0;
|
||||
});
|
||||
|
||||
|
||||
return list.stream().flatMap((recipe) -> {
|
||||
return Util.stream(type.get(recipe, world, inventory));
|
||||
}).findFirst();
|
||||
}
|
||||
return Util.stream(type.get(recipe, world, inventory));
|
||||
}).findFirst();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue