Browse Source

basis 1.15.2

pull/3/head
quek 6 months ago
parent
commit
929b5919e8
17 changed files with 69 additions and 82 deletions
  1. +2
    -2
      build.gradle
  2. +3
    -2
      gradle/wrapper/gradle-wrapper.properties
  3. +1
    -1
      src/main/java/com/aether/biome/AetherBiomes.java
  4. +16
    -9
      src/main/java/com/aether/biome/AetherVoidBiome.java
  5. +4
    -3
      src/main/java/com/aether/client/ClientProxy.java
  6. +1
    -1
      src/main/java/com/aether/client/renderer/entity/FloatingBlockRenderer.java
  7. +1
    -1
      src/main/java/com/aether/client/renderer/entity/MimicRenderer.java
  8. +1
    -1
      src/main/java/com/aether/client/renderer/entity/SentryRenderer.java
  9. +6
    -5
      src/main/java/com/aether/entity/item/FloatingBlockEntity.java
  10. +1
    -1
      src/main/java/com/aether/entity/monster/MimicEntity.java
  11. +3
    -3
      src/main/java/com/aether/entity/monster/SentryEntity.java
  12. +11
    -20
      src/main/java/com/aether/item/AetherArmorMaterial.java
  13. +9
    -12
      src/main/java/com/aether/item/AetherItemTier.java
  14. +3
    -3
      src/main/java/com/aether/item/PigSlayerItem.java
  15. +2
    -13
      src/main/java/com/aether/world/AetherDimension.java
  16. +1
    -1
      src/main/java/com/aether/world/AetherDimensions.java
  17. +4
    -4
      src/main/java/com/aether/world/gen/AetherChunkGenerator.java

+ 2
- 2
build.gradle View File

@@ -25,7 +25,7 @@ minecraft {
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'snapshot', version: '20190719-1.14.3'
mappings channel: 'snapshot', version: '20200710-1.15.1'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
@@ -89,7 +89,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.14.4-28.1.114'
minecraft 'net.minecraftforge:forge:1.15.2-31.2.31'

// You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier"


+ 3
- 2
gradle/wrapper/gradle-wrapper.properties View File

@@ -1,5 +1,6 @@
#Fri Jul 10 15:58:51 CDT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
zipStoreBase=GRADLE_USER_HOME

+ 1
- 1
src/main/java/com/aether/biome/AetherBiomes.java View File

@@ -9,7 +9,7 @@ import net.minecraftforge.registries.ForgeRegistries;

public class AetherBiomes {

public static final DeferredRegister<Biome> BIOMES = new DeferredRegister<>(ForgeRegistries.BIOMES, Aether.MODID);
public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, Aether.MODID);

public static final RegistryObject<Biome> AETHER_VOID = BIOMES.register("aether_void", AetherVoidBiome::new);


+ 16
- 9
src/main/java/com/aether/biome/AetherVoidBiome.java View File

@@ -4,14 +4,15 @@ import com.aether.block.AetherBlocks;
import net.minecraft.block.Blocks;
import net.minecraft.block.pattern.BlockMatcher;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.BlockStateFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.LakesConfig;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.placement.ChanceConfig;
import net.minecraft.world.gen.placement.CountRangeConfig;
import net.minecraft.world.gen.placement.LakeChanceConfig;
import net.minecraft.world.gen.placement.Placement;
import net.minecraft.world.gen.surfacebuilders.DefaultSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
@@ -35,13 +36,13 @@ public class AetherVoidBiome extends Biome {
.waterFogColor(329011)
.parent((null))
);
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, Biome.createDecoratedFeature(Feature.LAKE, new LakesConfig(Blocks.WATER.getDefaultState()), Placement.WATER_LAKE, new LakeChanceConfig(4)));
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, Feature.LAKE.withConfiguration(new BlockStateFeatureConfig(Blocks.WATER.getDefaultState())).withPlacement(Placement.WATER_LAKE.configure(new ChanceConfig(4))));

this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.AETHER_DIRT.getDefaultState(), 32), Placement.COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.AMBROSIUM_ORE.getDefaultState(), 16), Placement.COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.ICESTONE.getDefaultState(), 16), Placement.COUNT_RANGE, new CountRangeConfig(10, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.ZANITE_ORE.getDefaultState(), 8), Placement.COUNT_RANGE, new CountRangeConfig(10, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.GRAVITITE_ORE.getDefaultState(), 6), Placement.COUNT_RANGE, new CountRangeConfig(10, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.AETHER_DIRT.getDefaultState(), 32)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(20, 0, 0, 128))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.AMBROSIUM_ORE.getDefaultState(), 16)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(20, 0, 0, 128))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.ICESTONE.getDefaultState(), 16)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(10, 0, 0, 128))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.ZANITE_ORE.getDefaultState(), 8)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(10, 0, 0, 128))));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(new OreFeatureConfig(HOLYSTONE_FILLER, AetherBlocks.GRAVITITE_ORE.getDefaultState(), 6)).withPlacement(Placement.COUNT_RANGE.configure(new CountRangeConfig(10, 0, 0, 128))));

//TODO: make this toggleable with config like in 1.12
DefaultBiomeFeatures.addGrass(this);
@@ -49,7 +50,13 @@ public class AetherVoidBiome extends Biome {

@Override
@OnlyIn(Dist.CLIENT)
public int getGrassColor(BlockPos pos) {
public int getSkyColor() {
return 0xBCBCFA;
}

@Override
@OnlyIn(Dist.CLIENT)
public int getGrassColor(double x, double z) {
return 0xb1ffcb;
}



+ 4
- 3
src/main/java/com/aether/client/ClientProxy.java View File

@@ -6,6 +6,7 @@ import com.aether.client.gui.screen.inventory.EnchanterScreen;
import com.aether.client.renderer.entity.FloatingBlockRenderer;
import com.aether.client.renderer.entity.MimicRenderer;
import com.aether.client.renderer.entity.SentryRenderer;
import com.aether.entity.AetherEntityTypes;
import com.aether.entity.item.FloatingBlockEntity;
import com.aether.entity.monster.MimicEntity;
import com.aether.entity.monster.SentryEntity;
@@ -45,9 +46,9 @@ public class ClientProxy extends CommonProxy {
}
private void registerEntityRenderers() {
RenderingRegistry.registerEntityRenderingHandler(FloatingBlockEntity.class, FloatingBlockRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(MimicEntity.class, MimicRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(SentryEntity.class, SentryRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(AetherEntityTypes.FLOATING_BLOCK, FloatingBlockRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(AetherEntityTypes.MIMIC, MimicRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(AetherEntityTypes.SENTRY, SentryRenderer::new);
}
private void registerGuiFactories() {


+ 1
- 1
src/main/java/com/aether/client/renderer/entity/FloatingBlockRenderer.java View File

@@ -71,7 +71,7 @@ public class FloatingBlockRenderer extends EntityRenderer<FloatingBlockEntity> {
}

@Override
protected ResourceLocation getEntityTexture(FloatingBlockEntity entity) {
public ResourceLocation getEntityTexture(FloatingBlockEntity entity) {
return AtlasTexture.LOCATION_BLOCKS_TEXTURE;
}



+ 1
- 1
src/main/java/com/aether/client/renderer/entity/MimicRenderer.java View File

@@ -29,7 +29,7 @@ public class MimicRenderer extends MobRenderer<MimicEntity, MimicModel> {
}

@Override
protected ResourceLocation getEntityTexture(MimicEntity entity) {
public ResourceLocation getEntityTexture(MimicEntity entity) {
return isChristmas? XMAS_TEXTURE : TEXTURE;
}


+ 1
- 1
src/main/java/com/aether/client/renderer/entity/SentryRenderer.java View File

@@ -24,7 +24,7 @@ public class SentryRenderer extends MobRenderer<SentryEntity, SlimeModel<SentryE
}

@Override
protected ResourceLocation getEntityTexture(SentryEntity entity) {
public ResourceLocation getEntityTexture(SentryEntity entity) {
return entity.isAwake()? TEXTURE_LIT : TEXTURE;
}


+ 6
- 5
src/main/java/com/aether/entity/item/FloatingBlockEntity.java View File

@@ -114,9 +114,9 @@ public class FloatingBlockEntity extends Entity implements IEntityAdditionalSpaw
this.remove();
}
else {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.prevPosX = this.getPosX();
this.prevPosY = this.getPosY();
this.prevPosZ = this.getPosZ();
Block block = this.floatTile.getBlock();
if (this.floatTime++ == 0) {
BlockPos blockpos = new BlockPos(this);
@@ -142,7 +142,7 @@ public class FloatingBlockEntity extends Entity implements IEntityAdditionalSpaw
if (flag && d0 > 1.0D) {
BlockRayTraceResult blockraytraceresult = this.world
.rayTraceBlocks(new RayTraceContext(new Vec3d(this.prevPosX, this.prevPosY, this.prevPosZ),
new Vec3d(this.posX, this.posY, this.posZ), RayTraceContext.BlockMode.COLLIDER,
new Vec3d(this.getPosX(), this.getPosY(), this.getPosZ()), RayTraceContext.BlockMode.COLLIDER,
RayTraceContext.FluidMode.SOURCE_ONLY, this));
if (blockraytraceresult.getType() != RayTraceResult.Type.MISS
&& this.world.getFluidState(blockraytraceresult.getPos()).isTagged(FluidTags.WATER)) {
@@ -215,7 +215,7 @@ public class FloatingBlockEntity extends Entity implements IEntityAdditionalSpaw
}
@Override
public void fall(float distance, float damageMultiplier) {
public boolean onLivingFall(float distance, float damageMultiplier) {
if (this.hurtEntities) {
int i = MathHelper.ceil(distance - 1.0f);
if (i > 0) {
@@ -238,6 +238,7 @@ public class FloatingBlockEntity extends Entity implements IEntityAdditionalSpaw
}
}
}
return false;
}

@Override


+ 1
- 1
src/main/java/com/aether/entity/monster/MimicEntity.java View File

@@ -62,7 +62,7 @@ public class MimicEntity extends CreatureEntity {
}
if (source.getImmediateSource() instanceof LivingEntity && this.hurtTime == 0) {
if (this.world instanceof ServerWorld) {
((ServerWorld) this.world).spawnParticle(new BlockParticleData(ParticleTypes.BLOCK, AetherDungeonFeature.Decorations.CHEST.getDefaultState()), this.posX, this.posY + this.getHeight() / 1.5, this.posZ, 20, this.getWidth() / 4.0, this.getHeight() / 4.0, this.getWidth() / 4.0, 0.05);
((ServerWorld) this.world).spawnParticle(new BlockParticleData(ParticleTypes.BLOCK, AetherDungeonFeature.Decorations.CHEST.getDefaultState()), this.getPosX(), this.getPosY() + this.getHeight() / 1.5, this.getPosZ(), 20, this.getWidth() / 4.0, this.getHeight() / 4.0, this.getWidth() / 4.0, 0.05);
}
LivingEntity attacker = (LivingEntity) source.getImmediateSource();


+ 3
- 3
src/main/java/com/aether/entity/monster/SentryEntity.java View File

@@ -45,7 +45,7 @@ public class SentryEntity extends SlimeEntity {
this.goalSelector.addGoal(5, new SentryEntity.HopGoal(this));
this.targetSelector.addGoal(1,
new NearestAttackableTargetGoal<>(this, PlayerEntity.class, 10, true, false, (p_213811_1_) -> {
return Math.abs(p_213811_1_.posY - this.posY) <= 4.0D;
return Math.abs(p_213811_1_.getPosY() - this.getPosY()) <= 4.0D;
}));
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolemEntity.class, true));
}
@@ -65,7 +65,7 @@ public class SentryEntity extends SlimeEntity {
@Override
public void tick() {
if (this.world.getClosestPlayer(this.posX, this.posY, this.posZ, 8.0, EntityPredicates.CAN_AI_TARGET) != null) {
if (this.world.getClosestPlayer(this.getPosX(), this.getPosY(), this.getPosZ(), 8.0, EntityPredicates.CAN_AI_TARGET) != null) {
if (!this.isAwake()) {
if (this.timeSpotted >= 24) {
this.setAwake(true);
@@ -103,7 +103,7 @@ public class SentryEntity extends SlimeEntity {
if (this.isAwake() && this.canEntityBeSeen(entityIn) && entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), 1.0f) && this.ticksExisted > 20) {
entityIn.addVelocity(0.5, 0.5, 0.5);
this.world.createExplosion(this, this.posX, this.posY, this.posZ, 0.1f, Explosion.Mode.DESTROY);
this.world.createExplosion(this, this.getPosX(), this.getPosY(), this.getPosZ(), 0.1f, Explosion.Mode.DESTROY);
this.setHealth(0.0f);
this.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 1.0f, 0.2f*(this.rand.nextFloat() - this.rand.nextFloat()) + 1);
this.applyEnchantments(this, entityIn);


+ 11
- 20
src/main/java/com/aether/item/AetherArmorMaterial.java View File

@@ -1,7 +1,5 @@
package com.aether.item;

import java.util.function.Supplier;

import com.aether.Aether;
import com.aether.block.AetherBlocks;

@@ -9,33 +7,26 @@ import net.minecraft.block.Blocks;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.IArmorMaterial;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.LazyLoadBase;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

public enum AetherArmorMaterial implements IArmorMaterial {
// LEATHER("leather", 5, new int[] { 1, 2, 3, 1 }, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F,
// () -> Ingredient.fromItems(Items.LEATHER)),
// CHAIN("chainmail", 15, new int[] { 1, 4, 5, 2 }, 12, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0.0F,
// () -> Ingredient.fromItems(Items.IRON_INGOT)),
ZANITE("zanite", 15, new int[] { 2, 5, 6, 2 }, 9, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F,
() -> Ingredient.fromItems(AetherItems.ZANITE_GEMSTONE)),
// GOLD("gold", 7, new int[] { 1, 3, 5, 2 }, 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F,
// () -> Ingredient.fromItems(Items.GOLD_INGOT)),
Ingredient.fromItems(AetherItems.ZANITE_GEMSTONE)),
GRAVITITE("gravitite", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F,
() -> Ingredient.fromItems(AetherBlocks.ENCHANTED_GRAVITITE)),
Ingredient.fromItems(AetherBlocks.ENCHANTED_GRAVITITE)),
VALKYRIE("valkyrie", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0f,
() -> Ingredient.EMPTY),
Ingredient.EMPTY),
NEPTUNE("neptune", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0.0f,
() -> Ingredient.EMPTY),
Ingredient.EMPTY),
PHOENIX("phoenix", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0.0f,
() -> Ingredient.EMPTY),
Ingredient.EMPTY),
OBSIDIAN("obsidian", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0f,
() -> Ingredient.fromItems(Blocks.OBSIDIAN)),
Ingredient.fromItems(Blocks.OBSIDIAN)),
SENTRY("sentry", 33, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0f,
() -> Ingredient.EMPTY);
Ingredient.EMPTY);

private static final int[] MAX_DAMAGE_ARRAY = new int[] { 13, 15, 16, 11 };
private final String name;
@@ -44,17 +35,17 @@ public enum AetherArmorMaterial implements IArmorMaterial {
private final int enchantability;
private final SoundEvent soundEvent;
private final float toughness;
private final LazyLoadBase<Ingredient> repairMaterial;
private final Ingredient repairMaterial;

private AetherArmorMaterial(String nameIn, int maxDamageFactorIn, int[] damageReductionAmountsIn,
int enchantabilityIn, SoundEvent equipSoundIn, float p_i48533_8_, Supplier<Ingredient> repairMaterialSupplier) {
int enchantabilityIn, SoundEvent equipSoundIn, float p_i48533_8_, Ingredient repairMaterialSupplier) {
this.name = Aether.MODID + ':' + nameIn;
this.maxDamageFactor = maxDamageFactorIn;
this.damageReductionAmountArray = damageReductionAmountsIn;
this.enchantability = enchantabilityIn;
this.soundEvent = equipSoundIn;
this.toughness = p_i48533_8_;
this.repairMaterial = new LazyLoadBase<>(repairMaterialSupplier);
this.repairMaterial = repairMaterialSupplier;
}

@Override
@@ -79,7 +70,7 @@ public enum AetherArmorMaterial implements IArmorMaterial {

@Override
public Ingredient getRepairMaterial() {
return this.repairMaterial.getValue();
return this.repairMaterial;
}

@Override


+ 9
- 12
src/main/java/com/aether/item/AetherItemTier.java View File

@@ -1,36 +1,33 @@
package com.aether.item;

import java.util.function.Supplier;

import com.aether.block.AetherBlocks;

import net.minecraft.item.IItemTier;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.LazyLoadBase;

public enum AetherItemTier implements IItemTier {
SKYROOT(0, 59, 2.0f, 0.0f, 15, () -> Ingredient.fromTag(ItemTags.PLANKS)),
HOLYSTONE(1, 131, 4.0f, 1.0f, 5, () -> Ingredient.fromItems(AetherBlocks.HOLYSTONE)),
ZANITE(2, 250, 6.0f, 2.0f, 14, () -> Ingredient.fromItems(AetherItems.ZANITE_GEMSTONE)),
GRAVITITE(3, 1561, 8.0f, 3.0f, 10, () -> Ingredient.fromItems(AetherBlocks.ENCHANTED_GRAVITITE)),
VALKYRIE(3, 1561, 8.0f, 3.0f, 22, () -> Ingredient.EMPTY);
SKYROOT(0, 59, 2.0f, 0.0f, 15, Ingredient.fromTag(ItemTags.PLANKS)),
HOLYSTONE(1, 131, 4.0f, 1.0f, 5, Ingredient.fromItems(AetherBlocks.HOLYSTONE)),
ZANITE(2, 250, 6.0f, 2.0f, 14, Ingredient.fromItems(AetherItems.ZANITE_GEMSTONE)),
GRAVITITE(3, 1561, 8.0f, 3.0f, 10, Ingredient.fromItems(AetherBlocks.ENCHANTED_GRAVITITE)),
VALKYRIE(3, 1561, 8.0f, 3.0f, 22, Ingredient.EMPTY);

private final int harvestLevel;
private final int maxUses;
private final float efficiency;
private final float attackDamage;
private final int enchantability;
private final LazyLoadBase<Ingredient> repairMaterial;
private final Ingredient repairMaterial;

private AetherItemTier(int harvestLevelIn, int maxUsesIn, float efficiencyIn, float attackDamageIn,
int enchantabilityIn, Supplier<Ingredient> repairMaterialIn) {
int enchantabilityIn, Ingredient repairMaterialIn) {
this.harvestLevel = harvestLevelIn;
this.maxUses = maxUsesIn;
this.efficiency = efficiencyIn;
this.attackDamage = attackDamageIn;
this.enchantability = enchantabilityIn;
this.repairMaterial = new LazyLoadBase<>(repairMaterialIn);
this.repairMaterial = repairMaterialIn;
}

@Override
@@ -60,6 +57,6 @@ public enum AetherItemTier implements IItemTier {

@Override
public Ingredient getRepairMaterial() {
return this.repairMaterial.getValue();
return this.repairMaterial;
}
}

+ 3
- 3
src/main/java/com/aether/item/PigSlayerItem.java View File

@@ -39,9 +39,9 @@ public class PigSlayerItem extends SwordItem {
double d2 = rand.nextGaussian() * 0.02;
double d3 = 5.0;
target.world.addParticle(ParticleTypes.FLAME,
target.posX + (rand.nextFloat() * target.getWidth() * 2.0f) - target.getWidth() - d0 * d3,
target.posY + (rand.nextFloat() * target.getHeight()) - d1 * d3,
target.posZ + (rand.nextFloat() * target.getWidth() * 2.0f) - target.getWidth() - d2 * d3,
target.getPosX() + (rand.nextFloat() * target.getWidth() * 2.0f) - target.getWidth() - d0 * d3,
target.getPosY() + (rand.nextFloat() * target.getHeight()) - d1 * d3,
target.getPosZ() + (rand.nextFloat() * target.getWidth() * 2.0f) - target.getWidth() - d2 * d3,
d0, d1, d2);
}
}


+ 2
- 13
src/main/java/com/aether/world/AetherDimension.java View File

@@ -23,13 +23,13 @@ import net.minecraftforge.api.distmarker.OnlyIn;
public class AetherDimension extends Dimension {

public AetherDimension(World world, DimensionType type) {
super(world, type);
super(world, type, 0);
}

@Override
public ChunkGenerator<?> createChunkGenerator() {
AetherGenSettings aetherGen = new AetherGenSettings();
SingleBiomeProviderSettings providerSettings = new SingleBiomeProviderSettings().setBiome(AetherBiomes.AETHER_VOID.get());
SingleBiomeProviderSettings providerSettings = new SingleBiomeProviderSettings(world.getWorldInfo()).setBiome(AetherBiomes.AETHER_VOID.get());
BiomeProvider provider = new SingleBiomeProvider(providerSettings);
return new AetherChunkGenerator(world, provider, aetherGen);
}
@@ -40,11 +40,6 @@ public class AetherDimension extends Dimension {
return 1F;
}

@Override
public double getHorizon() {
return 0;
}

@Override
public int getSeaLevel() {
return 0;
@@ -75,12 +70,6 @@ public class AetherDimension extends Dimension {
return true;
}

@Override
@OnlyIn(Dist.CLIENT)
public Vec3d getSkyColor(BlockPos p_217382_1_, float p_217382_2_) {
return new Vec3d(0.74, 0.74, 0.98);
}

@Override
@OnlyIn(Dist.CLIENT)
public Vec3d getFogColor(float celestialAngle, float partialTicks) {


+ 1
- 1
src/main/java/com/aether/world/AetherDimensions.java View File

@@ -21,7 +21,7 @@ import net.minecraftforge.registries.ForgeRegistries;

public class AetherDimensions {

public static final DeferredRegister<ModDimension> DIMENSIONS = new DeferredRegister<>(ForgeRegistries.MOD_DIMENSIONS, Aether.MODID);
public static final DeferredRegister<ModDimension> DIMENSIONS = DeferredRegister.create(ForgeRegistries.MOD_DIMENSIONS, Aether.MODID);

private static final RegistryObject<ModDimension> AETHER_DIMENSION_REGISTRY_OBJECT = DIMENSIONS.register("the_aether",
() -> new ModDimension() {


+ 4
- 4
src/main/java/com/aether/world/gen/AetherChunkGenerator.java View File

@@ -11,13 +11,13 @@ public class AetherChunkGenerator extends NoiseChunkGenerator<AetherGenSettings>
}

@Override
protected void func_222548_a(double[] p_222548_1_, int p_222548_2_, int p_222548_3_) {
this.func_222546_a(p_222548_1_, p_222548_2_, p_222548_3_, 1368.824D, 684.412D, 17.110300000000002D, 4.277575000000001D, 64, -3000);
protected void fillNoiseColumn(double[] p_222548_1_, int p_222548_2_, int p_222548_3_) {
this.calcNoiseColumn(p_222548_1_, p_222548_2_, p_222548_3_, 1368.824D, 684.412D, 17.110300000000002D, 4.277575000000001D, 64, -3000);
}

@Override
protected double[] func_222549_a(int p_222549_1_, int p_222549_2_) {
return new double[]{(double)this.biomeProvider.func_222365_c(p_222549_1_, p_222549_2_), 0.0D};
protected double[] getBiomeNoiseColumn(int noiseX, int noiseZ) {
return new double[]{(double)this.biomeProvider.func_222365_c(noiseX, noiseZ), 0.0D};
}

@Override


Loading…
Cancel
Save