level
is a getter now
This commit is contained in:
parent
40ab94d4fe
commit
37e69ca6b2
4 changed files with 9 additions and 9 deletions
|
@ -39,8 +39,8 @@ public class CustomFogRenderer {
|
||||||
}
|
}
|
||||||
Entity entity = camera.getEntity();
|
Entity entity = camera.getEntity();
|
||||||
|
|
||||||
if (!isForcedDimension(entity.level) && shouldIgnoreArea(
|
if (!isForcedDimension(entity.level()) && shouldIgnoreArea(
|
||||||
entity.level,
|
entity.level(),
|
||||||
(int) entity.getX(),
|
(int) entity.getX(),
|
||||||
(int) entity.getEyeY(),
|
(int) entity.getEyeY(),
|
||||||
(int) entity.getZ()
|
(int) entity.getZ()
|
||||||
|
@ -50,14 +50,14 @@ public class CustomFogRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
float fog = getFogDensity(
|
float fog = getFogDensity(
|
||||||
entity.level,
|
entity.level(),
|
||||||
entity.getX(),
|
entity.getX(),
|
||||||
entity.getEyeY(),
|
entity.getEyeY(),
|
||||||
entity.getZ()
|
entity.getZ()
|
||||||
) * Configs.CLIENT_CONFIG.fogDensity();
|
) * Configs.CLIENT_CONFIG.fogDensity();
|
||||||
BackgroundInfo.fogDensity = fog;
|
BackgroundInfo.fogDensity = fog;
|
||||||
|
|
||||||
if (thickFog(thickFog, entity.level)) {
|
if (thickFog(thickFog, entity.level())) {
|
||||||
fogStart = viewDistance * 0.05F / fog;
|
fogStart = viewDistance * 0.05F / fog;
|
||||||
fogEnd = Math.min(viewDistance, 192.0F) * 0.5F / fog;
|
fogEnd = Math.min(viewDistance, 192.0F) * 0.5F / fog;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public interface BCLElytraItem extends FabricElytraItem {
|
||||||
static void vanillaElytraTick(LivingEntity entity, ItemStack chestStack) {
|
static void vanillaElytraTick(LivingEntity entity, ItemStack chestStack) {
|
||||||
int nextRoll = entity.getFallFlyingTicks() + 1;
|
int nextRoll = entity.getFallFlyingTicks() + 1;
|
||||||
|
|
||||||
if (!entity.level.isClientSide && nextRoll % 10 == 0) {
|
if (!entity.level().isClientSide && nextRoll % 10 == 0) {
|
||||||
if ((nextRoll / 10) % 2 == 0) {
|
if ((nextRoll / 10) % 2 == 0) {
|
||||||
chestStack.hurtAndBreak(1, entity, (e) -> BCLElytraUtils.onBreak.accept(e, chestStack));
|
chestStack.hurtAndBreak(1, entity, (e) -> BCLElytraUtils.onBreak.accept(e, chestStack));
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,8 +124,8 @@ public abstract class AnvilMenuMixin extends ItemCombinerMenu implements AnvilSc
|
||||||
|
|
||||||
@Inject(method = "createResult", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "createResult", at = @At("HEAD"), cancellable = true)
|
||||||
public void bcl_updateOutput(CallbackInfo info) {
|
public void bcl_updateOutput(CallbackInfo info) {
|
||||||
RecipeManager recipeManager = this.player.level.getRecipeManager();
|
RecipeManager recipeManager = this.player.level().getRecipeManager();
|
||||||
be_recipes = recipeManager.getRecipesFor(AnvilRecipe.TYPE, inputSlots, player.level);
|
be_recipes = recipeManager.getRecipesFor(AnvilRecipe.TYPE, inputSlots, player.level());
|
||||||
if (be_recipes.size() > 0) {
|
if (be_recipes.size() > 0) {
|
||||||
int anvilLevel = this.anvilLevel.get();
|
int anvilLevel = this.anvilLevel.get();
|
||||||
be_recipes = be_recipes.stream()
|
be_recipes = be_recipes.stream()
|
||||||
|
@ -164,7 +164,7 @@ public abstract class AnvilMenuMixin extends ItemCombinerMenu implements AnvilSc
|
||||||
|
|
||||||
private void bcl_updateResult() {
|
private void bcl_updateResult() {
|
||||||
if (bcl_currentRecipe == null) return;
|
if (bcl_currentRecipe == null) return;
|
||||||
resultSlots.setItem(0, bcl_currentRecipe.assemble(inputSlots, this.player.level.registryAccess()));
|
resultSlots.setItem(0, bcl_currentRecipe.assemble(inputSlots, this.player.level().registryAccess()));
|
||||||
broadcastChanges();
|
broadcastChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public abstract class BoatMixin extends Entity implements CustomBoatTypeOverride
|
||||||
void bcl_checkFallDamage(double d, boolean bl, BlockState blockState, BlockPos blockPos, CallbackInfo ci) {
|
void bcl_checkFallDamage(double d, boolean bl, BlockState blockState, BlockPos blockPos, CallbackInfo ci) {
|
||||||
BoatTypeOverride type = this.bcl_getCustomType();
|
BoatTypeOverride type = this.bcl_getCustomType();
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
this.spawnAtLocation(type.getPlanks());
|
this.spawnAtLocation(type.getPlanks());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue