Merge branch 'master' of https://github.com/paulevsGitch/BetterEnd.git
This commit is contained in:
commit
9e789c9fc3
11 changed files with 28 additions and 34 deletions
|
@ -17,7 +17,7 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.util.math.Vec3i;
|
||||
import ru.betterend.client.ERenderLayer;
|
||||
import ru.betterend.client.IRenderTypeable;
|
||||
import ru.betterend.util.IColorProvider;
|
||||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTypeable, IColorProvider {
|
||||
|
|
|
@ -25,8 +25,8 @@ import net.minecraft.world.LocalDifficulty;
|
|||
import net.minecraft.world.ServerWorldAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import ru.betterend.interfaces.ISlime;
|
||||
import ru.betterend.registry.BiomeRegistry;
|
||||
import ru.betterend.util.ISlime;
|
||||
|
||||
public class EntityEndSlime extends SlimeEntity {
|
||||
private static final TrackedData<Boolean> MOSSY = DataTracker.registerData(EntityEndSlime.class, TrackedDataHandlerRegistry.BOOLEAN);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package ru.betterend.util;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColorProvider;
|
||||
import net.minecraft.client.color.item.ItemColorProvider;
|
||||
|
||||
public interface IColorProvider {
|
||||
BlockColorProvider getProvider();
|
||||
|
||||
ItemColorProvider getItemProvider();
|
||||
}
|
||||
package ru.betterend.interfaces;
|
||||
|
||||
import net.minecraft.client.color.block.BlockColorProvider;
|
||||
import net.minecraft.client.color.item.ItemColorProvider;
|
||||
|
||||
public interface IColorProvider {
|
||||
BlockColorProvider getProvider();
|
||||
|
||||
ItemColorProvider getItemProvider();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
package ru.betterend.util;
|
||||
|
||||
public interface ISlime {
|
||||
public void setSlimeSize(int size, boolean heal);
|
||||
}
|
||||
package ru.betterend.interfaces;
|
||||
|
||||
public interface ISlime {
|
||||
public void setSlimeSize(int size, boolean heal);
|
||||
}
|
|
@ -21,7 +21,7 @@ import net.minecraft.client.world.ClientWorld;
|
|||
import net.minecraft.sound.MusicSound;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.util.IColorProvider;
|
||||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
|
|
|
@ -6,9 +6,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.ChunkRegion;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.GenerationSettings;
|
||||
|
@ -16,7 +14,6 @@ import net.minecraft.world.gen.ChunkRandom;
|
|||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.registry.FeatureRegistry;
|
||||
|
||||
@Mixin(Biome.class)
|
||||
|
@ -31,9 +28,8 @@ public abstract class BiomeMixin {
|
|||
@Inject(method = "generateFeatureStep", at = @At("HEAD"))
|
||||
public void generateFeatureStep(StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, ChunkRegion region, long populationSeed, ChunkRandom random, BlockPos pos, CallbackInfo cinfo) {
|
||||
if (!injected) {
|
||||
Identifier biomeId = region.toServerWorld().getRegistryManager().get(Registry.BIOME_KEY).getId(Biome.class.cast(this));
|
||||
if (biomeId != null && !biomeId.getNamespace().equals(BetterEnd.MOD_ID) && category.equals(Biome.Category.THEEND)) {
|
||||
FeatureRegistry.registerGlobals(this.generationSettings.getFeatures());
|
||||
if (category.equals(Biome.Category.THEEND)) {
|
||||
FeatureRegistry.registerGlobals(generationSettings.getFeatures());
|
||||
}
|
||||
this.injected = true;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import net.minecraft.entity.mob.SlimeEntity;
|
||||
import ru.betterend.util.ISlime;
|
||||
import ru.betterend.interfaces.ISlime;
|
||||
|
||||
@Mixin(SlimeEntity.class)
|
||||
public class SlimeEntityMixin implements ISlime {
|
||||
|
|
|
@ -20,7 +20,7 @@ import ru.betterend.world.features.VineFeature;
|
|||
|
||||
public class FeatureRegistry {
|
||||
|
||||
public final static List<EndFeature> globalFeatures = Lists.newArrayList();
|
||||
private final static List<EndFeature> globalFeatures = Lists.newArrayList();
|
||||
|
||||
// Trees //
|
||||
public static final EndFeature MOSSY_GLOWSHROOM = new EndFeature("mossy_glowshroom", new MossyGlowshroomFeature(), 3);
|
||||
|
@ -50,9 +50,6 @@ public class FeatureRegistry {
|
|||
public static final EndFeature FLAVOLITE_LAYER = EndFeature.makeLayerFeature("flavolite_layer", BlockRegistry.FLAVOLITE, 12, 4, 96, 6);
|
||||
|
||||
public static void registerGlobals(List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||
globalFeatures.add(FLAVOLITE_LAYER);
|
||||
globalFeatures.add(ENDER_ORE);
|
||||
|
||||
globalFeatures.forEach(feature -> {
|
||||
int index = feature.getFeatureStep().ordinal();
|
||||
if (features.size() > index) {
|
||||
|
@ -70,4 +67,9 @@ public class FeatureRegistry {
|
|||
}
|
||||
|
||||
public static void register() {}
|
||||
|
||||
static {
|
||||
globalFeatures.add(FLAVOLITE_LAYER);
|
||||
globalFeatures.add(ENDER_ORE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FallingBlock;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.Property;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
|
@ -19,6 +18,7 @@ import net.minecraft.util.math.BlockPos.Mutable;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
|
||||
import ru.betterend.blocks.BlockBlueVine;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.BlockGlowingFur;
|
||||
|
|
|
@ -18,9 +18,7 @@ public class BiomeChorusForest extends EndBiome {
|
|||
.setParticles(ParticleTypes.PORTAL, 0.01F)
|
||||
.setLoop(SoundRegistry.AMBIENT_CHORUS_FOREST)
|
||||
.setMusic(SoundRegistry.MUSIC_CHORUS_FOREST)
|
||||
.addFeature(FeatureRegistry.ENDER_ORE)
|
||||
.addFeature(FeatureRegistry.VIOLECITE_LAYER)
|
||||
.addFeature(FeatureRegistry.FLAVOLITE_LAYER)
|
||||
.addFeature(FeatureRegistry.RARE_END_LAKE)
|
||||
.addFeature(FeatureRegistry.PYTHADENDRON_TREE)
|
||||
.addFeature(FeatureRegistry.PYTHADENDRON_BUSH)
|
||||
|
|
|
@ -20,8 +20,6 @@ public class BiomeFoggyMushroomland extends EndBiome {
|
|||
.setLoop(SoundRegistry.AMBIENT_FOGGY_MUSHROOMLAND)
|
||||
.setMusic(SoundRegistry.MUSIC_FOGGY_MUSHROOMLAND)
|
||||
.addStructureFeature(StructureRegistry.GIANT_MOSSY_GLOWSHROOM)
|
||||
.addFeature(FeatureRegistry.ENDER_ORE)
|
||||
.addFeature(FeatureRegistry.FLAVOLITE_LAYER)
|
||||
.addFeature(FeatureRegistry.END_LAKE)
|
||||
.addFeature(FeatureRegistry.MOSSY_GLOWSHROOM)
|
||||
.addFeature(FeatureRegistry.BLUE_VINE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue