Start migration
This commit is contained in:
parent
6630ce0cab
commit
47ed597358
491 changed files with 12045 additions and 11953 deletions
|
@ -20,9 +20,9 @@ import net.fabricmc.fabric.impl.biome.InternalBiomeData;
|
|||
import net.fabricmc.fabric.impl.biome.WeightedBiomePicker;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.registry.BuiltinRegistries;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.Category;
|
||||
|
@ -61,28 +61,28 @@ import ru.betterend.world.generator.BiomePicker;
|
|||
import ru.betterend.world.generator.BiomeType;
|
||||
|
||||
public class EndBiomes {
|
||||
private static final HashMap<Identifier, EndBiome> ID_MAP = Maps.newHashMap();
|
||||
private static final HashMap<ResourceLocation, EndBiome> ID_MAP = Maps.newHashMap();
|
||||
private static final HashMap<Biome, EndBiome> CLIENT = Maps.newHashMap();
|
||||
public static final Set<Identifier> FABRIC_VOID = Sets.newHashSet();
|
||||
private static final Set<Identifier> SUBBIOMES_UNMUTABLES = Sets.newHashSet();
|
||||
|
||||
public static final Set<ResourceLocation> FABRIC_VOID = Sets.newHashSet();
|
||||
private static final Set<ResourceLocation> SUBBIOMES_UNMUTABLES = Sets.newHashSet();
|
||||
|
||||
public static final BiomePicker LAND_BIOMES = new BiomePicker();
|
||||
public static final BiomePicker VOID_BIOMES = new BiomePicker();
|
||||
public static final BiomePicker CAVE_BIOMES = new BiomePicker();
|
||||
public static final List<EndBiome> SUBBIOMES = Lists.newArrayList();
|
||||
private static final JsonObject EMPTY_JSON = new JsonObject();
|
||||
|
||||
|
||||
private static Registry<Biome> biomeRegistry;
|
||||
|
||||
|
||||
// Vanilla Land
|
||||
public static final EndBiome END = registerBiome(BiomeKeys.THE_END, BiomeType.LAND, 1F);
|
||||
public static final EndBiome END_MIDLANDS = registerSubBiome(BiomeKeys.END_MIDLANDS, END, 0.5F);
|
||||
public static final EndBiome END_HIGHLANDS = registerSubBiome(BiomeKeys.END_HIGHLANDS, END, 0.5F);
|
||||
|
||||
|
||||
// Vanilla Void
|
||||
public static final EndBiome END_BARRENS = registerBiome(BiomeKeys.END_BARRENS, BiomeType.VOID, 1F);
|
||||
public static final EndBiome SMALL_END_ISLANDS = registerBiome(BiomeKeys.SMALL_END_ISLANDS, BiomeType.VOID, 1);
|
||||
|
||||
|
||||
// Better End Land
|
||||
public static final EndBiome FOGGY_MUSHROOMLAND = registerBiome(new FoggyMushroomlandBiome(), BiomeType.LAND);
|
||||
public static final EndBiome CHORUS_FOREST = registerBiome(new ChorusForestBiome(), BiomeType.LAND);
|
||||
|
@ -101,37 +101,39 @@ public class EndBiomes {
|
|||
public static final EndBiome DRY_SHRUBLAND = registerBiome(new DryShrublandBiome(), BiomeType.LAND);
|
||||
public static final EndBiome LANTERN_WOODS = registerBiome(new LanternWoodsBiome(), BiomeType.LAND);
|
||||
public static final EndBiome NEON_OASIS = registerSubBiome(new NeonOasisBiome(), DUST_WASTELANDS);
|
||||
|
||||
|
||||
// Better End Void
|
||||
public static final EndBiome ICE_STARFIELD = registerBiome(new BiomeIceStarfield(), BiomeType.VOID);
|
||||
|
||||
|
||||
// Better End Caves
|
||||
public static final EndCaveBiome EMPTY_END_CAVE = registerCaveBiome(new EmptyEndCaveBiome());
|
||||
public static final EndCaveBiome EMPTY_SMARAGDANT_CAVE = registerCaveBiome(new EmptySmaragdantCaveBiome());
|
||||
public static final EndCaveBiome LUSH_SMARAGDANT_CAVE = registerCaveBiome(new LushSmaragdantCaveBiome());
|
||||
public static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome());
|
||||
public static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
|
||||
|
||||
public static void register() {}
|
||||
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
public static void mutateRegistry(Registry<Biome> biomeRegistry) {
|
||||
EndBiomes.biomeRegistry = biomeRegistry;
|
||||
|
||||
|
||||
LAND_BIOMES.clearMutables();
|
||||
VOID_BIOMES.clearMutables();
|
||||
CAVE_BIOMES.clearMutables();
|
||||
|
||||
|
||||
if (FABRIC_VOID.isEmpty()) {
|
||||
loadFabricAPIBiomes();
|
||||
}
|
||||
|
||||
|
||||
Map<String, JsonObject> configs = Maps.newHashMap();
|
||||
|
||||
|
||||
biomeRegistry.forEach((biome) -> {
|
||||
if (biome.getCategory() == Category.THEEND) {
|
||||
Identifier id = biomeRegistry.getId(biome);
|
||||
ResourceLocation id = biomeRegistry.getId(biome);
|
||||
if (Configs.BIOME_CONFIG.getBoolean(id, "enabled", true)) {
|
||||
if (!LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id) && !SUBBIOMES_UNMUTABLES.contains(id)) {
|
||||
if (!LAND_BIOMES.containsImmutable(id) && !VOID_BIOMES.containsImmutable(id)
|
||||
&& !SUBBIOMES_UNMUTABLES.contains(id)) {
|
||||
JsonObject config = configs.get(id.getNamespace());
|
||||
if (config == null) {
|
||||
config = loadJsonConfig(id.getNamespace());
|
||||
|
@ -152,8 +154,7 @@ public class EndBiomes {
|
|||
|
||||
if (isVoid) {
|
||||
VOID_BIOMES.addBiomeMutable(endBiome);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
LAND_BIOMES.addBiomeMutable(endBiome);
|
||||
}
|
||||
ID_MAP.put(id, endBiome);
|
||||
|
@ -163,31 +164,31 @@ public class EndBiomes {
|
|||
});
|
||||
Integrations.addBiomes();
|
||||
Configs.BIOME_CONFIG.saveChanges();
|
||||
|
||||
|
||||
rebuildPicker(LAND_BIOMES, biomeRegistry);
|
||||
rebuildPicker(VOID_BIOMES, biomeRegistry);
|
||||
rebuildPicker(CAVE_BIOMES, biomeRegistry);
|
||||
|
||||
|
||||
SUBBIOMES.forEach((endBiome) -> {
|
||||
endBiome.updateActualBiomes(biomeRegistry);
|
||||
});
|
||||
|
||||
|
||||
CLIENT.clear();
|
||||
}
|
||||
|
||||
|
||||
private static void rebuildPicker(BiomePicker picker, Registry<Biome> biomeRegistry) {
|
||||
picker.rebuild();
|
||||
picker.getBiomes().forEach((endBiome) -> {
|
||||
endBiome.updateActualBiomes(biomeRegistry);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static void loadFabricAPIBiomes() {
|
||||
List<RegistryKey<Biome>> biomes = Lists.newArrayList();
|
||||
biomes.addAll(getBiomes(InternalBiomeData.getEndBiomesMap().get(BiomeKeys.SMALL_END_ISLANDS)));
|
||||
biomes.addAll(getBiomes(InternalBiomeData.getEndBarrensMap().get(BiomeKeys.END_BARRENS)));
|
||||
biomes.forEach((key) -> FABRIC_VOID.add(key.getValue()));
|
||||
|
||||
|
||||
if (BetterEnd.isDevEnvironment()) {
|
||||
System.out.println("==================================");
|
||||
System.out.println("Added void biomes from Fabric API:");
|
||||
|
@ -197,49 +198,55 @@ public class EndBiomes {
|
|||
System.out.println("==================================");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static List<RegistryKey<Biome>> getBiomes(WeightedBiomePicker picker) {
|
||||
IBiomeList biomeList = (IBiomeList) (Object) picker;
|
||||
return biomeList == null ? Collections.emptyList() : biomeList.getBiomes();
|
||||
}
|
||||
|
||||
|
||||
private static JsonObject loadJsonConfig(String namespace) {
|
||||
InputStream inputstream = EndBiomes.class.getResourceAsStream("/data/" + namespace + "/end_biome_properties.json");
|
||||
InputStream inputstream = EndBiomes.class
|
||||
.getResourceAsStream("/data/" + namespace + "/end_biome_properties.json");
|
||||
if (inputstream != null) {
|
||||
return JsonFactory.getJsonObject(inputstream);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return EMPTY_JSON;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize registry if it was not initialized in world generation (when using mods/datapacks, that overrides the End generation)
|
||||
* Initialize registry if it was not initialized in world generation (when using
|
||||
* mods/datapacks, that overrides the End generation)
|
||||
*
|
||||
* @param server - {@link MinecraftServer}
|
||||
*/
|
||||
public static void initRegistry(MinecraftServer server) {
|
||||
if (biomeRegistry == null) {
|
||||
biomeRegistry = server.getRegistryManager().get(Registry.BIOME_KEY);
|
||||
biomeRegistry = server.registryAccess().get(Registry.BIOME_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers new {@link EndBiome} and adds it to picker, can be used to add existing mod biomes into the End.
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param type - {@link BiomeType}
|
||||
* Registers new {@link EndBiome} and adds it to picker, can be used to add
|
||||
* existing mod biomes into the End.
|
||||
*
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param type - {@link BiomeType}
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
public static EndBiome registerBiome(Biome biome, BiomeType type, float genChance) {
|
||||
return registerBiome(biome, type, 1, genChance);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers new {@link EndBiome} and adds it to picker, can be used to add existing mod biomes into the End.
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param type - {@link BiomeType}
|
||||
* Registers new {@link EndBiome} and adds it to picker, can be used to add
|
||||
* existing mod biomes into the End.
|
||||
*
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param type - {@link BiomeType}
|
||||
* @param fogDensity - density of fog (def: 1F) [0.0F - Infinity]
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
public static EndBiome registerBiome(Biome biome, BiomeType type, float fogDensity, float genChance) {
|
||||
|
@ -249,27 +256,32 @@ public class EndBiomes {
|
|||
}
|
||||
return endBiome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers new {@link EndBiome} from existed {@link Biome} and put as a sub-biome into selected parent.
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param parent - {@link EndBiome} to be linked with
|
||||
* Registers new {@link EndBiome} from existed {@link Biome} and put as a
|
||||
* sub-biome into selected parent.
|
||||
*
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param parent - {@link EndBiome} to be linked with
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
public static EndBiome registerSubBiome(Biome biome, EndBiome parent, float genChance, boolean hasCaves) {
|
||||
return registerSubBiome(biome, parent, 1, genChance, hasCaves);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers new {@link EndBiome} from existed {@link Biome} and put as a sub-biome into selected parent.
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param parent - {@link EndBiome} to be linked with
|
||||
* Registers new {@link EndBiome} from existed {@link Biome} and put as a
|
||||
* sub-biome into selected parent.
|
||||
*
|
||||
* @param biome - {@link Biome} instance
|
||||
* @param parent - {@link EndBiome} to be linked with
|
||||
* @param fogDensity - density of fog (def: 1F) [0.0F - Infinity]
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @param genChance - generation chance [0.0F - Infinity]
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
public static EndBiome registerSubBiome(Biome biome, EndBiome parent, float fogDensity, float genChance, boolean hasCaves) {
|
||||
public static EndBiome registerSubBiome(Biome biome, EndBiome parent, float fogDensity, float genChance,
|
||||
boolean hasCaves) {
|
||||
EndBiome endBiome = new EndBiome(BuiltinRegistries.BIOME.getId(biome), biome, fogDensity, genChance, hasCaves);
|
||||
if (Configs.BIOME_CONFIG.getBoolean(endBiome.getID(), "enabled", true)) {
|
||||
parent.addSubBiome(endBiome);
|
||||
|
@ -279,10 +291,11 @@ public class EndBiomes {
|
|||
}
|
||||
return endBiome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put existing {@link EndBiome} as a sub-biome into selected parent.
|
||||
* @param biome - {@link EndBiome} instance
|
||||
*
|
||||
* @param biome - {@link EndBiome} instance
|
||||
* @param parent - {@link EndBiome} to be linked with
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
|
@ -297,11 +310,12 @@ public class EndBiomes {
|
|||
}
|
||||
return biome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers {@link EndBiome} and adds it into worldgen.
|
||||
*
|
||||
* @param biome - {@link EndBiome} instance
|
||||
* @param type - {@link BiomeType}
|
||||
* @param type - {@link BiomeType}
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
public static EndBiome registerBiome(EndBiome biome, BiomeType type) {
|
||||
|
@ -311,16 +325,17 @@ public class EndBiomes {
|
|||
ID_MAP.put(biome.getID(), biome);
|
||||
if (type == BiomeType.LAND) {
|
||||
addLandBiomeToFabricApi(biome);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
addVoidBiomeToFabricApi(biome);
|
||||
}
|
||||
}
|
||||
return biome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put integration sub-biome {@link EndBiome} into subbiomes list and registers it.
|
||||
* Put integration sub-biome {@link EndBiome} into subbiomes list and registers
|
||||
* it.
|
||||
*
|
||||
* @param biome - {@link EndBiome} instance
|
||||
* @return registered {@link EndBiome}
|
||||
*/
|
||||
|
@ -334,13 +349,14 @@ public class EndBiomes {
|
|||
}
|
||||
return biome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Link integration sub-biome with parent.
|
||||
* @param biome - {@link EndBiome} instance
|
||||
* @param parent - {@link Identifier} parent id
|
||||
*
|
||||
* @param biome - {@link EndBiome} instance
|
||||
* @param parent - {@link ResourceLocation} parent id
|
||||
*/
|
||||
public static void addSubBiomeIntegration(EndBiome biome, Identifier parent) {
|
||||
public static void addSubBiomeIntegration(EndBiome biome, ResourceLocation parent) {
|
||||
if (Configs.BIOME_CONFIG.getBoolean(biome.getID(), "enabled", true)) {
|
||||
EndBiome parentBiome = ID_MAP.get(parent);
|
||||
if (parentBiome != null && !parentBiome.containsSubBiome(biome)) {
|
||||
|
@ -348,20 +364,19 @@ public class EndBiomes {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static EndBiome registerBiome(RegistryKey<Biome> key, BiomeType type, float genChance) {
|
||||
return registerBiome(BuiltinRegistries.BIOME.get(key), type, genChance);
|
||||
}
|
||||
|
||||
|
||||
public static EndBiome registerSubBiome(RegistryKey<Biome> key, EndBiome parent, float genChance) {
|
||||
return registerSubBiome(BuiltinRegistries.BIOME.get(key), parent, genChance, true);
|
||||
}
|
||||
|
||||
|
||||
private static void addToPicker(EndBiome biome, BiomeType type) {
|
||||
if (type == BiomeType.LAND) {
|
||||
LAND_BIOMES.addBiome(biome);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
VOID_BIOMES.addBiome(biome);
|
||||
}
|
||||
}
|
||||
|
@ -369,42 +384,42 @@ public class EndBiomes {
|
|||
private static void registerBiomeDirectly(EndBiome biome) {
|
||||
Registry.register(BuiltinRegistries.BIOME, biome.getID(), biome.getBiome());
|
||||
}
|
||||
|
||||
|
||||
private static void addLandBiomeToFabricApi(EndBiome biome) {
|
||||
float weight = biome.getGenChanceImmutable();
|
||||
RegistryKey<Biome> key = BuiltinRegistries.BIOME.getKey(biome.getBiome()).get();
|
||||
InternalBiomeData.addEndBiomeReplacement(BiomeKeys.END_HIGHLANDS, key, weight);
|
||||
InternalBiomeData.addEndBiomeReplacement(BiomeKeys.END_MIDLANDS, key, weight);
|
||||
}
|
||||
|
||||
|
||||
private static void addVoidBiomeToFabricApi(EndBiome biome) {
|
||||
float weight = biome.getGenChanceImmutable();
|
||||
RegistryKey<Biome> key = BuiltinRegistries.BIOME.getKey(biome.getBiome()).get();
|
||||
InternalBiomeData.addEndBiomeReplacement(BiomeKeys.SMALL_END_ISLANDS, key, weight);
|
||||
}
|
||||
|
||||
|
||||
public static EndBiome getFromBiome(Biome biome) {
|
||||
return ID_MAP.getOrDefault(biomeRegistry.getId(biome), END);
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static EndBiome getRenderBiome(Biome biome) {
|
||||
EndBiome endBiome = CLIENT.get(biome);
|
||||
if (endBiome == null) {
|
||||
MinecraftClient minecraft = MinecraftClient.getInstance();
|
||||
Identifier id = minecraft.world.getRegistryManager().get(Registry.BIOME_KEY).getId(biome);
|
||||
ResourceLocation id = minecraft.world.registryAccess().get(Registry.BIOME_KEY).getId(biome);
|
||||
endBiome = id == null ? END : ID_MAP.getOrDefault(id, END);
|
||||
CLIENT.put(biome, endBiome);
|
||||
}
|
||||
return endBiome;
|
||||
}
|
||||
|
||||
public static Identifier getBiomeID(Biome biome) {
|
||||
Identifier id = biomeRegistry.getId(biome);
|
||||
|
||||
public static ResourceLocation getBiomeID(Biome biome) {
|
||||
ResourceLocation id = biomeRegistry.getId(biome);
|
||||
return id == null ? END.getID() : id;
|
||||
}
|
||||
|
||||
public static EndBiome getBiome(Identifier biomeID) {
|
||||
public static EndBiome getBiome(ResourceLocation biomeID) {
|
||||
return ID_MAP.getOrDefault(biomeID, END);
|
||||
}
|
||||
|
||||
|
@ -416,7 +431,7 @@ public class EndBiomes {
|
|||
result.addAll(SUBBIOMES);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static EndCaveBiome registerCaveBiome(EndCaveBiome biome) {
|
||||
if (Configs.BIOME_CONFIG.getBoolean(biome.getID(), "enabled", true)) {
|
||||
registerBiomeDirectly(biome);
|
||||
|
@ -425,12 +440,12 @@ public class EndBiomes {
|
|||
}
|
||||
return biome;
|
||||
}
|
||||
|
||||
|
||||
public static EndCaveBiome getCaveBiome(Random random) {
|
||||
return (EndCaveBiome) CAVE_BIOMES.getBiome(random);
|
||||
}
|
||||
|
||||
public static boolean hasBiome(Identifier biomeID) {
|
||||
|
||||
public static boolean hasBiome(ResourceLocation biomeID) {
|
||||
return ID_MAP.containsKey(biomeID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,11 @@ import java.util.List;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.EndStoneSmelter;
|
||||
import ru.betterend.blocks.EternalPedestal;
|
||||
|
@ -29,30 +29,35 @@ import ru.betterend.blocks.entities.InfusionPedestalEntity;
|
|||
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
||||
|
||||
public class EndBlockEntities {
|
||||
public final static BlockEntityType<EndStoneSmelterBlockEntity> END_STONE_SMELTER = registerBlockEntity(EndStoneSmelter.ID,
|
||||
public final static BlockEntityType<EndStoneSmelterBlockEntity> END_STONE_SMELTER = registerBlockEntity(
|
||||
EndStoneSmelter.ID,
|
||||
BlockEntityType.Builder.create(EndStoneSmelterBlockEntity::new, EndBlocks.END_STONE_SMELTER));
|
||||
public final static BlockEntityType<PedestalBlockEntity> PEDESTAL = registerBlockEntity("pedestal",
|
||||
BlockEntityType.Builder.create(PedestalBlockEntity::new, getPedestals()));
|
||||
public final static BlockEntityType<EternalPedestalEntity> ETERNAL_PEDESTAL = registerBlockEntity("eternal_pedestal",
|
||||
BlockEntityType.Builder.create(EternalPedestalEntity::new, EndBlocks.ETERNAL_PEDESTAL));
|
||||
public final static BlockEntityType<InfusionPedestalEntity> INFUSION_PEDESTAL = registerBlockEntity("infusion_pedestal",
|
||||
public final static BlockEntityType<EternalPedestalEntity> ETERNAL_PEDESTAL = registerBlockEntity(
|
||||
"eternal_pedestal", BlockEntityType.Builder.create(EternalPedestalEntity::new, EndBlocks.ETERNAL_PEDESTAL));
|
||||
public final static BlockEntityType<InfusionPedestalEntity> INFUSION_PEDESTAL = registerBlockEntity(
|
||||
"infusion_pedestal",
|
||||
BlockEntityType.Builder.create(InfusionPedestalEntity::new, EndBlocks.INFUSION_PEDESTAL));
|
||||
public static final BlockEntityType<EChestBlockEntity> CHEST = registerBlockEntity("chest",
|
||||
public static final BlockEntityType<EChestBlockEntity> CHEST = registerBlockEntity("chest",
|
||||
BlockEntityType.Builder.create(EChestBlockEntity::new, getChests()));
|
||||
public static final BlockEntityType<EBarrelBlockEntity> BARREL = registerBlockEntity("barrel",
|
||||
BlockEntityType.Builder.create(EBarrelBlockEntity::new, getBarrels()));
|
||||
public static final BlockEntityType<ESignBlockEntity> SIGN = registerBlockEntity("sign",
|
||||
BlockEntityType.Builder.create(ESignBlockEntity::new, getSigns()));
|
||||
public final static BlockEntityType<BlockEntityHydrothermalVent> HYDROTHERMAL_VENT = registerBlockEntity("hydrother_malvent",
|
||||
public final static BlockEntityType<BlockEntityHydrothermalVent> HYDROTHERMAL_VENT = registerBlockEntity(
|
||||
"hydrother_malvent",
|
||||
BlockEntityType.Builder.create(BlockEntityHydrothermalVent::new, EndBlocks.HYDROTHERMAL_VENT));
|
||||
public static final BlockEntityType<EFurnaceBlockEntity> FURNACE = registerBlockEntity("furnace",
|
||||
BlockEntityType.Builder.create(EFurnaceBlockEntity::new, getFurnaces()));
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> registerBlockEntity(String id, BlockEntityType.Builder<T> builder) {
|
||||
public static <T extends BlockEntity> BlockEntityType<T> registerBlockEntity(String id,
|
||||
BlockEntityType.Builder<T> builder) {
|
||||
return Registry.register(Registry.BLOCK_ENTITY_TYPE, BetterEnd.makeID(id), builder.build(null));
|
||||
}
|
||||
|
||||
public static void register() {}
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
static Block[] getChests() {
|
||||
List<Block> result = Lists.newArrayList();
|
||||
|
@ -66,7 +71,7 @@ public class EndBlockEntities {
|
|||
});
|
||||
return result.toArray(new Block[] {});
|
||||
}
|
||||
|
||||
|
||||
static Block[] getBarrels() {
|
||||
List<Block> result = Lists.newArrayList();
|
||||
EndItems.getModBlocks().forEach((item) -> {
|
||||
|
@ -79,7 +84,7 @@ public class EndBlockEntities {
|
|||
});
|
||||
return result.toArray(new Block[] {});
|
||||
}
|
||||
|
||||
|
||||
static Block[] getSigns() {
|
||||
List<Block> result = Lists.newArrayList();
|
||||
EndItems.getModBlocks().forEach((item) -> {
|
||||
|
@ -92,14 +97,14 @@ public class EndBlockEntities {
|
|||
});
|
||||
return result.toArray(new Block[] {});
|
||||
}
|
||||
|
||||
|
||||
static Block[] getPedestals() {
|
||||
List<Block> result = Lists.newArrayList();
|
||||
EndItems.getModBlocks().forEach((item) -> {
|
||||
if (item instanceof BlockItem) {
|
||||
Block block = ((BlockItem) item).getBlock();
|
||||
if (block instanceof EternalPedestal ||
|
||||
block instanceof InfusionPedestal) return;
|
||||
if (block instanceof EternalPedestal || block instanceof InfusionPedestal)
|
||||
return;
|
||||
if (block instanceof PedestalBlock) {
|
||||
result.add(block);
|
||||
}
|
||||
|
@ -107,7 +112,7 @@ public class EndBlockEntities {
|
|||
});
|
||||
return result.toArray(new Block[] {});
|
||||
}
|
||||
|
||||
|
||||
static Block[] getFurnaces() {
|
||||
List<Block> result = Lists.newArrayList();
|
||||
EndItems.getModBlocks().forEach((item) -> {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item.Settings;
|
||||
import net.minecraft.item.LilyPadItem;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item.Properties;
|
||||
import net.minecraft.world.item.LilyPadItem;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.*;
|
||||
import ru.betterend.blocks.basis.EndCropBlock;
|
||||
|
@ -39,18 +39,23 @@ import ru.betterend.item.material.EndToolMaterial;
|
|||
public class EndBlocks {
|
||||
// Terrain //
|
||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
||||
public static final Block END_MYCELIUM = registerBlock("end_mycelium", new EndTerrainBlock(MaterialColor.LIGHT_BLUE));
|
||||
public static final Block END_MOSS = registerBlock("end_moss", new EndTerrainBlock(MaterialColor.CYAN));
|
||||
public static final Block CHORUS_NYLIUM = registerBlock("chorus_nylium", new EndTerrainBlock(MaterialColor.MAGENTA));
|
||||
public static final Block CAVE_MOSS = registerBlock("cave_moss", new TripleTerrainBlock(MaterialColor.PURPLE));
|
||||
public static final Block CRYSTAL_MOSS = registerBlock("crystal_moss", new EndTerrainBlock(MaterialColor.PINK));
|
||||
public static final Block END_MYCELIUM = registerBlock("end_mycelium",
|
||||
new EndTerrainBlock(MaterialColor.COLOR_LIGHT_BLUE));
|
||||
public static final Block END_MOSS = registerBlock("end_moss", new EndTerrainBlock(MaterialColor.COLOR_CYAN));
|
||||
public static final Block CHORUS_NYLIUM = registerBlock("chorus_nylium",
|
||||
new EndTerrainBlock(MaterialColor.COLOR_MAGENTA));
|
||||
public static final Block CAVE_MOSS = registerBlock("cave_moss",
|
||||
new TripleTerrainBlock(MaterialColor.COLOR_PURPLE));
|
||||
public static final Block CRYSTAL_MOSS = registerBlock("crystal_moss",
|
||||
new EndTerrainBlock(MaterialColor.COLOR_PINK));
|
||||
public static final Block SHADOW_GRASS = registerBlock("shadow_grass", new ShadowGrassBlock());
|
||||
public static final Block PINK_MOSS = registerBlock("pink_moss", new EndTerrainBlock(MaterialColor.PINK));
|
||||
public static final Block AMBER_MOSS = registerBlock("amber_moss", new EndTerrainBlock(MaterialColor.ORANGE));
|
||||
public static final Block JUNGLE_MOSS = registerBlock("jungle_moss", new EndTerrainBlock(MaterialColor.GREEN));
|
||||
public static final Block SANGNUM = registerBlock("sangnum", new EndTerrainBlock(MaterialColor.RED));
|
||||
public static final Block RUTISCUS = registerBlock("rutiscus", new EndTerrainBlock(MaterialColor.ORANGE));
|
||||
|
||||
public static final Block PINK_MOSS = registerBlock("pink_moss", new EndTerrainBlock(MaterialColor.COLOR_PINK));
|
||||
public static final Block AMBER_MOSS = registerBlock("amber_moss", new EndTerrainBlock(MaterialColor.COLOR_ORANGE));
|
||||
public static final Block JUNGLE_MOSS = registerBlock("jungle_moss",
|
||||
new EndTerrainBlock(MaterialColor.COLOR_GREEN));
|
||||
public static final Block SANGNUM = registerBlock("sangnum", new EndTerrainBlock(MaterialColor.COLOR_RED));
|
||||
public static final Block RUTISCUS = registerBlock("rutiscus", new EndTerrainBlock(MaterialColor.COLOR_ORANGE));
|
||||
|
||||
// Roads //
|
||||
public static final Block END_MYCELIUM_PATH = registerBlock("end_mycelium_path", new EndPathBlock(END_MYCELIUM));
|
||||
public static final Block END_MOSS_PATH = registerBlock("end_moss_path", new EndPathBlock(END_MOSS));
|
||||
|
@ -63,93 +68,130 @@ public class EndBlocks {
|
|||
public static final Block JUNGLE_MOSS_PATH = registerBlock("jungle_moss_path", new EndPathBlock(JUNGLE_MOSS));
|
||||
public static final Block SANGNUM_PATH = registerBlock("sangnum_path", new EndPathBlock(SANGNUM));
|
||||
public static final Block RUTISCUS_PATH = registerBlock("rutiscus_path", new EndPathBlock(RUTISCUS));
|
||||
|
||||
|
||||
public static final Block MOSSY_OBSIDIAN = registerBlock("mossy_obsidian", new MossyObsidian());
|
||||
public static final Block DRAGON_BONE_BLOCK = registerBlock("dragon_bone_block", new EndPillarBlock(Blocks.BONE_BLOCK));
|
||||
public static final Block DRAGON_BONE_STAIRS = registerBlock("dragon_bone_stairs", new EndStairsBlock(DRAGON_BONE_BLOCK));
|
||||
public static final Block DRAGON_BONE_BLOCK = registerBlock("dragon_bone_block",
|
||||
new EndPillarBlock(Blocks.BONE_BLOCK));
|
||||
public static final Block DRAGON_BONE_STAIRS = registerBlock("dragon_bone_stairs",
|
||||
new EndStairsBlock(DRAGON_BONE_BLOCK));
|
||||
public static final Block DRAGON_BONE_SLAB = registerBlock("dragon_bone_slab", new EndSlabBlock(DRAGON_BONE_BLOCK));
|
||||
public static final Block MOSSY_DRAGON_BONE = registerBlock("mossy_dragon_bone", new MossyDragonBoneBlock());
|
||||
|
||||
|
||||
// Rocks //
|
||||
public static final StoneMaterial FLAVOLITE = new StoneMaterial("flavolite", MaterialColor.SAND);
|
||||
public static final StoneMaterial VIOLECITE = new StoneMaterial("violecite", MaterialColor.PURPLE);
|
||||
public static final StoneMaterial SULPHURIC_ROCK = new StoneMaterial("sulphuric_rock", MaterialColor.BROWN);
|
||||
public static final StoneMaterial VIRID_jADESTONE = new StoneMaterial("virid_jadestone", MaterialColor.GREEN);
|
||||
public static final StoneMaterial AZURE_jADESTONE = new StoneMaterial("azure_jadestone", MaterialColor.LIGHT_BLUE);
|
||||
public static final StoneMaterial SANDY_jADESTONE = new StoneMaterial("sandy_jadestone", MaterialColor.YELLOW);
|
||||
public static final StoneMaterial VIOLECITE = new StoneMaterial("violecite", MaterialColor.COLOR_PURPLE);
|
||||
public static final StoneMaterial SULPHURIC_ROCK = new StoneMaterial("sulphuric_rock", MaterialColor.COLOR_BROWN);
|
||||
public static final StoneMaterial VIRID_jADESTONE = new StoneMaterial("virid_jadestone", MaterialColor.COLOR_GREEN);
|
||||
public static final StoneMaterial AZURE_jADESTONE = new StoneMaterial("azure_jadestone",
|
||||
MaterialColor.COLOR_LIGHT_BLUE);
|
||||
public static final StoneMaterial SANDY_jADESTONE = new StoneMaterial("sandy_jadestone",
|
||||
MaterialColor.COLOR_YELLOW);
|
||||
public static final Block BRIMSTONE = registerBlock("brimstone", new BrimstoneBlock());
|
||||
public static final Block SULPHUR_CRYSTAL = registerBlock("sulphur_crystal", new SulphurCrystalBlock());
|
||||
public static final Block MISSING_TILE = registerBlock("missing_tile", new MissingTileBlock());
|
||||
|
||||
|
||||
public static final Block FLAVOLITE_RUNED = registerBlock("flavolite_runed", new RunedFlavolite());
|
||||
public static final Block FLAVOLITE_RUNED_ETERNAL = registerBlock("flavolite_runed_eternal", new EternalRunedFlavolite());
|
||||
|
||||
public static final Block ANDESITE_PEDESTAL = registerBlock("andesite_pedestal", new PedestalVanilla(Blocks.ANDESITE));
|
||||
public static final Block FLAVOLITE_RUNED_ETERNAL = registerBlock("flavolite_runed_eternal",
|
||||
new EternalRunedFlavolite());
|
||||
|
||||
public static final Block ANDESITE_PEDESTAL = registerBlock("andesite_pedestal",
|
||||
new PedestalVanilla(Blocks.ANDESITE));
|
||||
public static final Block DIORITE_PEDESTAL = registerBlock("diorite_pedestal", new PedestalVanilla(Blocks.DIORITE));
|
||||
public static final Block GRANITE_PEDESTAL = registerBlock("granite_pedestal", new PedestalVanilla(Blocks.GRANITE));
|
||||
public static final Block QUARTZ_PEDESTAL = registerBlock("quartz_pedestal", new PedestalVanilla(Blocks.QUARTZ_BLOCK));
|
||||
public static final Block PURPUR_PEDESTAL = registerBlock("purpur_pedestal", new PedestalVanilla(Blocks.PURPUR_BLOCK));
|
||||
|
||||
public static final Block QUARTZ_PEDESTAL = registerBlock("quartz_pedestal",
|
||||
new PedestalVanilla(Blocks.QUARTZ_BLOCK));
|
||||
public static final Block PURPUR_PEDESTAL = registerBlock("purpur_pedestal",
|
||||
new PedestalVanilla(Blocks.PURPUR_BLOCK));
|
||||
|
||||
public static final Block HYDROTHERMAL_VENT = registerBlock("hydrothermal_vent", new HydrothermalVentBlock());
|
||||
public static final Block VENT_BUBBLE_COLUMN = registerBlockNI("vent_bubble_column", new VentBubbleColumnBlock());
|
||||
|
||||
|
||||
public static final Block DENSE_SNOW = registerBlock("dense_snow", new DenseSnowBlock());
|
||||
public static final Block EMERALD_ICE = registerBlock("emerald_ice", new EmeraldIceBlock());
|
||||
public static final Block DENSE_EMERALD_ICE = registerBlock("dense_emerald_ice", new DenseEmeraldIceBlock());
|
||||
public static final Block ANCIENT_EMERALD_ICE = registerBlock("ancient_emerald_ice", new AncientEmeraldIceBlock());
|
||||
|
||||
public static final Block END_STONE_STALACTITE = registerBlock("end_stone_stalactite", new StalactiteBlock(Blocks.END_STONE));
|
||||
public static final Block END_STONE_STALACTITE_CAVEMOSS = registerBlock("end_stone_stalactite_cavemoss", new StalactiteBlock(CAVE_MOSS));
|
||||
|
||||
|
||||
public static final Block END_STONE_STALACTITE = registerBlock("end_stone_stalactite",
|
||||
new StalactiteBlock(Blocks.END_STONE));
|
||||
public static final Block END_STONE_STALACTITE_CAVEMOSS = registerBlock("end_stone_stalactite_cavemoss",
|
||||
new StalactiteBlock(CAVE_MOSS));
|
||||
|
||||
// Wooden Materials And Trees //
|
||||
public static final Block MOSSY_GLOWSHROOM_SAPLING = registerBlock("mossy_glowshroom_sapling", new MossyGlowshroomSaplingBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_CAP = registerBlock("mossy_glowshroom_cap", new MossyGlowshroomCapBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_HYMENOPHORE = registerBlock("mossy_glowshroom_hymenophore", new GlowingHymenophoreBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_FUR = registerBlock("mossy_glowshroom_fur", new FurBlock(MOSSY_GLOWSHROOM_SAPLING, 15, 16, true));
|
||||
public static final WoodenMaterial MOSSY_GLOWSHROOM = new WoodenMaterial("mossy_glowshroom", MaterialColor.GRAY, MaterialColor.WOOD);
|
||||
|
||||
public static final Block PYTHADENDRON_SAPLING = registerBlock("pythadendron_sapling", new PythadendronSaplingBlock());
|
||||
public static final Block PYTHADENDRON_LEAVES = registerBlock("pythadendron_leaves", new EndLeavesBlock(PYTHADENDRON_SAPLING, MaterialColor.MAGENTA));
|
||||
public static final WoodenMaterial PYTHADENDRON = new WoodenMaterial("pythadendron", MaterialColor.MAGENTA, MaterialColor.PURPLE);
|
||||
|
||||
public static final Block MOSSY_GLOWSHROOM_SAPLING = registerBlock("mossy_glowshroom_sapling",
|
||||
new MossyGlowshroomSaplingBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_CAP = registerBlock("mossy_glowshroom_cap",
|
||||
new MossyGlowshroomCapBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_HYMENOPHORE = registerBlock("mossy_glowshroom_hymenophore",
|
||||
new GlowingHymenophoreBlock());
|
||||
public static final Block MOSSY_GLOWSHROOM_FUR = registerBlock("mossy_glowshroom_fur",
|
||||
new FurBlock(MOSSY_GLOWSHROOM_SAPLING, 15, 16, true));
|
||||
public static final WoodenMaterial MOSSY_GLOWSHROOM = new WoodenMaterial("mossy_glowshroom",
|
||||
MaterialColor.COLOR_GRAY, MaterialColor.WOOD);
|
||||
|
||||
public static final Block PYTHADENDRON_SAPLING = registerBlock("pythadendron_sapling",
|
||||
new PythadendronSaplingBlock());
|
||||
public static final Block PYTHADENDRON_LEAVES = registerBlock("pythadendron_leaves",
|
||||
new EndLeavesBlock(PYTHADENDRON_SAPLING, MaterialColor.COLOR_MAGENTA));
|
||||
public static final WoodenMaterial PYTHADENDRON = new WoodenMaterial("pythadendron", MaterialColor.COLOR_MAGENTA,
|
||||
MaterialColor.COLOR_PURPLE);
|
||||
|
||||
public static final Block END_LOTUS_SEED = registerBlock("end_lotus_seed", new EndLotusSeedBlock());
|
||||
public static final Block END_LOTUS_STEM = registerBlock("end_lotus_stem", new EndLotusStemBlock());
|
||||
public static final Block END_LOTUS_LEAF = registerBlockNI("end_lotus_leaf", new EndLotusLeafBlock());
|
||||
public static final Block END_LOTUS_FLOWER = registerBlockNI("end_lotus_flower", new EndLotusFlowerBlock());
|
||||
public static final WoodenMaterial END_LOTUS = new WoodenMaterial("end_lotus", MaterialColor.LIGHT_BLUE, MaterialColor.CYAN);
|
||||
|
||||
public static final WoodenMaterial END_LOTUS = new WoodenMaterial("end_lotus", MaterialColor.COLOR_LIGHT_BLUE,
|
||||
MaterialColor.COLOR_CYAN);
|
||||
|
||||
public static final Block LACUGROVE_SAPLING = registerBlock("lacugrove_sapling", new LacugroveSaplingBlock());
|
||||
public static final Block LACUGROVE_LEAVES = registerBlock("lacugrove_leaves", new EndLeavesBlock(LACUGROVE_SAPLING, MaterialColor.CYAN));
|
||||
public static final WoodenMaterial LACUGROVE = new WoodenMaterial("lacugrove", MaterialColor.BROWN, MaterialColor.YELLOW);
|
||||
|
||||
public static final Block LACUGROVE_LEAVES = registerBlock("lacugrove_leaves",
|
||||
new EndLeavesBlock(LACUGROVE_SAPLING, MaterialColor.COLOR_CYAN));
|
||||
public static final WoodenMaterial LACUGROVE = new WoodenMaterial("lacugrove", MaterialColor.COLOR_BROWN,
|
||||
MaterialColor.COLOR_YELLOW);
|
||||
|
||||
public static final Block DRAGON_TREE_SAPLING = registerBlock("dragon_tree_sapling", new DragonTreeSaplingBlock());
|
||||
public static final Block DRAGON_TREE_LEAVES = registerBlock("dragon_tree_leaves", new EndLeavesBlock(DRAGON_TREE_SAPLING, MaterialColor.MAGENTA));
|
||||
public static final WoodenMaterial DRAGON_TREE = new WoodenMaterial("dragon_tree", MaterialColor.BLACK, MaterialColor.MAGENTA);
|
||||
|
||||
public static final Block DRAGON_TREE_LEAVES = registerBlock("dragon_tree_leaves",
|
||||
new EndLeavesBlock(DRAGON_TREE_SAPLING, MaterialColor.COLOR_MAGENTA));
|
||||
public static final WoodenMaterial DRAGON_TREE = new WoodenMaterial("dragon_tree", MaterialColor.COLOR_BLACK,
|
||||
MaterialColor.COLOR_MAGENTA);
|
||||
|
||||
public static final Block TENANEA_SAPLING = registerBlock("tenanea_sapling", new TenaneaSaplingBlock());
|
||||
public static final Block TENANEA_LEAVES = registerBlock("tenanea_leaves", new EndLeavesBlock(TENANEA_SAPLING, MaterialColor.PINK));
|
||||
public static final Block TENANEA_LEAVES = registerBlock("tenanea_leaves",
|
||||
new EndLeavesBlock(TENANEA_SAPLING, MaterialColor.COLOR_PINK));
|
||||
public static final Block TENANEA_FLOWERS = registerBlock("tenanea_flowers", new TenaneaFlowersBlock());
|
||||
public static final Block TENANEA_OUTER_LEAVES = registerBlock("tenanea_outer_leaves", new FurBlock(TENANEA_SAPLING, 32));
|
||||
public static final WoodenMaterial TENANEA = new WoodenMaterial("tenanea", MaterialColor.BROWN, MaterialColor.PINK);
|
||||
|
||||
public static final Block TENANEA_OUTER_LEAVES = registerBlock("tenanea_outer_leaves",
|
||||
new FurBlock(TENANEA_SAPLING, 32));
|
||||
public static final WoodenMaterial TENANEA = new WoodenMaterial("tenanea", MaterialColor.COLOR_BROWN,
|
||||
MaterialColor.COLOR_PINK);
|
||||
|
||||
public static final Block HELIX_TREE_SAPLING = registerBlock("helix_tree_sapling", new HelixTreeSaplingBlock());
|
||||
public static final Block HELIX_TREE_LEAVES = registerBlock("helix_tree_leaves", new HelixTreeLeavesBlock());
|
||||
public static final WoodenMaterial HELIX_TREE = new WoodenMaterial("helix_tree", MaterialColor.GRAY, MaterialColor.ORANGE);
|
||||
|
||||
public static final Block UMBRELLA_TREE_SAPLING = registerBlock("umbrella_tree_sapling", new UmbrellaTreeSaplingBlock());
|
||||
public static final Block UMBRELLA_TREE_MEMBRANE = registerBlock("umbrella_tree_membrane", new UmbrellaTreeMembraneBlock());
|
||||
public static final Block UMBRELLA_TREE_CLUSTER = registerBlock("umbrella_tree_cluster", new UmbrellaTreeClusterBlock());
|
||||
public static final Block UMBRELLA_TREE_CLUSTER_EMPTY = registerBlock("umbrella_tree_cluster_empty", new UmbrellaTreeClusterEmptyBlock());
|
||||
public static final WoodenMaterial UMBRELLA_TREE = new WoodenMaterial("umbrella_tree", MaterialColor.BLUE, MaterialColor.GREEN);
|
||||
|
||||
public static final Block JELLYSHROOM_CAP_PURPLE = registerBlock("jellyshroom_cap_purple", new JellyshroomCapBlock(217, 142, 255, 164, 0, 255));
|
||||
public static final WoodenMaterial JELLYSHROOM = new WoodenMaterial("jellyshroom", MaterialColor.PURPLE, MaterialColor.LIGHT_BLUE);
|
||||
|
||||
public static final WoodenMaterial HELIX_TREE = new WoodenMaterial("helix_tree", MaterialColor.COLOR_GRAY,
|
||||
MaterialColor.COLOR_ORANGE);
|
||||
|
||||
public static final Block UMBRELLA_TREE_SAPLING = registerBlock("umbrella_tree_sapling",
|
||||
new UmbrellaTreeSaplingBlock());
|
||||
public static final Block UMBRELLA_TREE_MEMBRANE = registerBlock("umbrella_tree_membrane",
|
||||
new UmbrellaTreeMembraneBlock());
|
||||
public static final Block UMBRELLA_TREE_CLUSTER = registerBlock("umbrella_tree_cluster",
|
||||
new UmbrellaTreeClusterBlock());
|
||||
public static final Block UMBRELLA_TREE_CLUSTER_EMPTY = registerBlock("umbrella_tree_cluster_empty",
|
||||
new UmbrellaTreeClusterEmptyBlock());
|
||||
public static final WoodenMaterial UMBRELLA_TREE = new WoodenMaterial("umbrella_tree", MaterialColor.COLOR_BLUE,
|
||||
MaterialColor.COLOR_GREEN);
|
||||
|
||||
public static final Block JELLYSHROOM_CAP_PURPLE = registerBlock("jellyshroom_cap_purple",
|
||||
new JellyshroomCapBlock(217, 142, 255, 164, 0, 255));
|
||||
public static final WoodenMaterial JELLYSHROOM = new WoodenMaterial("jellyshroom", MaterialColor.COLOR_PURPLE,
|
||||
MaterialColor.COLOR_LIGHT_BLUE);
|
||||
|
||||
public static final Block LUCERNIA_SAPLING = registerBlock("lucernia_sapling", new TenaneaSaplingBlock());
|
||||
public static final Block LUCERNIA_LEAVES = registerBlock("lucernia_leaves", new EndLeavesBlock(LUCERNIA_SAPLING, MaterialColor.ORANGE));
|
||||
public static final Block LUCERNIA_OUTER_LEAVES = registerBlock("lucernia_outer_leaves", new FurBlock(LUCERNIA_SAPLING, 32));
|
||||
public static final WoodenMaterial LUCERNIA = new WoodenMaterial("lucernia", MaterialColor.ORANGE, MaterialColor.ORANGE);
|
||||
|
||||
public static final Block LUCERNIA_LEAVES = registerBlock("lucernia_leaves",
|
||||
new EndLeavesBlock(LUCERNIA_SAPLING, MaterialColor.COLOR_ORANGE));
|
||||
public static final Block LUCERNIA_OUTER_LEAVES = registerBlock("lucernia_outer_leaves",
|
||||
new FurBlock(LUCERNIA_SAPLING, 32));
|
||||
public static final WoodenMaterial LUCERNIA = new WoodenMaterial("lucernia", MaterialColor.COLOR_ORANGE,
|
||||
MaterialColor.COLOR_ORANGE);
|
||||
|
||||
// Small Plants //
|
||||
public static final Block UMBRELLA_MOSS = registerBlock("umbrella_moss", new UmbrellaMossBlock());
|
||||
public static final Block UMBRELLA_MOSS_TALL = registerBlock("umbrella_moss_tall", new UmbrellaMossTallBlock());
|
||||
|
@ -160,59 +202,75 @@ public class EndBlocks {
|
|||
public static final Block SHADOW_PLANT = registerBlock("shadow_plant", new TerrainPlantBlock(SHADOW_GRASS));
|
||||
public static final Block BUSHY_GRASS = registerBlock("bushy_grass", new TerrainPlantBlock(PINK_MOSS));
|
||||
public static final Block AMBER_GRASS = registerBlock("amber_grass", new TerrainPlantBlock(AMBER_MOSS));
|
||||
public static final Block TWISTED_UMBRELLA_MOSS = registerBlock("twisted_umbrella_moss", new TwistedUmbrellaMossBlock());
|
||||
public static final Block TWISTED_UMBRELLA_MOSS_TALL = registerBlock("twisted_umbrella_moss_tall", new TwistedUmbrellaMossTallBlock());
|
||||
public static final Block TWISTED_UMBRELLA_MOSS = registerBlock("twisted_umbrella_moss",
|
||||
new TwistedUmbrellaMossBlock());
|
||||
public static final Block TWISTED_UMBRELLA_MOSS_TALL = registerBlock("twisted_umbrella_moss_tall",
|
||||
new TwistedUmbrellaMossTallBlock());
|
||||
public static final Block JUNGLE_GRASS = registerBlock("jungle_grass", new TerrainPlantBlock(JUNGLE_MOSS));
|
||||
public static final Block BLOOMING_COOKSONIA = registerBlock("blooming_cooksonia", new TerrainPlantBlock(END_MOSS));
|
||||
public static final Block SALTEAGO = registerBlock("salteago", new TerrainPlantBlock(END_MOSS));
|
||||
public static final Block VAIOLUSH_FERN = registerBlock("vaiolush_fern", new TerrainPlantBlock(END_MOSS));
|
||||
public static final Block FRACTURN = registerBlock("fracturn", new TerrainPlantBlock(END_MOSS));
|
||||
public static final Block CLAWFERN = registerBlock("clawfern", new TerrainPlantBlock(SANGNUM, MOSSY_OBSIDIAN, MOSSY_DRAGON_BONE));
|
||||
public static final Block GLOBULAGUS = registerBlock("globulagus", new TerrainPlantBlock(SANGNUM, MOSSY_OBSIDIAN, MOSSY_DRAGON_BONE));
|
||||
public static final Block CLAWFERN = registerBlock("clawfern",
|
||||
new TerrainPlantBlock(SANGNUM, MOSSY_OBSIDIAN, MOSSY_DRAGON_BONE));
|
||||
public static final Block GLOBULAGUS = registerBlock("globulagus",
|
||||
new TerrainPlantBlock(SANGNUM, MOSSY_OBSIDIAN, MOSSY_DRAGON_BONE));
|
||||
public static final Block ORANGO = registerBlock("orango", new TerrainPlantBlock(RUTISCUS));
|
||||
public static final Block AERIDIUM = registerBlock("aeridium", new TerrainPlantBlock(RUTISCUS));
|
||||
public static final Block LUTEBUS = registerBlock("lutebus", new TerrainPlantBlock(RUTISCUS));
|
||||
public static final Block LAMELLARIUM = registerBlock("lamellarium", new TerrainPlantBlock(RUTISCUS));
|
||||
|
||||
|
||||
public static final Block BLUE_VINE_SEED = registerBlock("blue_vine_seed", new BlueVineSeedBlock());
|
||||
public static final Block BLUE_VINE = registerBlockNI("blue_vine", new BlueVineBlock());
|
||||
public static final Block BLUE_VINE_LANTERN = registerBlock("blue_vine_lantern", new BlueVineLanternBlock());
|
||||
public static final Block BLUE_VINE_FUR = registerBlock("blue_vine_fur", new FurBlock(BLUE_VINE_SEED, 15, 3, false));
|
||||
|
||||
public static final Block BLUE_VINE_FUR = registerBlock("blue_vine_fur",
|
||||
new FurBlock(BLUE_VINE_SEED, 15, 3, false));
|
||||
|
||||
public static final Block LANCELEAF_SEED = registerBlock("lanceleaf_seed", new LanceleafSeedBlock());
|
||||
public static final Block LANCELEAF = registerBlockNI("lanceleaf", new LanceleafBlock());
|
||||
|
||||
|
||||
public static final Block GLOWING_PILLAR_SEED = registerBlock("glowing_pillar_seed", new GlowingPillarSeedBlock());
|
||||
public static final Block GLOWING_PILLAR_ROOTS = registerBlockNI("glowing_pillar_roots", new GlowingPillarRootsBlock());
|
||||
public static final Block GLOWING_PILLAR_LUMINOPHOR = registerBlock("glowing_pillar_luminophor", new GlowingPillarLuminophorBlock());
|
||||
public static final Block GLOWING_PILLAR_LEAVES = registerBlock("glowing_pillar_leaves", new FurBlock(GLOWING_PILLAR_SEED, 15, 3, false));
|
||||
|
||||
public static final Block GLOWING_PILLAR_ROOTS = registerBlockNI("glowing_pillar_roots",
|
||||
new GlowingPillarRootsBlock());
|
||||
public static final Block GLOWING_PILLAR_LUMINOPHOR = registerBlock("glowing_pillar_luminophor",
|
||||
new GlowingPillarLuminophorBlock());
|
||||
public static final Block GLOWING_PILLAR_LEAVES = registerBlock("glowing_pillar_leaves",
|
||||
new FurBlock(GLOWING_PILLAR_SEED, 15, 3, false));
|
||||
|
||||
public static final Block SMALL_JELLYSHROOM = registerBlock("small_jellyshroom", new SmallJellyshroomBlock());
|
||||
public static final Block BOLUX_MUSHROOM = registerBlock("bolux_mushroom", new BoluxMushroomBlock());
|
||||
|
||||
|
||||
public static final Block LUMECORN_SEED = registerBlock("lumecorn_seed", new LumecornSeedBlock());
|
||||
public static final Block LUMECORN = registerBlockNI("lumecorn", new LumecornBlock());
|
||||
|
||||
public static final Block SMALL_AMARANITA_MUSHROOM = registerBlock("small_amaranita_mushroom", new SmallAmaranitaBlock());
|
||||
public static final Block LARGE_AMARANITA_MUSHROOM = registerBlockNI("large_amaranita_mushroom", new LargeAmaranitaBlock());
|
||||
|
||||
public static final Block SMALL_AMARANITA_MUSHROOM = registerBlock("small_amaranita_mushroom",
|
||||
new SmallAmaranitaBlock());
|
||||
public static final Block LARGE_AMARANITA_MUSHROOM = registerBlockNI("large_amaranita_mushroom",
|
||||
new LargeAmaranitaBlock());
|
||||
public static final Block AMARANITA_STEM = registerBlock("amaranita_stem", new AmaranitaStemBlock());
|
||||
public static final Block AMARANITA_HYPHAE = registerBlock("amaranita_hyphae", new AmaranitaStemBlock());
|
||||
public static final Block AMARANITA_HYMENOPHORE = registerBlock("amaranita_hymenophore", new AmaranitaHymenophoreBlock());
|
||||
public static final Block AMARANITA_HYMENOPHORE = registerBlock("amaranita_hymenophore",
|
||||
new AmaranitaHymenophoreBlock());
|
||||
public static final Block AMARANITA_LANTERN = registerBlock("amaranita_lantern", new GlowingHymenophoreBlock());
|
||||
public static final Block AMARANITA_FUR = registerBlock("amaranita_fur", new FurBlock(MOSSY_GLOWSHROOM_SAPLING, 15, 4, true));
|
||||
public static final Block AMARANITA_FUR = registerBlock("amaranita_fur",
|
||||
new FurBlock(MOSSY_GLOWSHROOM_SAPLING, 15, 4, true));
|
||||
public static final Block AMARANITA_CAP = registerBlock("amaranita_cap", new AmaranitaCapBlock());
|
||||
|
||||
|
||||
public static final Block NEON_CACTUS = registerBlock("neon_cactus", new NeonCactusBlock());
|
||||
|
||||
|
||||
// Crops
|
||||
public static final Block SHADOW_BERRY = registerBlock("shadow_berry", new ShadowBerryBlock());
|
||||
public static final Block BLOSSOM_BERRY = registerBlock("blossom_berry_seed", new EndCropBlock(EndItems.BLOSSOM_BERRY, PINK_MOSS));
|
||||
public static final Block AMBER_ROOT = registerBlock("amber_root_seed", new EndCropBlock(EndItems.AMBER_ROOT_RAW, AMBER_MOSS));
|
||||
public static final Block CHORUS_MUSHROOM = registerBlock("chorus_mushroom_seed", new EndCropBlock(EndItems.CHORUS_MUSHROOM_RAW, CHORUS_NYLIUM));
|
||||
public static final Block PEARLBERRY = registerBlock("pearlberry_seed", new EndCropBlock(EndItems.BLOSSOM_BERRY, END_MOSS, END_MYCELIUM));
|
||||
public static final Block BLOSSOM_BERRY = registerBlock("blossom_berry_seed",
|
||||
new EndCropBlock(EndItems.BLOSSOM_BERRY, PINK_MOSS));
|
||||
public static final Block AMBER_ROOT = registerBlock("amber_root_seed",
|
||||
new EndCropBlock(EndItems.AMBER_ROOT_RAW, AMBER_MOSS));
|
||||
public static final Block CHORUS_MUSHROOM = registerBlock("chorus_mushroom_seed",
|
||||
new EndCropBlock(EndItems.CHORUS_MUSHROOM_RAW, CHORUS_NYLIUM));
|
||||
public static final Block PEARLBERRY = registerBlock("pearlberry_seed",
|
||||
new EndCropBlock(EndItems.BLOSSOM_BERRY, END_MOSS, END_MYCELIUM));
|
||||
public static final Block CAVE_PUMPKIN_SEED = registerBlock("cave_pumpkin_seed", new CavePumpkinVineBlock());
|
||||
public static final Block CAVE_PUMPKIN = registerBlock("cave_pumpkin", new CavePumpkinBlock());
|
||||
|
||||
|
||||
// Water plants
|
||||
public static final Block BUBBLE_CORAL = registerBlock("bubble_coral", new BubbleCoralBlock());
|
||||
public static final Block MENGER_SPONGE = registerBlock("menger_sponge", new MengerSpongeBlock());
|
||||
|
@ -223,24 +281,26 @@ public class EndBlocks {
|
|||
public static final Block CHARNIA_LIGHT_BLUE = registerBlock("charnia_light_blue", new CharniaBlock());
|
||||
public static final Block CHARNIA_CYAN = registerBlock("charnia_cyan", new CharniaBlock());
|
||||
public static final Block CHARNIA_GREEN = registerBlock("charnia_green", new CharniaBlock());
|
||||
|
||||
|
||||
public static final Block END_LILY = registerBlockNI("end_lily", new EndLilyBlock());
|
||||
public static final Block END_LILY_SEED = registerBlock("end_lily_seed", new EndLilySeedBlock());
|
||||
|
||||
public static final Block HYDRALUX_SAPLING = registerBlock("hydralux_sapling", new HydraluxSaplingBlock());
|
||||
|
||||
public static final Block HYDRALUX_SAPLING = registerBlock("hydralux_sapling", new HydraluxSaplingBlock());
|
||||
public static final Block HYDRALUX = registerBlockNI("hydralux", new HydraluxBlock());
|
||||
public static final Block HYDRALUX_PETAL_BLOCK = registerBlock("hydralux_petal_block", new HydraluxPetalBlock());
|
||||
public static final ColoredMaterial HYDRALUX_PETAL_BLOCK_COLORED = new ColoredMaterial(HydraluxPetalColoredBlock::new, HYDRALUX_PETAL_BLOCK, true);
|
||||
|
||||
public static final ColoredMaterial HYDRALUX_PETAL_BLOCK_COLORED = new ColoredMaterial(
|
||||
HydraluxPetalColoredBlock::new, HYDRALUX_PETAL_BLOCK, true);
|
||||
|
||||
public static final Block POND_ANEMONE = registerBlock("pond_anemone", new PondAnemoneBlock());
|
||||
|
||||
|
||||
public static final Block FLAMAEA = registerBlock("flamaea", new FlamaeaBlock());
|
||||
|
||||
public static final Block CAVE_BUSH = registerBlock("cave_bush", new SimpleLeavesBlock(MaterialColor.MAGENTA));
|
||||
|
||||
|
||||
public static final Block CAVE_BUSH = registerBlock("cave_bush",
|
||||
new SimpleLeavesBlock(MaterialColor.COLOR_MAGENTA));
|
||||
|
||||
public static final Block MURKWEED = registerBlock("murkweed", new MurkweedBlock());
|
||||
public static final Block NEEDLEGRASS = registerBlock("needlegrass", new NeedlegrassBlock());
|
||||
|
||||
|
||||
// Wall Plants //
|
||||
public static final Block PURPLE_POLYPORE = registerBlock("purple_polypore", new WallMushroomBlock(13));
|
||||
public static final Block AURANT_POLYPORE = registerBlock("aurant_polypore", new WallMushroomBlock(13));
|
||||
|
@ -251,7 +311,7 @@ public class EndBlocks {
|
|||
public static final Block BULB_MOSS = registerBlock("bulb_moss", new EndWallPlantBlock(12));
|
||||
public static final Block JUNGLE_FERN = registerBlock("jungle_fern", new EndWallPlantBlock());
|
||||
public static final Block RUSCUS = registerBlock("ruscus", new EndWallPlantBlock());
|
||||
|
||||
|
||||
// Vines //
|
||||
public static final Block DENSE_VINE = registerBlock("dense_vine", new VineBlock(15, true));
|
||||
public static final Block TWISTED_VINE = registerBlock("twisted_vine", new VineBlock());
|
||||
|
@ -263,58 +323,72 @@ public class EndBlocks {
|
|||
public static final Block FILALUX = registerBlock("filalux", new FilaluxBlock());
|
||||
public static final Block FILALUX_WINGS = registerBlock("filalux_wings", new FilaluxWingsBlock());
|
||||
public static final Block FILALUX_LANTERN = registerBlock("filalux_lantern", new FilaluxLanternBlock());
|
||||
|
||||
|
||||
// Mob-Related
|
||||
public static final Block SILK_MOTH_NEST = registerBlock("silk_moth_nest", new SilkMothNestBlock());
|
||||
public static final Block SILK_MOTH_HIVE = registerBlock("silk_moth_hive", new SilkMothHiveBlock());
|
||||
|
||||
|
||||
// Ores //
|
||||
public static final Block ENDER_ORE = registerBlock("ender_ore", new EndOreBlock(EndItems.ENDER_SHARD, 1, 3, 5));
|
||||
public static final Block AMBER_ORE = registerBlock("amber_ore", new EndOreBlock(EndItems.RAW_AMBER, 1, 2, 4));
|
||||
|
||||
|
||||
// Materials //
|
||||
public static final MetalMaterial THALLASIUM = MetalMaterial.makeNormal("thallasium", MaterialColor.BLUE, EndToolMaterial.THALLASIUM, EndArmorMaterial.THALLASIUM);
|
||||
public static final MetalMaterial TERMINITE = MetalMaterial.makeOreless("terminite", MaterialColor.field_25708, 7F, 9F, EndToolMaterial.TERMINITE, EndArmorMaterial.TERMINITE);
|
||||
public static final MetalMaterial THALLASIUM = MetalMaterial.makeNormal("thallasium", MaterialColor.COLOR_BLUE,
|
||||
EndToolMaterial.THALLASIUM, EndArmorMaterial.THALLASIUM);
|
||||
public static final MetalMaterial TERMINITE = MetalMaterial.makeOreless("terminite", MaterialColor.field_25708, 7F,
|
||||
9F, EndToolMaterial.TERMINITE, EndArmorMaterial.TERMINITE);
|
||||
public static final Block AETERNIUM_BLOCK = registerBlock("aeternium_block", new AeterniumBlock());
|
||||
public static final Block CHARCOAL_BLOCK = registerBlock("charcoal_block", new CharcoalBlock());
|
||||
|
||||
|
||||
public static final Block ENDER_BLOCK = registerBlock("ender_block", new EnderBlock());
|
||||
public static final Block AURORA_CRYSTAL = registerBlock("aurora_crystal", new AuroraCrystalBlock());
|
||||
public static final Block AMBER_BLOCK = registerBlock("amber_block", new AmberBlock());
|
||||
public static final Block SMARAGDANT_CRYSTAL = registerBlock("smaragdant_crystal", new SmaragdantCrystalBlock());
|
||||
public static final CrystalSubblocksMaterial SMARAGDANT_SUBBLOCKS = new CrystalSubblocksMaterial("smaragdant_crystal", SMARAGDANT_CRYSTAL);
|
||||
public static final Block SMARAGDANT_CRYSTAL_SHARD = registerBlock("smaragdant_crystal_shard", new SmaragdantCrystalShardBlock());
|
||||
|
||||
public static final CrystalSubblocksMaterial SMARAGDANT_SUBBLOCKS = new CrystalSubblocksMaterial(
|
||||
"smaragdant_crystal", SMARAGDANT_CRYSTAL);
|
||||
public static final Block SMARAGDANT_CRYSTAL_SHARD = registerBlock("smaragdant_crystal_shard",
|
||||
new SmaragdantCrystalShardBlock());
|
||||
|
||||
public static final Block RESPAWN_OBELISK = registerBlock("respawn_obelisk", new RespawnObeliskBlock());
|
||||
|
||||
|
||||
// Lanterns
|
||||
public static final Block ANDESITE_LANTERN = registerBlock("andesite_lantern", new StoneLanternBlock(Blocks.ANDESITE));
|
||||
public static final Block ANDESITE_LANTERN = registerBlock("andesite_lantern",
|
||||
new StoneLanternBlock(Blocks.ANDESITE));
|
||||
public static final Block DIORITE_LANTERN = registerBlock("diorite_lantern", new StoneLanternBlock(Blocks.DIORITE));
|
||||
public static final Block GRANITE_LANTERN = registerBlock("granite_lantern", new StoneLanternBlock(Blocks.GRANITE));
|
||||
public static final Block QUARTZ_LANTERN = registerBlock("quartz_lantern", new StoneLanternBlock(Blocks.QUARTZ_BLOCK));
|
||||
public static final Block PURPUR_LANTERN = registerBlock("purpur_lantern", new StoneLanternBlock(Blocks.PURPUR_BLOCK));
|
||||
public static final Block END_STONE_LANTERN = registerBlock("end_stone_lantern", new StoneLanternBlock(Blocks.END_STONE));
|
||||
public static final Block BLACKSTONE_LANTERN = registerBlock("blackstone_lantern", new StoneLanternBlock(Blocks.BLACKSTONE));
|
||||
|
||||
public static final Block QUARTZ_LANTERN = registerBlock("quartz_lantern",
|
||||
new StoneLanternBlock(Blocks.QUARTZ_BLOCK));
|
||||
public static final Block PURPUR_LANTERN = registerBlock("purpur_lantern",
|
||||
new StoneLanternBlock(Blocks.PURPUR_BLOCK));
|
||||
public static final Block END_STONE_LANTERN = registerBlock("end_stone_lantern",
|
||||
new StoneLanternBlock(Blocks.END_STONE));
|
||||
public static final Block BLACKSTONE_LANTERN = registerBlock("blackstone_lantern",
|
||||
new StoneLanternBlock(Blocks.BLACKSTONE));
|
||||
|
||||
public static final Block IRON_BULB_LANTERN = registerBlock("iron_bulb_lantern", new BulbVineLanternBlock());
|
||||
public static final ColoredMaterial IRON_BULB_LANTERN_COLORED = new ColoredMaterial(BulbVineLanternColoredBlock::new, IRON_BULB_LANTERN, false);
|
||||
|
||||
public static final Block IRON_CHANDELIER = EndBlocks.registerBlock("iron_chandelier", new ChandelierBlock(Blocks.GOLD_BLOCK));
|
||||
public static final Block GOLD_CHANDELIER = EndBlocks.registerBlock("gold_chandelier", new ChandelierBlock(Blocks.GOLD_BLOCK));
|
||||
|
||||
public static final ColoredMaterial IRON_BULB_LANTERN_COLORED = new ColoredMaterial(
|
||||
BulbVineLanternColoredBlock::new, IRON_BULB_LANTERN, false);
|
||||
|
||||
public static final Block IRON_CHANDELIER = EndBlocks.registerBlock("iron_chandelier",
|
||||
new ChandelierBlock(Blocks.GOLD_BLOCK));
|
||||
public static final Block GOLD_CHANDELIER = EndBlocks.registerBlock("gold_chandelier",
|
||||
new ChandelierBlock(Blocks.GOLD_BLOCK));
|
||||
|
||||
// Blocks With Entity //
|
||||
public static final Block END_STONE_FURNACE = registerBlock("end_stone_furnace", new EndFurnaceBlock(Blocks.END_STONE));
|
||||
public static final Block END_STONE_FURNACE = registerBlock("end_stone_furnace",
|
||||
new EndFurnaceBlock(Blocks.END_STONE));
|
||||
public static final Block END_STONE_SMELTER = registerBlock("end_stone_smelter", new EndStoneSmelter());
|
||||
public static final Block ETERNAL_PEDESTAL = registerBlock("eternal_pedestal", new EternalPedestal());
|
||||
public static final Block INFUSION_PEDESTAL = registerBlock("infusion_pedestal", new InfusionPedestal());
|
||||
public static final Block AETERNIUM_ANVIL = registerBlock("aeternium_anvil", new AeterniumAnvil());
|
||||
|
||||
|
||||
// Technical
|
||||
public static final Block END_PORTAL_BLOCK = registerBlockNI("end_portal_block", new EndPortalBlock());
|
||||
|
||||
public static void register() {}
|
||||
|
||||
public static Block registerBlock(Identifier id, Block block) {
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
public static Block registerBlock(ResourceLocation id, Block block) {
|
||||
if (!Configs.BLOCK_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
return block;
|
||||
}
|
||||
|
@ -326,20 +400,19 @@ public class EndBlocks {
|
|||
maxCount = item.getStackSize();
|
||||
placeOnWater = item.canPlaceOnWater();
|
||||
}
|
||||
Settings item = EndItems.makeBlockItemSettings().maxCount(maxCount);
|
||||
Properties item = EndItems.makeBlockItemSettings().maxCount(maxCount);
|
||||
if (placeOnWater) {
|
||||
EndItems.registerBlockItem(id, new LilyPadItem(block, item));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
EndItems.registerBlockItem(id, new BlockItem(block, item));
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
|
||||
public static Block registerBlock(String name, Block block) {
|
||||
return registerBlock(BetterEnd.makeID(name), block);
|
||||
}
|
||||
|
||||
|
||||
public static Block registerBlockNI(String name, Block block) {
|
||||
return Registry.register(Registry.BLOCK, BetterEnd.makeID(name), block);
|
||||
}
|
||||
|
|
|
@ -2,15 +2,15 @@ package ru.betterend.registry;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityDimensions;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.EntityType.EntityFactory;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.SpawnGroup;
|
||||
import net.minecraft.entity.attribute.DefaultAttributeContainer.Builder;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityDimensions;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.EntityType.EntityFactory;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.SpawnGroup;
|
||||
import net.minecraft.world.entity.attribute.DefaultAttributeContainer.Builder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.config.Configs;
|
||||
import ru.betterend.entity.CubozoaEntity;
|
||||
|
@ -23,13 +23,25 @@ import ru.betterend.util.MHelper;
|
|||
import ru.betterend.util.SpawnHelper;
|
||||
|
||||
public class EndEntities {
|
||||
public static final EntityType<DragonflyEntity> DRAGONFLY = register("dragonfly", SpawnGroup.AMBIENT, 0.6F, 0.5F, DragonflyEntity::new, DragonflyEntity.createMobAttributes(), true, MHelper.color(32, 42, 176), MHelper.color(115, 225, 249));
|
||||
public static final EntityType<EndSlimeEntity> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 2F, 2F, EndSlimeEntity::new, EndSlimeEntity.createMobAttributes(), false, MHelper.color(28, 28, 28), MHelper.color(99, 11, 99));
|
||||
public static final EntityType<EndFishEntity> END_FISH = register("end_fish", SpawnGroup.WATER_AMBIENT, 0.5F, 0.5F, EndFishEntity::new, EndFishEntity.createMobAttributes(), true, MHelper.color(3, 50, 76), MHelper.color(120, 206, 255));
|
||||
public static final EntityType<ShadowWalkerEntity> SHADOW_WALKER = register("shadow_walker", SpawnGroup.MONSTER, 0.6F, 1.95F, ShadowWalkerEntity::new, ShadowWalkerEntity.createMobAttributes(), true, MHelper.color(30, 30, 30), MHelper.color(5, 5, 5));
|
||||
public static final EntityType<CubozoaEntity> CUBOZOA = register("cubozoa", SpawnGroup.WATER_AMBIENT, 0.6F, 1F, CubozoaEntity::new, CubozoaEntity.createMobAttributes(), true, MHelper.color(151, 77, 181), MHelper.color(93, 176, 238));
|
||||
public static final EntityType<SilkMothEntity> SILK_MOTH = register("silk_moth", SpawnGroup.AMBIENT, 0.6F, 0.6F, SilkMothEntity::new, SilkMothEntity.createMobAttributes(), true, MHelper.color(198, 138, 204), MHelper.color(242, 220, 236));
|
||||
|
||||
public static final EntityType<DragonflyEntity> DRAGONFLY = register("dragonfly", SpawnGroup.AMBIENT, 0.6F, 0.5F,
|
||||
DragonflyEntity::new, DragonflyEntity.createMobAttributes(), true, MHelper.color(32, 42, 176),
|
||||
MHelper.color(115, 225, 249));
|
||||
public static final EntityType<EndSlimeEntity> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 2F, 2F,
|
||||
EndSlimeEntity::new, EndSlimeEntity.createMobAttributes(), false, MHelper.color(28, 28, 28),
|
||||
MHelper.color(99, 11, 99));
|
||||
public static final EntityType<EndFishEntity> END_FISH = register("end_fish", SpawnGroup.WATER_AMBIENT, 0.5F, 0.5F,
|
||||
EndFishEntity::new, EndFishEntity.createMobAttributes(), true, MHelper.color(3, 50, 76),
|
||||
MHelper.color(120, 206, 255));
|
||||
public static final EntityType<ShadowWalkerEntity> SHADOW_WALKER = register("shadow_walker", SpawnGroup.MONSTER,
|
||||
0.6F, 1.95F, ShadowWalkerEntity::new, ShadowWalkerEntity.createMobAttributes(), true,
|
||||
MHelper.color(30, 30, 30), MHelper.color(5, 5, 5));
|
||||
public static final EntityType<CubozoaEntity> CUBOZOA = register("cubozoa", SpawnGroup.WATER_AMBIENT, 0.6F, 1F,
|
||||
CubozoaEntity::new, CubozoaEntity.createMobAttributes(), true, MHelper.color(151, 77, 181),
|
||||
MHelper.color(93, 176, 238));
|
||||
public static final EntityType<SilkMothEntity> SILK_MOTH = register("silk_moth", SpawnGroup.AMBIENT, 0.6F, 0.6F,
|
||||
SilkMothEntity::new, SilkMothEntity.createMobAttributes(), true, MHelper.color(198, 138, 204),
|
||||
MHelper.color(242, 220, 236));
|
||||
|
||||
public static void register() {
|
||||
SpawnHelper.restrictionAir(DRAGONFLY, DragonflyEntity::canSpawn);
|
||||
SpawnHelper.restrictionLand(END_SLIME, EndSlimeEntity::canSpawn);
|
||||
|
@ -38,19 +50,25 @@ public class EndEntities {
|
|||
SpawnHelper.restrictionWater(CUBOZOA, CubozoaEntity::canSpawn);
|
||||
SpawnHelper.restrictionAir(SILK_MOTH, SilkMothEntity::canSpawn);
|
||||
}
|
||||
|
||||
protected static <T extends Entity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity) {
|
||||
Identifier id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity).dimensions(EntityDimensions.fixed(width, height)).build();
|
||||
|
||||
protected static <T extends Entity> EntityType<T> register(String name, SpawnGroup group, float width, float height,
|
||||
EntityFactory<T> entity) {
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity)
|
||||
.dimensions(EntityDimensions.fixed(width, height)).build();
|
||||
if (Configs.ENTITY_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
return Registry.register(Registry.ENTITY_TYPE, id, type);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
private static <T extends LivingEntity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity, Builder attributes, boolean fixedSize, int eggColor, int dotsColor) {
|
||||
Identifier id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity).dimensions(fixedSize ? EntityDimensions.fixed(width, height) : EntityDimensions.changing(width, height)).build();
|
||||
|
||||
private static <T extends LivingEntity> EntityType<T> register(String name, SpawnGroup group, float width,
|
||||
float height, EntityFactory<T> entity, Builder attributes, boolean fixedSize, int eggColor, int dotsColor) {
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
EntityType<T> type = FabricEntityTypeBuilder.<T>create(group, entity)
|
||||
.dimensions(
|
||||
fixedSize ? EntityDimensions.fixed(width, height) : EntityDimensions.changing(width, height))
|
||||
.build();
|
||||
if (Configs.ENTITY_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
FabricDefaultAttributeRegistry.register(type, attributes);
|
||||
EndItems.registerEgg("spawn_egg_" + name, type, eggColor, dotsColor);
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.function.Function;
|
|||
import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry;
|
||||
import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.client.render.entity.MobEntityRenderer;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import ru.betterend.entity.render.RendererEntityCubozoa;
|
||||
import ru.betterend.entity.render.RendererEntityDragonfly;
|
||||
import ru.betterend.entity.render.RendererEntityEndFish;
|
||||
|
@ -14,7 +14,7 @@ import ru.betterend.entity.render.RendererEntityShadowWalker;
|
|||
import ru.betterend.entity.render.SilkMothEntityRenderer;
|
||||
|
||||
public class EndEntitiesRenders {
|
||||
|
||||
|
||||
public static void register() {
|
||||
register(EndEntities.DRAGONFLY, RendererEntityDragonfly::new);
|
||||
register(EndEntities.END_SLIME, RendererEntityEndSlime::new);
|
||||
|
@ -23,7 +23,7 @@ public class EndEntitiesRenders {
|
|||
register(EndEntities.CUBOZOA, RendererEntityCubozoa::new);
|
||||
register(EndEntities.SILK_MOTH, SilkMothEntityRenderer::new);
|
||||
}
|
||||
|
||||
|
||||
private static void register(EntityType<?> type, Function<EntityRenderDispatcher, MobEntityRenderer<?, ?>> render) {
|
||||
EntityRendererRegistry.INSTANCE.register(type, (entityRenderDispatcher, context) -> {
|
||||
return render.apply(entityRenderDispatcher);
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.function.Supplier;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
|
@ -74,165 +74,258 @@ import ru.betterend.world.generator.GeneratorOptions;
|
|||
|
||||
public class EndFeatures {
|
||||
// Trees //
|
||||
public static final EndFeature MOSSY_GLOWSHROOM = new EndFeature("mossy_glowshroom", new MossyGlowshroomFeature(), 3);
|
||||
public static final EndFeature PYTHADENDRON_TREE = new EndFeature("pythadendron_tree", new PythadendronTreeFeature(), 2);
|
||||
public static final EndFeature MOSSY_GLOWSHROOM = new EndFeature("mossy_glowshroom", new MossyGlowshroomFeature(),
|
||||
3);
|
||||
public static final EndFeature PYTHADENDRON_TREE = new EndFeature("pythadendron_tree",
|
||||
new PythadendronTreeFeature(), 2);
|
||||
public static final EndFeature LACUGROVE = new EndFeature("lacugrove", new LacugroveFeature(), 4);
|
||||
public static final EndFeature DRAGON_TREE = new EndFeature("dragon_tree", new DragonTreeFeature(), 3);
|
||||
public static final EndFeature TENANEA = new EndFeature("tenanea", new TenaneaFeature(), 3);
|
||||
public static final EndFeature HELIX_TREE = new EndFeature("helix_tree", new HelixTreeFeature(), 2);
|
||||
public static final EndFeature UMBRELLA_TREE = new EndFeature("umbrella_tree", new UmbrellaTreeFeature(), 4);
|
||||
public static final EndFeature JELLYSHROOM = new EndFeature("jellyshroom", new JellyshroomFeature(), 3);
|
||||
public static final EndFeature GIGANTIC_AMARANITA = new EndFeature("gigantic_amaranita", new GiganticAmaranitaFeature(), 1);
|
||||
public static final EndFeature GIGANTIC_AMARANITA = new EndFeature("gigantic_amaranita",
|
||||
new GiganticAmaranitaFeature(), 1);
|
||||
public static final EndFeature LUCERNIA = new EndFeature("lucernia", new LucerniaFeature(), 3);
|
||||
|
||||
|
||||
// Bushes //
|
||||
public static final EndFeature PYTHADENDRON_BUSH = new EndFeature("pythadendron_bush", new BushFeature(EndBlocks.PYTHADENDRON_LEAVES, EndBlocks.PYTHADENDRON.bark), 4);
|
||||
public static final EndFeature DRAGON_TREE_BUSH = new EndFeature("dragon_tree_bush", new BushFeature(EndBlocks.DRAGON_TREE_LEAVES, EndBlocks.DRAGON_TREE.bark), 15);
|
||||
public static final EndFeature PYTHADENDRON_BUSH = new EndFeature("pythadendron_bush",
|
||||
new BushFeature(EndBlocks.PYTHADENDRON_LEAVES, EndBlocks.PYTHADENDRON.bark), 4);
|
||||
public static final EndFeature DRAGON_TREE_BUSH = new EndFeature("dragon_tree_bush",
|
||||
new BushFeature(EndBlocks.DRAGON_TREE_LEAVES, EndBlocks.DRAGON_TREE.bark), 15);
|
||||
public static final EndFeature TENANEA_BUSH = new EndFeature("tenanea_bush", new TenaneaBushFeature(), 10);
|
||||
public static final EndFeature LUMECORN = new EndFeature("lumecorn", new Lumecorn(), 5);
|
||||
public static final EndFeature LARGE_AMARANITA = new EndFeature("large_amaranita", new LargeAmaranitaFeature(), 5);
|
||||
public static final EndFeature LUCERNIA_BUSH = new EndFeature("lucernia_bush", new BushWithOuterFeature(EndBlocks.LUCERNIA_LEAVES, EndBlocks.LUCERNIA_OUTER_LEAVES, EndBlocks.LUCERNIA.bark), 10);
|
||||
public static final EndFeature LUCERNIA_BUSH = new EndFeature("lucernia_bush", new BushWithOuterFeature(
|
||||
EndBlocks.LUCERNIA_LEAVES, EndBlocks.LUCERNIA_OUTER_LEAVES, EndBlocks.LUCERNIA.bark), 10);
|
||||
public static final EndFeature NEON_CACTUS = new EndFeature("neon_cactus", new NeonCactusFeature(), 2);
|
||||
|
||||
|
||||
// Plants //
|
||||
public static final EndFeature UMBRELLA_MOSS = new EndFeature("umbrella_moss", new DoublePlantFeature(EndBlocks.UMBRELLA_MOSS, EndBlocks.UMBRELLA_MOSS_TALL, 5), 5);
|
||||
public static final EndFeature CREEPING_MOSS = new EndFeature("creeping_moss", new SinglePlantFeature(EndBlocks.CREEPING_MOSS, 5), 5);
|
||||
public static final EndFeature UMBRELLA_MOSS = new EndFeature("umbrella_moss",
|
||||
new DoublePlantFeature(EndBlocks.UMBRELLA_MOSS, EndBlocks.UMBRELLA_MOSS_TALL, 5), 5);
|
||||
public static final EndFeature CREEPING_MOSS = new EndFeature("creeping_moss",
|
||||
new SinglePlantFeature(EndBlocks.CREEPING_MOSS, 5), 5);
|
||||
public static final EndFeature BLUE_VINE = new EndFeature("blue_vine", new BlueVineFeature(), 1);
|
||||
public static final EndFeature CHORUS_GRASS = new EndFeature("chorus_grass", new SinglePlantFeature(EndBlocks.CHORUS_GRASS, 4), 5);
|
||||
public static final EndFeature CRYSTAL_GRASS = new EndFeature("crystal_grass", new SinglePlantFeature(EndBlocks.CRYSTAL_GRASS, 8, false), 5);
|
||||
public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant", new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 9);
|
||||
public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 3), 2);
|
||||
public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass", new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 3), 2);
|
||||
public static final EndFeature SHADOW_BERRY = new EndFeature("shadow_berry", new SinglePlantFeature(EndBlocks.SHADOW_BERRY, 2), 1);
|
||||
public static final EndFeature BUSHY_GRASS = new EndFeature("bushy_grass", new SinglePlantFeature(EndBlocks.BUSHY_GRASS, 8, false), 20);
|
||||
public static final EndFeature BUSHY_GRASS_WG = new EndFeature("bushy_grass_wg", new SinglePlantFeature(EndBlocks.BUSHY_GRASS, 5), 10);
|
||||
public static final EndFeature AMBER_GRASS = new EndFeature("amber_grass", new SinglePlantFeature(EndBlocks.AMBER_GRASS, 6), 9);
|
||||
public static final EndFeature CHORUS_GRASS = new EndFeature("chorus_grass",
|
||||
new SinglePlantFeature(EndBlocks.CHORUS_GRASS, 4), 5);
|
||||
public static final EndFeature CRYSTAL_GRASS = new EndFeature("crystal_grass",
|
||||
new SinglePlantFeature(EndBlocks.CRYSTAL_GRASS, 8, false), 5);
|
||||
public static final EndFeature SHADOW_PLANT = new EndFeature("shadow_plant",
|
||||
new SinglePlantFeature(EndBlocks.SHADOW_PLANT, 6), 9);
|
||||
public static final EndFeature MURKWEED = new EndFeature("murkweed", new SinglePlantFeature(EndBlocks.MURKWEED, 3),
|
||||
2);
|
||||
public static final EndFeature NEEDLEGRASS = new EndFeature("needlegrass",
|
||||
new SinglePlantFeature(EndBlocks.NEEDLEGRASS, 3), 2);
|
||||
public static final EndFeature SHADOW_BERRY = new EndFeature("shadow_berry",
|
||||
new SinglePlantFeature(EndBlocks.SHADOW_BERRY, 2), 1);
|
||||
public static final EndFeature BUSHY_GRASS = new EndFeature("bushy_grass",
|
||||
new SinglePlantFeature(EndBlocks.BUSHY_GRASS, 8, false), 20);
|
||||
public static final EndFeature BUSHY_GRASS_WG = new EndFeature("bushy_grass_wg",
|
||||
new SinglePlantFeature(EndBlocks.BUSHY_GRASS, 5), 10);
|
||||
public static final EndFeature AMBER_GRASS = new EndFeature("amber_grass",
|
||||
new SinglePlantFeature(EndBlocks.AMBER_GRASS, 6), 9);
|
||||
public static final EndFeature LANCELEAF = new EndFeature("lanceleaf", new LanceleafFeature(), 3);
|
||||
public static final EndFeature GLOW_PILLAR = new EndFeature("glow_pillar", new GlowPillarFeature(), 1);
|
||||
public static final EndFeature TWISTED_UMBRELLA_MOSS = new EndFeature("twisted_umbrella_moss", new DoublePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, EndBlocks.TWISTED_UMBRELLA_MOSS_TALL, 6), 5);
|
||||
public static final EndFeature JUNGLE_GRASS = new EndFeature("jungle_grass", new SinglePlantFeature(EndBlocks.JUNGLE_GRASS, 7, 3), 8);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_FLOOR = new EndFeature("small_jellyshroom_floor", new SinglePlantFeature(EndBlocks.SMALL_JELLYSHROOM, 5, 5), 4);
|
||||
public static final EndFeature BLOSSOM_BERRY = new EndFeature("blossom_berry", new SinglePlantFeature(EndBlocks.BLOSSOM_BERRY, 3, 3), 2);
|
||||
public static final EndFeature BLOOMING_COOKSONIA = new EndFeature("blooming_cooksonia", new SinglePlantFeature(EndBlocks.BLOOMING_COOKSONIA, 5), 5);
|
||||
public static final EndFeature SALTEAGO = new EndFeature("salteago", new SinglePlantFeature(EndBlocks.SALTEAGO, 5), 5);
|
||||
public static final EndFeature VAIOLUSH_FERN = new EndFeature("vaiolush_fern", new SinglePlantFeature(EndBlocks.VAIOLUSH_FERN, 5), 5);
|
||||
public static final EndFeature FRACTURN = new EndFeature("fracturn", new SinglePlantFeature(EndBlocks.FRACTURN, 5), 5);
|
||||
public static final EndFeature UMBRELLA_MOSS_RARE = new EndFeature("umbrella_moss_rare", new SinglePlantFeature(EndBlocks.UMBRELLA_MOSS, 3), 2);
|
||||
public static final EndFeature CREEPING_MOSS_RARE = new EndFeature("creeping_moss_rare", new SinglePlantFeature(EndBlocks.CREEPING_MOSS, 3), 2);
|
||||
public static final EndFeature TWISTED_UMBRELLA_MOSS_RARE = new EndFeature("twisted_umbrella_moss_rare", new SinglePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, 3), 2);
|
||||
public static final EndFeature TWISTED_UMBRELLA_MOSS = new EndFeature("twisted_umbrella_moss",
|
||||
new DoublePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, EndBlocks.TWISTED_UMBRELLA_MOSS_TALL, 6), 5);
|
||||
public static final EndFeature JUNGLE_GRASS = new EndFeature("jungle_grass",
|
||||
new SinglePlantFeature(EndBlocks.JUNGLE_GRASS, 7, 3), 8);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_FLOOR = new EndFeature("small_jellyshroom_floor",
|
||||
new SinglePlantFeature(EndBlocks.SMALL_JELLYSHROOM, 5, 5), 4);
|
||||
public static final EndFeature BLOSSOM_BERRY = new EndFeature("blossom_berry",
|
||||
new SinglePlantFeature(EndBlocks.BLOSSOM_BERRY, 3, 3), 2);
|
||||
public static final EndFeature BLOOMING_COOKSONIA = new EndFeature("blooming_cooksonia",
|
||||
new SinglePlantFeature(EndBlocks.BLOOMING_COOKSONIA, 5), 5);
|
||||
public static final EndFeature SALTEAGO = new EndFeature("salteago", new SinglePlantFeature(EndBlocks.SALTEAGO, 5),
|
||||
5);
|
||||
public static final EndFeature VAIOLUSH_FERN = new EndFeature("vaiolush_fern",
|
||||
new SinglePlantFeature(EndBlocks.VAIOLUSH_FERN, 5), 5);
|
||||
public static final EndFeature FRACTURN = new EndFeature("fracturn", new SinglePlantFeature(EndBlocks.FRACTURN, 5),
|
||||
5);
|
||||
public static final EndFeature UMBRELLA_MOSS_RARE = new EndFeature("umbrella_moss_rare",
|
||||
new SinglePlantFeature(EndBlocks.UMBRELLA_MOSS, 3), 2);
|
||||
public static final EndFeature CREEPING_MOSS_RARE = new EndFeature("creeping_moss_rare",
|
||||
new SinglePlantFeature(EndBlocks.CREEPING_MOSS, 3), 2);
|
||||
public static final EndFeature TWISTED_UMBRELLA_MOSS_RARE = new EndFeature("twisted_umbrella_moss_rare",
|
||||
new SinglePlantFeature(EndBlocks.TWISTED_UMBRELLA_MOSS, 3), 2);
|
||||
public static final EndFeature ORANGO = new EndFeature("orango", new SinglePlantFeature(EndBlocks.ORANGO, 5), 6);
|
||||
public static final EndFeature AERIDIUM = new EndFeature("aeridium", new SinglePlantFeature(EndBlocks.AERIDIUM, 5, 4), 5);
|
||||
public static final EndFeature LUTEBUS = new EndFeature("lutebus", new SinglePlantFeature(EndBlocks.LUTEBUS, 5, 2), 5);
|
||||
public static final EndFeature LAMELLARIUM = new EndFeature("lamellarium", new SinglePlantFeature(EndBlocks.LAMELLARIUM, 5), 6);
|
||||
public static final EndFeature SMALL_AMARANITA = new EndFeature("small_amaranita", new SinglePlantFeature(EndBlocks.SMALL_AMARANITA_MUSHROOM, 5, 5), 4);
|
||||
public static final EndFeature GLOBULAGUS = new EndFeature("globulagus", new SinglePlantFeature(EndBlocks.GLOBULAGUS, 5, 3), 6);
|
||||
public static final EndFeature CLAWFERN = new EndFeature("clawfern", new SinglePlantFeature(EndBlocks.CLAWFERN, 5, 4), 5);
|
||||
public static final EndFeature BOLUX_MUSHROOM = new EndFeature("bolux_mushroom", new SinglePlantFeature(EndBlocks.BOLUX_MUSHROOM, 5, 5), 2);
|
||||
public static final EndFeature CHORUS_MUSHROOM = new EndFeature("chorus_mushroom", new SinglePlantFeature(EndBlocks.CHORUS_MUSHROOM, 5, 5), 1);
|
||||
public static final EndFeature AMBER_ROOT = new EndFeature("amber_root", new SinglePlantFeature(EndBlocks.AMBER_ROOT, 5, 5), 1);
|
||||
public static final EndFeature PEARLBERRY = new EndFeature("pearlberry", new SinglePlantFeature(EndBlocks.PEARLBERRY, 5, 5), 1);
|
||||
|
||||
public static final EndFeature AERIDIUM = new EndFeature("aeridium",
|
||||
new SinglePlantFeature(EndBlocks.AERIDIUM, 5, 4), 5);
|
||||
public static final EndFeature LUTEBUS = new EndFeature("lutebus", new SinglePlantFeature(EndBlocks.LUTEBUS, 5, 2),
|
||||
5);
|
||||
public static final EndFeature LAMELLARIUM = new EndFeature("lamellarium",
|
||||
new SinglePlantFeature(EndBlocks.LAMELLARIUM, 5), 6);
|
||||
public static final EndFeature SMALL_AMARANITA = new EndFeature("small_amaranita",
|
||||
new SinglePlantFeature(EndBlocks.SMALL_AMARANITA_MUSHROOM, 5, 5), 4);
|
||||
public static final EndFeature GLOBULAGUS = new EndFeature("globulagus",
|
||||
new SinglePlantFeature(EndBlocks.GLOBULAGUS, 5, 3), 6);
|
||||
public static final EndFeature CLAWFERN = new EndFeature("clawfern",
|
||||
new SinglePlantFeature(EndBlocks.CLAWFERN, 5, 4), 5);
|
||||
public static final EndFeature BOLUX_MUSHROOM = new EndFeature("bolux_mushroom",
|
||||
new SinglePlantFeature(EndBlocks.BOLUX_MUSHROOM, 5, 5), 2);
|
||||
public static final EndFeature CHORUS_MUSHROOM = new EndFeature("chorus_mushroom",
|
||||
new SinglePlantFeature(EndBlocks.CHORUS_MUSHROOM, 5, 5), 1);
|
||||
public static final EndFeature AMBER_ROOT = new EndFeature("amber_root",
|
||||
new SinglePlantFeature(EndBlocks.AMBER_ROOT, 5, 5), 1);
|
||||
public static final EndFeature PEARLBERRY = new EndFeature("pearlberry",
|
||||
new SinglePlantFeature(EndBlocks.PEARLBERRY, 5, 5), 1);
|
||||
|
||||
// Vines //
|
||||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24), 3);
|
||||
public static final EndFeature TWISTED_VINE = new EndFeature("twisted_vine", new VineFeature(EndBlocks.TWISTED_VINE, 24), 3);
|
||||
public static final EndFeature DENSE_VINE = new EndFeature("dense_vine", new VineFeature(EndBlocks.DENSE_VINE, 24),
|
||||
3);
|
||||
public static final EndFeature TWISTED_VINE = new EndFeature("twisted_vine",
|
||||
new VineFeature(EndBlocks.TWISTED_VINE, 24), 3);
|
||||
public static final EndFeature BULB_VINE = new EndFeature("bulb_vine", new VineFeature(EndBlocks.BULB_VINE, 24), 5);
|
||||
public static final EndFeature JUNGLE_VINE = new EndFeature("jungle_vine", new VineFeature(EndBlocks.JUNGLE_VINE, 24), 5);
|
||||
|
||||
public static final EndFeature JUNGLE_VINE = new EndFeature("jungle_vine",
|
||||
new VineFeature(EndBlocks.JUNGLE_VINE, 24), 5);
|
||||
|
||||
// Ceil plants
|
||||
public static final EndFeature SMALL_JELLYSHROOM_CEIL = new EndFeature("small_jellyshroom_ceil", new SingleInvertedScatterFeature(EndBlocks.SMALL_JELLYSHROOM, 8), 8);
|
||||
|
||||
public static final EndFeature SMALL_JELLYSHROOM_CEIL = new EndFeature("small_jellyshroom_ceil",
|
||||
new SingleInvertedScatterFeature(EndBlocks.SMALL_JELLYSHROOM, 8), 8);
|
||||
|
||||
// Wall Plants //
|
||||
public static final EndFeature PURPLE_POLYPORE = new EndFeature("purple_polypore", new WallPlantOnLogFeature(EndBlocks.PURPLE_POLYPORE, 3), 5);
|
||||
public static final EndFeature AURANT_POLYPORE = new EndFeature("aurant_polypore", new WallPlantOnLogFeature(EndBlocks.AURANT_POLYPORE, 3), 5);
|
||||
public static final EndFeature TAIL_MOSS = new EndFeature("tail_moss", new WallPlantFeature(EndBlocks.TAIL_MOSS, 3), 15);
|
||||
public static final EndFeature CYAN_MOSS = new EndFeature("cyan_moss", new WallPlantFeature(EndBlocks.CYAN_MOSS, 3), 15);
|
||||
public static final EndFeature TAIL_MOSS_WOOD = new EndFeature("tail_moss_wood", new WallPlantOnLogFeature(EndBlocks.TAIL_MOSS, 4), 25);
|
||||
public static final EndFeature CYAN_MOSS_WOOD = new EndFeature("cyan_moss_wood", new WallPlantOnLogFeature(EndBlocks.CYAN_MOSS, 4), 25);
|
||||
public static final EndFeature TWISTED_MOSS = new EndFeature("twisted_moss", new WallPlantFeature(EndBlocks.TWISTED_MOSS, 6), 15);
|
||||
public static final EndFeature TWISTED_MOSS_WOOD = new EndFeature("twisted_moss_wood", new WallPlantOnLogFeature(EndBlocks.TWISTED_MOSS, 6), 25);
|
||||
public static final EndFeature BULB_MOSS = new EndFeature("bulb_moss", new WallPlantFeature(EndBlocks.BULB_MOSS, 6), 1);
|
||||
public static final EndFeature BULB_MOSS_WOOD = new EndFeature("bulb_moss_wood", new WallPlantOnLogFeature(EndBlocks.BULB_MOSS, 6), 15);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_WALL = new EndFeature("small_jellyshroom_wall", new WallPlantFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 4);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_WOOD = new EndFeature("small_jellyshroom_wood", new WallPlantOnLogFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 8);
|
||||
public static final EndFeature JUNGLE_FERN_WOOD = new EndFeature("jungle_fern_wood", new WallPlantOnLogFeature(EndBlocks.JUNGLE_FERN, 3), 12);
|
||||
public static final EndFeature PURPLE_POLYPORE = new EndFeature("purple_polypore",
|
||||
new WallPlantOnLogFeature(EndBlocks.PURPLE_POLYPORE, 3), 5);
|
||||
public static final EndFeature AURANT_POLYPORE = new EndFeature("aurant_polypore",
|
||||
new WallPlantOnLogFeature(EndBlocks.AURANT_POLYPORE, 3), 5);
|
||||
public static final EndFeature TAIL_MOSS = new EndFeature("tail_moss", new WallPlantFeature(EndBlocks.TAIL_MOSS, 3),
|
||||
15);
|
||||
public static final EndFeature CYAN_MOSS = new EndFeature("cyan_moss", new WallPlantFeature(EndBlocks.CYAN_MOSS, 3),
|
||||
15);
|
||||
public static final EndFeature TAIL_MOSS_WOOD = new EndFeature("tail_moss_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.TAIL_MOSS, 4), 25);
|
||||
public static final EndFeature CYAN_MOSS_WOOD = new EndFeature("cyan_moss_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.CYAN_MOSS, 4), 25);
|
||||
public static final EndFeature TWISTED_MOSS = new EndFeature("twisted_moss",
|
||||
new WallPlantFeature(EndBlocks.TWISTED_MOSS, 6), 15);
|
||||
public static final EndFeature TWISTED_MOSS_WOOD = new EndFeature("twisted_moss_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.TWISTED_MOSS, 6), 25);
|
||||
public static final EndFeature BULB_MOSS = new EndFeature("bulb_moss", new WallPlantFeature(EndBlocks.BULB_MOSS, 6),
|
||||
1);
|
||||
public static final EndFeature BULB_MOSS_WOOD = new EndFeature("bulb_moss_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.BULB_MOSS, 6), 15);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_WALL = new EndFeature("small_jellyshroom_wall",
|
||||
new WallPlantFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 4);
|
||||
public static final EndFeature SMALL_JELLYSHROOM_WOOD = new EndFeature("small_jellyshroom_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.SMALL_JELLYSHROOM, 4), 8);
|
||||
public static final EndFeature JUNGLE_FERN_WOOD = new EndFeature("jungle_fern_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.JUNGLE_FERN, 3), 12);
|
||||
public static final EndFeature RUSCUS = new EndFeature("ruscus", new WallPlantFeature(EndBlocks.RUSCUS, 6), 10);
|
||||
public static final EndFeature RUSCUS_WOOD = new EndFeature("ruscus_wood", new WallPlantOnLogFeature(EndBlocks.RUSCUS, 6), 10);
|
||||
|
||||
public static final EndFeature RUSCUS_WOOD = new EndFeature("ruscus_wood",
|
||||
new WallPlantOnLogFeature(EndBlocks.RUSCUS, 6), 10);
|
||||
|
||||
// Sky plants
|
||||
public static final EndFeature FILALUX = new EndFeature("filalux", new FilaluxFeature(), 1);
|
||||
|
||||
|
||||
// Water //
|
||||
public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 6), 10);
|
||||
public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare", new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 4);
|
||||
public static final EndFeature BUBBLE_CORAL = new EndFeature("bubble_coral",
|
||||
new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 6), 10);
|
||||
public static final EndFeature BUBBLE_CORAL_RARE = new EndFeature("bubble_coral_rare",
|
||||
new UnderwaterPlantFeature(EndBlocks.BUBBLE_CORAL, 3), 4);
|
||||
public static final EndFeature END_LILY = new EndFeature("end_lily", new EndLilyFeature(6), 10);
|
||||
public static final EndFeature END_LILY_RARE = new EndFeature("end_lily_rare", new EndLilyFeature(3), 4);
|
||||
public static final EndFeature END_LOTUS = new EndFeature("end_lotus", new EndLotusFeature(7), 5);
|
||||
public static final EndFeature END_LOTUS_LEAF = new EndFeature("end_lotus_leaf", new EndLotusLeafFeature(20), 25);
|
||||
public static final EndFeature HYDRALUX = new EndFeature("hydralux", new HydraluxFeature(5), 5);
|
||||
public static final EndFeature POND_ANEMONE = new EndFeature("pond_anemone", new UnderwaterPlantFeature(EndBlocks.POND_ANEMONE, 6), 10);
|
||||
|
||||
public static final EndFeature CHARNIA_RED = new EndFeature("charnia_red", new CharniaFeature(EndBlocks.CHARNIA_RED), 10);
|
||||
public static final EndFeature CHARNIA_PURPLE = new EndFeature("charnia_purple", new CharniaFeature(EndBlocks.CHARNIA_PURPLE), 10);
|
||||
public static final EndFeature CHARNIA_CYAN = new EndFeature("charnia_cyan", new CharniaFeature(EndBlocks.CHARNIA_CYAN), 10);
|
||||
public static final EndFeature CHARNIA_LIGHT_BLUE = new EndFeature("charnia_light_blue", new CharniaFeature(EndBlocks.CHARNIA_LIGHT_BLUE), 10);
|
||||
public static final EndFeature CHARNIA_ORANGE = new EndFeature("charnia_orange", new CharniaFeature(EndBlocks.CHARNIA_ORANGE), 10);
|
||||
public static final EndFeature CHARNIA_GREEN = new EndFeature("charnia_green", new CharniaFeature(EndBlocks.CHARNIA_GREEN), 10);
|
||||
public static final EndFeature POND_ANEMONE = new EndFeature("pond_anemone",
|
||||
new UnderwaterPlantFeature(EndBlocks.POND_ANEMONE, 6), 10);
|
||||
|
||||
public static final EndFeature CHARNIA_RED = new EndFeature("charnia_red",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_RED), 10);
|
||||
public static final EndFeature CHARNIA_PURPLE = new EndFeature("charnia_purple",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_PURPLE), 10);
|
||||
public static final EndFeature CHARNIA_CYAN = new EndFeature("charnia_cyan",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_CYAN), 10);
|
||||
public static final EndFeature CHARNIA_LIGHT_BLUE = new EndFeature("charnia_light_blue",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_LIGHT_BLUE), 10);
|
||||
public static final EndFeature CHARNIA_ORANGE = new EndFeature("charnia_orange",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_ORANGE), 10);
|
||||
public static final EndFeature CHARNIA_GREEN = new EndFeature("charnia_green",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_GREEN), 10);
|
||||
public static final EndFeature MENGER_SPONGE = new EndFeature("menger_sponge", new MengerSpongeFeature(5), 1);
|
||||
public static final EndFeature CHARNIA_RED_RARE = new EndFeature("charnia_red_rare", new CharniaFeature(EndBlocks.CHARNIA_RED), 2);
|
||||
public static final EndFeature BIOME_ISLAND = EndFeature.makeFeatureConfigured("overworld_island", new BiomeIslandFeature());
|
||||
public static final EndFeature FLAMAEA = new EndFeature("flamaea", new SinglePlantFeature(EndBlocks.FLAMAEA, 12, false, 5), 20);
|
||||
|
||||
public static final EndFeature CHARNIA_RED_RARE = new EndFeature("charnia_red_rare",
|
||||
new CharniaFeature(EndBlocks.CHARNIA_RED), 2);
|
||||
public static final EndFeature BIOME_ISLAND = EndFeature.makeFeatureConfigured("overworld_island",
|
||||
new BiomeIslandFeature());
|
||||
public static final EndFeature FLAMAEA = new EndFeature("flamaea",
|
||||
new SinglePlantFeature(EndBlocks.FLAMAEA, 12, false, 5), 20);
|
||||
|
||||
// Terrain //
|
||||
public static final EndFeature END_LAKE = EndFeature.makeLakeFeature("end_lake", new EndLakeFeature(), 4);
|
||||
public static final EndFeature END_LAKE_NORMAL = EndFeature.makeLakeFeature("end_lake_normal", new EndLakeFeature(), 20);
|
||||
public static final EndFeature END_LAKE_RARE = EndFeature.makeLakeFeature("end_lake_rare", new EndLakeFeature(), 40);
|
||||
public static final EndFeature END_LAKE_NORMAL = EndFeature.makeLakeFeature("end_lake_normal", new EndLakeFeature(),
|
||||
20);
|
||||
public static final EndFeature END_LAKE_RARE = EndFeature.makeLakeFeature("end_lake_rare", new EndLakeFeature(),
|
||||
40);
|
||||
public static final EndFeature ROUND_CAVE = EndFeature.makeRawGenFeature("round_cave", new RoundCaveFeature(), 2);
|
||||
public static final EndFeature SPIRE = EndFeature.makeRawGenFeature("spire", new SpireFeature(), 2);
|
||||
public static final EndFeature FLOATING_SPIRE = EndFeature.makeRawGenFeature("floating_spire", new FloatingSpireFeature(), 8);
|
||||
public static final EndFeature FLOATING_SPIRE = EndFeature.makeRawGenFeature("floating_spire",
|
||||
new FloatingSpireFeature(), 8);
|
||||
public static final EndFeature GEYSER = EndFeature.makeRawGenFeature("geyser", new GeyserFeature(), 8);
|
||||
public static final EndFeature SULPHURIC_LAKE = EndFeature.makeLakeFeature("sulphuric_lake", new SulphuricLakeFeature(), 8);
|
||||
public static final EndFeature SULPHURIC_CAVE = EndFeature.makeCountRawFeature("sulphuric_cave", new SulphuricCaveFeature(), 2);
|
||||
public static final EndFeature ICE_STAR = EndFeature.makeRawGenFeature("ice_star", new IceStarFeature(5, 15, 10, 25), 15);
|
||||
public static final EndFeature ICE_STAR_SMALL = EndFeature.makeRawGenFeature("ice_star_small", new IceStarFeature(3, 5, 7, 12), 8);
|
||||
public static final EndFeature SURFACE_VENT = EndFeature.makeChansedFeature("surface_vent", new SurfaceVentFeature(), 4);
|
||||
public static final EndFeature SULPHUR_HILL = EndFeature.makeChansedFeature("sulphur_hill", new SulphurHillFeature(), 8);
|
||||
public static final EndFeature OBSIDIAN_PILLAR_BASEMENT = EndFeature.makeChansedFeature("obsidian_pillar_basement", new ObsidianPillarBasementFeature(), 8);
|
||||
public static final EndFeature OBSIDIAN_BOULDER = EndFeature.makeChansedFeature("obsidian_boulder", new ObsidianBoulderFeature(), 10);
|
||||
public static final EndFeature FALLEN_PILLAR = EndFeature.makeChansedFeature("fallen_pillar", new FallenPillarFeature(), 20);
|
||||
public static final EndFeature SULPHURIC_LAKE = EndFeature.makeLakeFeature("sulphuric_lake",
|
||||
new SulphuricLakeFeature(), 8);
|
||||
public static final EndFeature SULPHURIC_CAVE = EndFeature.makeCountRawFeature("sulphuric_cave",
|
||||
new SulphuricCaveFeature(), 2);
|
||||
public static final EndFeature ICE_STAR = EndFeature.makeRawGenFeature("ice_star",
|
||||
new IceStarFeature(5, 15, 10, 25), 15);
|
||||
public static final EndFeature ICE_STAR_SMALL = EndFeature.makeRawGenFeature("ice_star_small",
|
||||
new IceStarFeature(3, 5, 7, 12), 8);
|
||||
public static final EndFeature SURFACE_VENT = EndFeature.makeChansedFeature("surface_vent",
|
||||
new SurfaceVentFeature(), 4);
|
||||
public static final EndFeature SULPHUR_HILL = EndFeature.makeChansedFeature("sulphur_hill",
|
||||
new SulphurHillFeature(), 8);
|
||||
public static final EndFeature OBSIDIAN_PILLAR_BASEMENT = EndFeature.makeChansedFeature("obsidian_pillar_basement",
|
||||
new ObsidianPillarBasementFeature(), 8);
|
||||
public static final EndFeature OBSIDIAN_BOULDER = EndFeature.makeChansedFeature("obsidian_boulder",
|
||||
new ObsidianBoulderFeature(), 10);
|
||||
public static final EndFeature FALLEN_PILLAR = EndFeature.makeChansedFeature("fallen_pillar",
|
||||
new FallenPillarFeature(), 20);
|
||||
public static final EndFeature TUNEL_CAVE = EndFeature.makeRawGenFeature("tunel_cave", new TunelCaveFeature(), 2);
|
||||
|
||||
|
||||
// Ores //
|
||||
public static final EndFeature THALLASIUM_ORE = EndFeature.makeOreFeature("thallasium_ore", EndBlocks.THALLASIUM.ore, 12, 6, 0, 16, 128);
|
||||
public static final EndFeature ENDER_ORE = EndFeature.makeOreFeature("ender_ore", EndBlocks.ENDER_ORE, 8, 3, 0, 16, 128);
|
||||
public static final EndFeature AMBER_ORE = EndFeature.makeOreFeature("amber_ore", EndBlocks.AMBER_ORE, 12, 6, 0, 16, 128);
|
||||
public static final EndFeature VIOLECITE_LAYER = EndFeature.makeLayerFeature("violecite_layer", EndBlocks.VIOLECITE, 15, 16, 128, 8);
|
||||
public static final EndFeature FLAVOLITE_LAYER = EndFeature.makeLayerFeature("flavolite_layer", EndBlocks.FLAVOLITE, 12, 16, 128, 6);
|
||||
|
||||
public static final EndFeature THALLASIUM_ORE = EndFeature.makeOreFeature("thallasium_ore",
|
||||
EndBlocks.THALLASIUM.ore, 12, 6, 0, 16, 128);
|
||||
public static final EndFeature ENDER_ORE = EndFeature.makeOreFeature("ender_ore", EndBlocks.ENDER_ORE, 8, 3, 0, 16,
|
||||
128);
|
||||
public static final EndFeature AMBER_ORE = EndFeature.makeOreFeature("amber_ore", EndBlocks.AMBER_ORE, 12, 6, 0, 16,
|
||||
128);
|
||||
public static final EndFeature VIOLECITE_LAYER = EndFeature.makeLayerFeature("violecite_layer", EndBlocks.VIOLECITE,
|
||||
15, 16, 128, 8);
|
||||
public static final EndFeature FLAVOLITE_LAYER = EndFeature.makeLayerFeature("flavolite_layer", EndBlocks.FLAVOLITE,
|
||||
12, 16, 128, 6);
|
||||
|
||||
// Buildings
|
||||
public static final EndFeature CRASHED_SHIP = EndFeature.makeChansedFeature("crashed_ship", new CrashedShipFeature(), 500);
|
||||
|
||||
public static final EndFeature CRASHED_SHIP = EndFeature.makeChansedFeature("crashed_ship",
|
||||
new CrashedShipFeature(), 500);
|
||||
|
||||
// Mobs
|
||||
public static final EndFeature SILK_MOTH_NEST = EndFeature.makeChansedFeature("silk_moth_nest", new SilkMothNestFeature(), 2);
|
||||
|
||||
public static final EndFeature SILK_MOTH_NEST = EndFeature.makeChansedFeature("silk_moth_nest",
|
||||
new SilkMothNestFeature(), 2);
|
||||
|
||||
// Caves
|
||||
public static final DefaultFeature SMARAGDANT_CRYSTAL = new SmaragdantCrystalFeature();
|
||||
public static final DefaultFeature SMARAGDANT_CRYSTAL_SHARD = new SingleBlockFeature(EndBlocks.SMARAGDANT_CRYSTAL_SHARD);
|
||||
public static final DefaultFeature SMARAGDANT_CRYSTAL_SHARD = new SingleBlockFeature(
|
||||
EndBlocks.SMARAGDANT_CRYSTAL_SHARD);
|
||||
public static final DefaultFeature BIG_AURORA_CRYSTAL = new BigAuroraCrystalFeature();
|
||||
public static final DefaultFeature CAVE_BUSH = new BushFeature(EndBlocks.CAVE_BUSH, EndBlocks.CAVE_BUSH);
|
||||
public static final DefaultFeature CAVE_GRASS = new SingleBlockFeature(EndBlocks.CAVE_GRASS);
|
||||
public static final DefaultFeature RUBINEA = new VineFeature(EndBlocks.RUBINEA, 8);
|
||||
public static final DefaultFeature MAGNULA = new VineFeature(EndBlocks.MAGNULA, 8);
|
||||
public static final DefaultFeature END_STONE_STALACTITE = new StalactiteFeature(true, EndBlocks.END_STONE_STALACTITE, Blocks.END_STONE);
|
||||
public static final DefaultFeature END_STONE_STALAGMITE = new StalactiteFeature(false, EndBlocks.END_STONE_STALACTITE, Blocks.END_STONE);
|
||||
public static final DefaultFeature END_STONE_STALACTITE_CAVEMOSS = new StalactiteFeature(true, EndBlocks.END_STONE_STALACTITE_CAVEMOSS, Blocks.END_STONE, EndBlocks.CAVE_MOSS);
|
||||
public static final DefaultFeature END_STONE_STALAGMITE_CAVEMOSS = new StalactiteFeature(false, EndBlocks.END_STONE_STALACTITE_CAVEMOSS, EndBlocks.CAVE_MOSS);
|
||||
public static final DefaultFeature END_STONE_STALACTITE = new StalactiteFeature(true,
|
||||
EndBlocks.END_STONE_STALACTITE, Blocks.END_STONE);
|
||||
public static final DefaultFeature END_STONE_STALAGMITE = new StalactiteFeature(false,
|
||||
EndBlocks.END_STONE_STALACTITE, Blocks.END_STONE);
|
||||
public static final DefaultFeature END_STONE_STALACTITE_CAVEMOSS = new StalactiteFeature(true,
|
||||
EndBlocks.END_STONE_STALACTITE_CAVEMOSS, Blocks.END_STONE, EndBlocks.CAVE_MOSS);
|
||||
public static final DefaultFeature END_STONE_STALAGMITE_CAVEMOSS = new StalactiteFeature(false,
|
||||
EndBlocks.END_STONE_STALACTITE_CAVEMOSS, EndBlocks.CAVE_MOSS);
|
||||
public static final DefaultFeature CAVE_PUMPKIN = new CavePumpkinFeature();
|
||||
|
||||
public static void registerBiomeFeatures(Identifier id, Biome biome, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||
|
||||
public static void registerBiomeFeatures(ResourceLocation id, Biome biome,
|
||||
List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||
if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (GeneratorOptions.removeChorusFromVanillaBiomes()) {
|
||||
if (id.getNamespace().equals("minecraft")) {
|
||||
String path = id.getPath();
|
||||
|
@ -248,44 +341,43 @@ public class EndFeatures {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
addFeature(FLAVOLITE_LAYER, features);
|
||||
addFeature(THALLASIUM_ORE, features);
|
||||
addFeature(ENDER_ORE, features);
|
||||
addFeature(CRASHED_SHIP, features);
|
||||
|
||||
|
||||
if (EndBiomes.getBiome(id).hasCaves()) {
|
||||
addFeature(ROUND_CAVE, features);
|
||||
addFeature(TUNEL_CAVE, features);
|
||||
}
|
||||
|
||||
|
||||
EndBiome endBiome = EndBiomes.getBiome(id);
|
||||
EndFeature feature = endBiome.getStructuresFeature();
|
||||
if (feature != null) {
|
||||
addFeature(feature, features);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void addDefaultFeatures(BiomeDefinition def) {
|
||||
def.addFeature(FLAVOLITE_LAYER);
|
||||
def.addFeature(THALLASIUM_ORE);
|
||||
def.addFeature(ENDER_ORE);
|
||||
def.addFeature(CRASHED_SHIP);
|
||||
|
||||
|
||||
if (def.hasCaves()) {
|
||||
def.addFeature(ROUND_CAVE);
|
||||
def.addFeature(TUNEL_CAVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void addFeature(EndFeature feature, List<List<Supplier<ConfiguredFeature<?, ?>>>> features) {
|
||||
int index = feature.getFeatureStep().ordinal();
|
||||
if (features.size() > index) {
|
||||
features.get(index).add(() -> {
|
||||
return feature.getFeatureConfigured();
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
List<Supplier<ConfiguredFeature<?, ?>>> newFeature = Lists.newArrayList();
|
||||
newFeature.add(() -> {
|
||||
return feature.getFeatureConfigured();
|
||||
|
@ -293,6 +385,7 @@ public class EndFeatures {
|
|||
features.add(newFeature);
|
||||
}
|
||||
}
|
||||
|
||||
public static void register() {}
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,34 +5,27 @@ import java.util.List;
|
|||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.DispenserBlock;
|
||||
import net.minecraft.block.dispenser.ItemDispenserBehavior;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.SpawnReason;
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.item.*;
|
||||
import net.minecraft.world.level.block.DispenserBlock;
|
||||
import net.minecraft.world.level.block.dispenser.ItemDispenserBehavior;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.SpawnReason;
|
||||
import net.minecraft.world.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.world.entity.effect.StatusEffects;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.FishBucketItem;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.FoodComponents;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.Settings;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ShovelItem;
|
||||
import net.minecraft.item.SpawnEggItem;
|
||||
import net.minecraft.item.SwordItem;
|
||||
import net.minecraft.item.ToolItem;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.world.item.FoodComponent;
|
||||
import net.minecraft.world.item.FoodComponents;
|
||||
import net.minecraft.world.item.Item.Properties;
|
||||
import net.minecraft.world.item.ToolItem;
|
||||
import net.minecraft.world.item.ToolMaterials;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Rarity;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
import net.minecraft.util.math.BlockPointer;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.config.Configs;
|
||||
import ru.betterend.item.DrinkItem;
|
||||
|
@ -56,7 +49,7 @@ import ru.betterend.util.TagHelper;
|
|||
public class EndItems {
|
||||
private static final List<Item> MOD_BLOCKS = Lists.newArrayList();
|
||||
private static final List<Item> MOD_ITEMS = Lists.newArrayList();
|
||||
|
||||
|
||||
// Materials //
|
||||
public final static Item ENDER_DUST = registerItem("ender_dust");
|
||||
public final static Item ENDER_SHARD = registerItem("ender_shard");
|
||||
|
@ -77,28 +70,43 @@ public class EndItems {
|
|||
public final static Item SILK_FIBER = registerItem("silk_fiber");
|
||||
public final static Item LUMECORN_ROD = registerItem("lumecorn_rod");
|
||||
public final static Item SILK_MOTH_MATRIX = registerItem("silk_moth_matrix");
|
||||
|
||||
|
||||
// Music Discs
|
||||
public final static Item MUSIC_DISC_STRANGE_AND_ALIEN = registerDisc("music_disc_strange_and_alien", 0, EndSounds.STRANGE_AND_ALIEN);
|
||||
|
||||
public final static Item MUSIC_DISC_STRANGE_AND_ALIEN = registerDisc("music_disc_strange_and_alien", 0,
|
||||
EndSounds.STRANGE_AND_ALIEN);
|
||||
|
||||
// Armor //
|
||||
public static final Item AETERNIUM_HELMET = registerItem("aeternium_helmet", new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.HEAD, makeItemSettings().fireproof()));
|
||||
public static final Item AETERNIUM_CHESTPLATE = registerItem("aeternium_chestplate", new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.CHEST, makeItemSettings().fireproof()));
|
||||
public static final Item AETERNIUM_LEGGINGS = registerItem("aeternium_leggings", new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.LEGS, makeItemSettings().fireproof()));
|
||||
public static final Item AETERNIUM_BOOTS = registerItem("aeternium_boots", new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.FEET, makeItemSettings().fireproof()));
|
||||
public static final Item CRYSTALITE_HELMET = registerItem("crystalite_helmet", new EndArmorItem(EndArmorMaterial.CRYSTALITE, EquipmentSlot.HEAD, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_CHESTPLATE = registerItem("crystalite_chestplate", new EndArmorItem(EndArmorMaterial.CRYSTALITE, EquipmentSlot.CHEST, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_LEGGINGS = registerItem("crystalite_leggings", new EndArmorItem(EndArmorMaterial.CRYSTALITE, EquipmentSlot.LEGS, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_BOOTS = registerItem("crystalite_boots", new EndArmorItem(EndArmorMaterial.CRYSTALITE, EquipmentSlot.FEET, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
|
||||
public static final Item AETERNIUM_HELMET = registerItem("aeternium_helmet",
|
||||
new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.HEAD, makeItemSettings().fireResistant()));
|
||||
public static final Item AETERNIUM_CHESTPLATE = registerItem("aeternium_chestplate",
|
||||
new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.CHEST, makeItemSettings().fireResistant()));
|
||||
public static final Item AETERNIUM_LEGGINGS = registerItem("aeternium_leggings",
|
||||
new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.LEGS, makeItemSettings().fireResistant()));
|
||||
public static final Item AETERNIUM_BOOTS = registerItem("aeternium_boots",
|
||||
new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.FEET, makeItemSettings().fireResistant()));
|
||||
public static final Item CRYSTALITE_HELMET = registerItem("crystalite_helmet", new EndArmorItem(
|
||||
EndArmorMaterial.CRYSTALITE, EquipmentSlot.HEAD, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_CHESTPLATE = registerItem("crystalite_chestplate", new EndArmorItem(
|
||||
EndArmorMaterial.CRYSTALITE, EquipmentSlot.CHEST, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_LEGGINGS = registerItem("crystalite_leggings", new EndArmorItem(
|
||||
EndArmorMaterial.CRYSTALITE, EquipmentSlot.LEGS, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
public static final Item CRYSTALITE_BOOTS = registerItem("crystalite_boots", new EndArmorItem(
|
||||
EndArmorMaterial.CRYSTALITE, EquipmentSlot.FEET, makeItemSettings().rarity(Rarity.UNCOMMON)));
|
||||
|
||||
// Tools //
|
||||
public static final ToolItem AETERNIUM_SHOVEL = registerTool("aeternium_shovel", new EndShovelItem(EndToolMaterial.AETERNIUM, 1.5F, -3.0F, makeItemSettings().fireproof()));
|
||||
public static final ToolItem AETERNIUM_SWORD = registerTool("aeternium_sword", new EndSwordItem(EndToolMaterial.AETERNIUM, 3, -2.4F, makeItemSettings().fireproof()));
|
||||
public static final ToolItem AETERNIUM_PICKAXE = registerTool("aeternium_pickaxe", new EndPickaxeItem(EndToolMaterial.AETERNIUM, 1, -2.8F, makeItemSettings().fireproof()));
|
||||
public static final ToolItem AETERNIUM_AXE = registerTool("aeternium_axe", new EndAxeItem(EndToolMaterial.AETERNIUM, 5.0F, -3.0F, makeItemSettings().fireproof()));
|
||||
public static final ToolItem AETERNIUM_HOE = registerTool("aeternium_hoe", new EndHoeItem(EndToolMaterial.AETERNIUM, -3, 0.0F, makeItemSettings().fireproof()));
|
||||
public static final ToolItem AETERNIUM_HAMMER = registerTool("aeternium_hammer", new EndHammerItem(EndToolMaterial.AETERNIUM, 6.0F, -3.0F, 0.3D, makeItemSettings().fireproof()));
|
||||
|
||||
public static final ToolItem AETERNIUM_SHOVEL = registerTool("aeternium_shovel",
|
||||
new EndShovelItem(EndToolMaterial.AETERNIUM, 1.5F, -3.0F, makeItemSettings().fireResistant()));
|
||||
public static final ToolItem AETERNIUM_SWORD = registerTool("aeternium_sword",
|
||||
new EndSwordItem(EndToolMaterial.AETERNIUM, 3, -2.4F, makeItemSettings().fireResistant()));
|
||||
public static final ToolItem AETERNIUM_PICKAXE = registerTool("aeternium_pickaxe",
|
||||
new EndPickaxeItem(EndToolMaterial.AETERNIUM, 1, -2.8F, makeItemSettings().fireResistant()));
|
||||
public static final ToolItem AETERNIUM_AXE = registerTool("aeternium_axe",
|
||||
new EndAxeItem(EndToolMaterial.AETERNIUM, 5.0F, -3.0F, makeItemSettings().fireResistant()));
|
||||
public static final ToolItem AETERNIUM_HOE = registerTool("aeternium_hoe",
|
||||
new EndHoeItem(EndToolMaterial.AETERNIUM, -3, 0.0F, makeItemSettings().fireResistant()));
|
||||
public static final ToolItem AETERNIUM_HAMMER = registerTool("aeternium_hammer",
|
||||
new EndHammerItem(EndToolMaterial.AETERNIUM, 6.0F, -3.0F, 0.3D, makeItemSettings().fireResistant()));
|
||||
|
||||
// Toolparts //
|
||||
public final static Item AETERNIUM_SHOVEL_HEAD = registerItem("aeternium_shovel_head");
|
||||
public final static Item AETERNIUM_PICKAXE_HEAD = registerItem("aeternium_pickaxe_head");
|
||||
|
@ -109,42 +117,50 @@ public class EndItems {
|
|||
public final static Item AETERNIUM_SWORD_HANDLE = registerItem("aeternium_sword_handle");
|
||||
|
||||
// Hammers //
|
||||
public static final ToolItem IRON_HAMMER = registerTool("iron_hammer", new EndHammerItem(ToolMaterials.IRON, 5.0F, -3.2F, 0.2D, makeItemSettings()));
|
||||
public static final ToolItem GOLDEN_HAMMER = registerTool("golden_hammer", new EndHammerItem(ToolMaterials.GOLD, 4.5F, -3.4F, 0.3D, makeItemSettings()));
|
||||
public static final ToolItem DIAMOND_HAMMER = registerTool("diamond_hammer", new EndHammerItem(ToolMaterials.DIAMOND, 5.5F, -3.1F, 0.2D, makeItemSettings()));
|
||||
public static final ToolItem NETHERITE_HAMMER = registerTool("netherite_hammer", new EndHammerItem(ToolMaterials.NETHERITE, 5.0F, -3.0F, 0.2D, makeItemSettings().fireproof()));
|
||||
|
||||
public static final ToolItem IRON_HAMMER = registerTool("iron_hammer",
|
||||
new EndHammerItem(ToolMaterials.IRON, 5.0F, -3.2F, 0.2D, makeItemSettings()));
|
||||
public static final ToolItem GOLDEN_HAMMER = registerTool("golden_hammer",
|
||||
new EndHammerItem(ToolMaterials.GOLD, 4.5F, -3.4F, 0.3D, makeItemSettings()));
|
||||
public static final ToolItem DIAMOND_HAMMER = registerTool("diamond_hammer",
|
||||
new EndHammerItem(ToolMaterials.DIAMOND, 5.5F, -3.1F, 0.2D, makeItemSettings()));
|
||||
public static final ToolItem NETHERITE_HAMMER = registerTool("netherite_hammer",
|
||||
new EndHammerItem(ToolMaterials.NETHERITE, 5.0F, -3.0F, 0.2D, makeItemSettings().fireResistant()));
|
||||
|
||||
// Food //
|
||||
public final static Item SHADOW_BERRY_RAW = registerFood("shadow_berry_raw", 4, 0.5F);
|
||||
public final static Item SHADOW_BERRY_COOKED = registerFood("shadow_berry_cooked", 6, 0.7F);
|
||||
public final static Item END_FISH_RAW = registerFood("end_fish_raw", FoodComponents.SALMON);
|
||||
public final static Item END_FISH_COOKED = registerFood("end_fish_cooked", FoodComponents.COOKED_SALMON);
|
||||
public final static Item BUCKET_END_FISH = registerItem("bucket_end_fish", new FishBucketItem(EndEntities.END_FISH, Fluids.WATER, makeItemSettings().maxCount(1)));
|
||||
public final static Item BUCKET_END_FISH = registerItem("bucket_end_fish",
|
||||
new FishBucketItem(EndEntities.END_FISH, Fluids.WATER, makeItemSettings().maxCount(1)));
|
||||
public final static Item SWEET_BERRY_JELLY = registerFood("sweet_berry_jelly", 6, 0.75F);
|
||||
public final static Item SHADOW_BERRY_JELLY = registerFood("shadow_berry_jelly", 7, 0.75F, new StatusEffectInstance(StatusEffects.NIGHT_VISION, 400));
|
||||
public final static Item SHADOW_BERRY_JELLY = registerFood("shadow_berry_jelly", 7, 0.75F,
|
||||
new StatusEffectInstance(StatusEffects.NIGHT_VISION, 400));
|
||||
public final static Item BLOSSOM_BERRY = registerFood("blossom_berry", FoodComponents.APPLE);
|
||||
public final static Item AMBER_ROOT_RAW = registerFood("amber_root_raw", 2, 0.8F);
|
||||
public final static Item CHORUS_MUSHROOM_RAW = registerFood("chorus_mushroom_raw", 3, 0.5F);
|
||||
public final static Item CHORUS_MUSHROOM_COOKED = registerFood("chorus_mushroom_cooked", FoodComponents.MUSHROOM_STEW);
|
||||
public final static Item BOLUX_MUSHROOM_COOKED = registerFood("bolux_mushroom_cooked", FoodComponents.MUSHROOM_STEW);
|
||||
public final static Item CHORUS_MUSHROOM_COOKED = registerFood("chorus_mushroom_cooked",
|
||||
FoodComponents.MUSHROOM_STEW);
|
||||
public final static Item BOLUX_MUSHROOM_COOKED = registerFood("bolux_mushroom_cooked",
|
||||
FoodComponents.MUSHROOM_STEW);
|
||||
public final static Item CAVE_PUMPKIN_PIE = registerFood("cave_pumpkin_pie", FoodComponents.PUMPKIN_PIE);
|
||||
|
||||
|
||||
// Drinks //
|
||||
public final static Item UMBRELLA_CLUSTER_JUICE = registerDrink("umbrella_cluster_juice", 5, 0.7F);
|
||||
|
||||
|
||||
public static Item registerDisc(String name, int power, SoundEvent sound) {
|
||||
return registerItem(BetterEnd.makeID(name), new PatternedDiscItem(power, sound, makeItemSettings()));
|
||||
}
|
||||
|
||||
|
||||
public static Item registerItem(String name) {
|
||||
return registerItem(BetterEnd.makeID(name), new PatternedItem(makeItemSettings()));
|
||||
}
|
||||
|
||||
|
||||
public static Item registerItem(String name, Item item) {
|
||||
return registerItem(BetterEnd.makeID(name), item);
|
||||
}
|
||||
|
||||
public static Item registerItem(Identifier id, Item item) {
|
||||
|
||||
public static Item registerItem(ResourceLocation id, Item item) {
|
||||
if (item instanceof ArmorItem) {
|
||||
return registerArmor(id, item);
|
||||
}
|
||||
|
@ -154,34 +170,34 @@ public class EndItems {
|
|||
registerItem(id, item, MOD_ITEMS);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static Item registerBlockItem(Identifier id, Item item) {
|
||||
|
||||
public static Item registerBlockItem(ResourceLocation id, Item item) {
|
||||
registerItem(id, item, MOD_BLOCKS);
|
||||
return item;
|
||||
}
|
||||
|
||||
private static void registerItem(Identifier id, Item item, List<Item> registry) {
|
||||
|
||||
private static void registerItem(ResourceLocation id, Item item, List<Item> registry) {
|
||||
if (item != Items.AIR) {
|
||||
Registry.register(Registry.ITEM, id, item);
|
||||
registry.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private static Item registerArmor(Identifier id, Item item) {
|
||||
|
||||
private static Item registerArmor(ResourceLocation id, Item item) {
|
||||
if (!Configs.ITEM_CONFIG.getBoolean("armor", id.getPath(), true)) {
|
||||
return item;
|
||||
}
|
||||
registerItem(id, item, MOD_ITEMS);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
public static ToolItem registerTool(String name, ToolItem item) {
|
||||
Identifier id = BetterEnd.makeID(name);
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
if (!Configs.ITEM_CONFIG.getBoolean("tools", id.getPath(), true)) {
|
||||
return item;
|
||||
}
|
||||
registerItem(id, item, MOD_ITEMS);
|
||||
|
||||
|
||||
if (item instanceof ShovelItem) {
|
||||
TagHelper.addTag((Tag.Identified<Item>) FabricToolTags.SHOVELS, item);
|
||||
} else if (item instanceof SwordItem) {
|
||||
|
@ -195,17 +211,18 @@ public class EndItems {
|
|||
} else if (item instanceof EndHammerItem) {
|
||||
TagHelper.addTag((Tag.Identified<Item>) EndTags.HAMMERS, item);
|
||||
}
|
||||
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
public static Item registerEgg(String name, EntityType<?> type, int background, int dots) {
|
||||
SpawnEggItem item = new EndSpawnEggItem(type, background, dots, makeItemSettings());
|
||||
ItemDispenserBehavior behavior = new ItemDispenserBehavior() {
|
||||
public ItemStack dispenseSilently(BlockPointer pointer, ItemStack stack) {
|
||||
Direction direction = pointer.getBlockState().get(DispenserBlock.FACING);
|
||||
EntityType<?> entityType = ((SpawnEggItem) stack.getItem()).getEntityType(stack.getTag());
|
||||
entityType.spawnFromItemStack(pointer.getWorld(), stack, null, pointer.getBlockPos().offset(direction), SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
entityType.spawnFromItemStack(pointer.getLevel(), stack, null, pointer.getBlockPos().offset(direction),
|
||||
SpawnReason.DISPENSER, direction != Direction.UP, false);
|
||||
stack.decrement(1);
|
||||
return stack;
|
||||
}
|
||||
|
@ -213,42 +230,43 @@ public class EndItems {
|
|||
DispenserBlock.registerBehavior(item, behavior);
|
||||
return registerItem(name, item);
|
||||
}
|
||||
|
||||
|
||||
public static Item registerFood(String name, int hunger, float saturation, StatusEffectInstance... effects) {
|
||||
FoodComponent.Builder builder = new FoodComponent.Builder().hunger(hunger).saturationModifier(saturation);
|
||||
for (StatusEffectInstance effect: effects) {
|
||||
for (StatusEffectInstance effect : effects) {
|
||||
builder.statusEffect(effect, 1F);
|
||||
}
|
||||
return registerFood(name, builder.build());
|
||||
}
|
||||
|
||||
|
||||
public static Item registerFood(String name, FoodComponent foodComponent) {
|
||||
return registerItem(name, new PatternedItem(makeItemSettings().food(foodComponent)));
|
||||
}
|
||||
|
||||
|
||||
public static Item registerDrink(String name) {
|
||||
return registerItem(name, new DrinkItem(makeItemSettings().maxCount(1)));
|
||||
}
|
||||
|
||||
|
||||
public static Item registerDrink(String name, FoodComponent foodComponent) {
|
||||
return registerItem(name, new DrinkItem(makeItemSettings().maxCount(1).food(foodComponent)));
|
||||
}
|
||||
|
||||
|
||||
public static Item registerDrink(String name, int hunger, float saturation) {
|
||||
FoodComponent.Builder builder = new FoodComponent.Builder().hunger(hunger).saturationModifier(saturation);
|
||||
return registerDrink(name, builder.build());
|
||||
}
|
||||
|
||||
public static Settings makeItemSettings() {
|
||||
return new Item.Settings().group(CreativeTabs.TAB_ITEMS);
|
||||
}
|
||||
|
||||
public static Settings makeBlockItemSettings() {
|
||||
return new Item.Settings().group(CreativeTabs.TAB_BLOCKS);
|
||||
public static Properties makeItemSettings() {
|
||||
return new Item.Properties().tab(CreativeTabs.TAB_ITEMS);
|
||||
}
|
||||
|
||||
public static Properties makeBlockItemSettings() {
|
||||
return new Item.Properties().tab(CreativeTabs.TAB_BLOCKS);
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
public static void register() {}
|
||||
|
||||
public static List<Item> getModBlocks() {
|
||||
return MOD_BLOCKS;
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@ package ru.betterend.registry;
|
|||
|
||||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
||||
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes;
|
||||
import net.minecraft.particle.DefaultParticleType;
|
||||
import net.minecraft.particle.ParticleEffect;
|
||||
import net.minecraft.particle.ParticleType;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.core.particles.ParticleType;
|
||||
import net.minecraft.core.particles.SimpleParticleType;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.particle.FireflyParticle;
|
||||
import ru.betterend.particle.InfusionParticle;
|
||||
|
@ -21,19 +21,20 @@ import ru.betterend.particle.PaticlePortalSphere;
|
|||
import ru.betterend.particle.SmaragdantParticle;
|
||||
|
||||
public class EndParticles {
|
||||
public static final DefaultParticleType GLOWING_SPHERE = register("glowing_sphere");
|
||||
public static final DefaultParticleType PORTAL_SPHERE = register("portal_sphere");
|
||||
public static final ParticleType<InfusionParticleType> INFUSION = register("infusion", FabricParticleTypes.complex(InfusionParticleType.PARAMETERS_FACTORY));
|
||||
public static final DefaultParticleType SULPHUR_PARTICLE = register("sulphur_particle");
|
||||
public static final DefaultParticleType GEYSER_PARTICLE = registerFar("geyser_particle");
|
||||
public static final DefaultParticleType SNOWFLAKE = register("snowflake");
|
||||
public static final DefaultParticleType AMBER_SPHERE = register("amber_sphere");
|
||||
public static final DefaultParticleType BLACK_SPORE = register("black_spore");
|
||||
public static final DefaultParticleType TENANEA_PETAL = register("tenanea_petal");
|
||||
public static final DefaultParticleType JUNGLE_SPORE = register("jungle_spore");
|
||||
public static final DefaultParticleType FIREFLY = register("firefly");
|
||||
public static final DefaultParticleType SMARAGDANT = register("smaragdant_particle");
|
||||
|
||||
public static final SimpleParticleType GLOWING_SPHERE = register("glowing_sphere");
|
||||
public static final SimpleParticleType PORTAL_SPHERE = register("portal_sphere");
|
||||
public static final ParticleType<InfusionParticleType> INFUSION = register("infusion",
|
||||
FabricParticleTypes.complex(InfusionParticleType.PARAMETERS_FACTORY));
|
||||
public static final SimpleParticleType SULPHUR_PARTICLE = register("sulphur_particle");
|
||||
public static final SimpleParticleType GEYSER_PARTICLE = registerFar("geyser_particle");
|
||||
public static final SimpleParticleType SNOWFLAKE = register("snowflake");
|
||||
public static final SimpleParticleType AMBER_SPHERE = register("amber_sphere");
|
||||
public static final SimpleParticleType BLACK_SPORE = register("black_spore");
|
||||
public static final SimpleParticleType TENANEA_PETAL = register("tenanea_petal");
|
||||
public static final SimpleParticleType JUNGLE_SPORE = register("jungle_spore");
|
||||
public static final SimpleParticleType FIREFLY = register("firefly");
|
||||
public static final SimpleParticleType SMARAGDANT = register("smaragdant_particle");
|
||||
|
||||
public static void register() {
|
||||
ParticleFactoryRegistry.getInstance().register(GLOWING_SPHERE, ParticleGlowingSphere.FactoryGlowingSphere::new);
|
||||
ParticleFactoryRegistry.getInstance().register(PORTAL_SPHERE, PaticlePortalSphere.FactoryPortalSphere::new);
|
||||
|
@ -48,16 +49,16 @@ public class EndParticles {
|
|||
ParticleFactoryRegistry.getInstance().register(FIREFLY, FireflyParticle.FireflyParticleFactory::new);
|
||||
ParticleFactoryRegistry.getInstance().register(SMARAGDANT, SmaragdantParticle.SmaragdantParticleFactory::new);
|
||||
}
|
||||
|
||||
private static DefaultParticleType register(String name) {
|
||||
|
||||
private static SimpleParticleType register(String name) {
|
||||
return Registry.register(Registry.PARTICLE_TYPE, BetterEnd.makeID(name), FabricParticleTypes.simple());
|
||||
}
|
||||
|
||||
private static DefaultParticleType registerFar(String name) {
|
||||
|
||||
private static SimpleParticleType registerFar(String name) {
|
||||
return Registry.register(Registry.PARTICLE_TYPE, BetterEnd.makeID(name), FabricParticleTypes.simple(true));
|
||||
}
|
||||
|
||||
private static <T extends ParticleEffect> ParticleType<T> register(String name, ParticleType<T> type) {
|
||||
|
||||
private static <T extends ParticleOptions> ParticleType<T> register(String name, ParticleType<T> type) {
|
||||
return Registry.register(Registry.PARTICLE_TYPE, BetterEnd.makeID(name), type);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ import com.google.gson.JsonArray;
|
|||
import com.google.gson.JsonObject;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.Level;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.config.ConfigWriter;
|
||||
import ru.betterend.util.JsonFactory;
|
||||
|
@ -16,10 +16,10 @@ import ru.betterend.util.MHelper;
|
|||
|
||||
public class EndPortals {
|
||||
|
||||
public final static Identifier OVERWORLD_ID = World.OVERWORLD.getValue();
|
||||
public final static ResourceLocation OVERWORLD_ID = Level.OVERWORLD.getValue();
|
||||
|
||||
private static PortalInfo[] portals;
|
||||
|
||||
|
||||
public static void loadPortals() {
|
||||
File file = new File(ConfigWriter.MOD_CONFIG_DIR, "portals.json");
|
||||
JsonObject json;
|
||||
|
@ -42,26 +42,26 @@ public class EndPortals {
|
|||
portals[i] = new PortalInfo(array.get(i).getAsJsonObject());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static int getCount() {
|
||||
return MHelper.max(portals.length - 1, 1);
|
||||
}
|
||||
|
||||
public static ServerWorld getWorld(MinecraftServer server, int portalId) {
|
||||
|
||||
public static ServerLevel getLevel(MinecraftServer server, int portalId) {
|
||||
if (portalId < 0 || portalId >= portals.length) {
|
||||
return server.getOverworld();
|
||||
}
|
||||
return portals[portalId].getWorld(server);
|
||||
return portals[portalId].getLevel(server);
|
||||
}
|
||||
|
||||
public static Identifier getWorldId(int portalId) {
|
||||
public static ResourceLocation getWorldId(int portalId) {
|
||||
if (portalId < 0 || portalId >= portals.length) {
|
||||
return OVERWORLD_ID;
|
||||
}
|
||||
return portals[portalId].dimension;
|
||||
}
|
||||
|
||||
public static int getPortalIdByItem(Identifier item) {
|
||||
|
||||
public static int getPortalIdByItem(ResourceLocation item) {
|
||||
for (int i = 0; i < portals.length; i++) {
|
||||
if (portals[i].item.equals(item)) {
|
||||
return i;
|
||||
|
@ -69,7 +69,8 @@ public class EndPortals {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
public static int getPortalIdByWorld(Identifier world) {
|
||||
|
||||
public static int getPortalIdByWorld(ResourceLocation world) {
|
||||
for (int i = 0; i < portals.length; i++) {
|
||||
if (portals[i].dimension.equals(world)) {
|
||||
return i;
|
||||
|
@ -77,12 +78,12 @@ public class EndPortals {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public static int getColor(int state) {
|
||||
return portals[state].color;
|
||||
}
|
||||
|
||||
public static boolean isAvailableItem(Identifier item) {
|
||||
|
||||
public static boolean isAvailableItem(ResourceLocation item) {
|
||||
for (PortalInfo portal : portals) {
|
||||
if (portal.item.equals(item)) {
|
||||
return true;
|
||||
|
@ -90,7 +91,7 @@ public class EndPortals {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private static JsonObject makeDefault(File file) {
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
JsonFactory.storeJson(file, jsonObject);
|
||||
|
@ -100,46 +101,44 @@ public class EndPortals {
|
|||
JsonFactory.storeJson(file, jsonObject);
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
|
||||
private static PortalInfo makeDefault() {
|
||||
return new PortalInfo(new Identifier("minecraft:overworld"), BetterEnd.makeID("eternal_crystal"), 255, 255, 255);
|
||||
return new PortalInfo(new ResourceLocation("minecraft:overworld"), BetterEnd.makeID("eternal_crystal"), 255,
|
||||
255, 255);
|
||||
}
|
||||
|
||||
|
||||
private static class PortalInfo {
|
||||
private final Identifier dimension;
|
||||
private final Identifier item;
|
||||
private final ResourceLocation dimension;
|
||||
private final ResourceLocation item;
|
||||
private final int color;
|
||||
private ServerWorld world;
|
||||
|
||||
private ServerLevel world;
|
||||
|
||||
PortalInfo(JsonObject obj) {
|
||||
this(
|
||||
new Identifier(JsonFactory.getString(obj, "dimension", "minecraft:overworld")),
|
||||
new Identifier(JsonFactory.getString(obj, "item", "betterend:eternal_crystal")),
|
||||
JsonFactory.getInt(obj, "colorRed", 255),
|
||||
JsonFactory.getInt(obj, "colorGreen", 255),
|
||||
JsonFactory.getInt(obj, "colorBlue", 255)
|
||||
);
|
||||
this(new ResourceLocation(JsonFactory.getString(obj, "dimension", "minecraft:overworld")),
|
||||
new ResourceLocation(JsonFactory.getString(obj, "item", "betterend:eternal_crystal")),
|
||||
JsonFactory.getInt(obj, "colorRed", 255), JsonFactory.getInt(obj, "colorGreen", 255),
|
||||
JsonFactory.getInt(obj, "colorBlue", 255));
|
||||
}
|
||||
|
||||
PortalInfo(Identifier dimension, Identifier item, int r, int g, int b) {
|
||||
|
||||
PortalInfo(ResourceLocation dimension, ResourceLocation item, int r, int g, int b) {
|
||||
this.dimension = dimension;
|
||||
this.item = item;
|
||||
this.color = MHelper.color(r, g, b);
|
||||
}
|
||||
|
||||
ServerWorld getWorld(MinecraftServer server) {
|
||||
|
||||
ServerLevel getLevel(MinecraftServer server) {
|
||||
if (world != null) {
|
||||
return world;
|
||||
}
|
||||
for (ServerWorld world : server.getWorlds()) {
|
||||
if (world.getRegistryKey().getValue().equals(dimension)) {
|
||||
for (ServerLevel world : server.getWorlds()) {
|
||||
if (world.dimension().location().equals(dimension)) {
|
||||
this.world = world;
|
||||
return world;
|
||||
}
|
||||
}
|
||||
return server.getOverworld();
|
||||
}
|
||||
|
||||
|
||||
JsonObject toJson() {
|
||||
JsonObject obj = new JsonObject();
|
||||
obj.addProperty("dimension", dimension.toString());
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.core.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
||||
public class EndSounds {
|
||||
|
@ -10,7 +10,7 @@ public class EndSounds {
|
|||
public static final SoundEvent MUSIC_WATER = register("music", "water");
|
||||
public static final SoundEvent MUSIC_DARK = register("music", "dark");
|
||||
public static final SoundEvent MUSIC_OPENSPACE = register("music", "openspace");
|
||||
|
||||
|
||||
// Ambient
|
||||
public static final SoundEvent AMBIENT_FOGGY_MUSHROOMLAND = register("ambient", "foggy_mushroomland");
|
||||
public static final SoundEvent AMBIENT_CHORUS_FOREST = register("ambient", "chorus_forest");
|
||||
|
@ -21,18 +21,19 @@ public class EndSounds {
|
|||
public static final SoundEvent AMBIENT_SULPHUR_SPRINGS = register("ambient", "sulphur_springs");
|
||||
public static final SoundEvent AMBIENT_UMBRELLA_JUNGLE = register("ambient", "umbrella_jungle");
|
||||
public static final SoundEvent AMBIENT_GLOWING_GRASSLANDS = register("ambient", "glowing_grasslands");
|
||||
|
||||
|
||||
// Entity
|
||||
public static final SoundEvent ENTITY_DRAGONFLY = register("entity", "dragonfly");
|
||||
public static final SoundEvent ENTITY_SHADOW_WALKER = register("entity", "shadow_walker");
|
||||
public static final SoundEvent ENTITY_SHADOW_WALKER_DAMAGE = register("entity", "shadow_walker_damage");
|
||||
public static final SoundEvent ENTITY_SHADOW_WALKER_DEATH = register("entity", "shadow_walker_death");
|
||||
|
||||
|
||||
// Records
|
||||
public static final SoundEvent STRANGE_AND_ALIEN = register("record", "strange_and_alien");
|
||||
|
||||
public static void register() {}
|
||||
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
private static SoundEvent register(String type, String id) {
|
||||
id = "betterend." + type + "." + id;
|
||||
return Registry.register(Registry.SOUND_EVENT, id, new SoundEvent(BetterEnd.makeID(id)));
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.util.Collection;
|
|||
import java.util.function.Supplier;
|
||||
|
||||
import net.minecraft.structure.StructurePieceType;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStep.Feature;
|
||||
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
|
||||
|
@ -30,30 +30,43 @@ public class EndStructures {
|
|||
public static final StructurePieceType MOUNTAIN_PIECE = register("mountain_piece", CrystalMountainPiece::new);
|
||||
public static final StructurePieceType CAVE_PIECE = register("cave_piece", CavePiece::new);
|
||||
public static final StructurePieceType LAKE_PIECE = register("lake_piece", LakePiece::new);
|
||||
public static final StructurePieceType PAINTED_MOUNTAIN_PIECE = register("painted_mountain_piece", PaintedMountainPiece::new);
|
||||
public static final StructurePieceType PAINTED_MOUNTAIN_PIECE = register("painted_mountain_piece",
|
||||
PaintedMountainPiece::new);
|
||||
public static final StructurePieceType NBT_PIECE = register("nbt_piece", NBTPiece::new);
|
||||
|
||||
public static final EndStructureFeature GIANT_MOSSY_GLOWSHROOM = new EndStructureFeature("giant_mossy_glowshroom", new GiantMossyGlowshroomStructure(), Feature.SURFACE_STRUCTURES, 16, 8);
|
||||
public static final EndStructureFeature MEGALAKE = new EndStructureFeature("megalake", new MegaLakeStructure(), Feature.RAW_GENERATION, 4, 1);
|
||||
public static final EndStructureFeature MEGALAKE_SMALL = new EndStructureFeature("megalake_small", new MegaLakeSmallStructure(), Feature.RAW_GENERATION, 4, 1);
|
||||
public static final EndStructureFeature MOUNTAIN = new EndStructureFeature("mountain", new MountainStructure(), Feature.RAW_GENERATION, 3, 2);
|
||||
public static final EndStructureFeature PAINTED_MOUNTAIN = new EndStructureFeature("painted_mountain", new PaintedMountainStructure(), Feature.RAW_GENERATION, 3, 2);
|
||||
public static final EndStructureFeature ETERNAL_PORTAL = new EndStructureFeature("eternal_portal", new EternalPortalStructure(), Feature.SURFACE_STRUCTURES, 16, 6);
|
||||
public static final EndStructureFeature GIANT_ICE_STAR = new EndStructureFeature("giant_ice_star", new GiantIceStarStructure(), Feature.SURFACE_STRUCTURES, 16, 8);
|
||||
|
||||
public static void register() {}
|
||||
|
||||
|
||||
public static final EndStructureFeature GIANT_MOSSY_GLOWSHROOM = new EndStructureFeature("giant_mossy_glowshroom",
|
||||
new GiantMossyGlowshroomStructure(), Feature.SURFACE_STRUCTURES, 16, 8);
|
||||
public static final EndStructureFeature MEGALAKE = new EndStructureFeature("megalake", new MegaLakeStructure(),
|
||||
Feature.RAW_GENERATION, 4, 1);
|
||||
public static final EndStructureFeature MEGALAKE_SMALL = new EndStructureFeature("megalake_small",
|
||||
new MegaLakeSmallStructure(), Feature.RAW_GENERATION, 4, 1);
|
||||
public static final EndStructureFeature MOUNTAIN = new EndStructureFeature("mountain", new MountainStructure(),
|
||||
Feature.RAW_GENERATION, 3, 2);
|
||||
public static final EndStructureFeature PAINTED_MOUNTAIN = new EndStructureFeature("painted_mountain",
|
||||
new PaintedMountainStructure(), Feature.RAW_GENERATION, 3, 2);
|
||||
public static final EndStructureFeature ETERNAL_PORTAL = new EndStructureFeature("eternal_portal",
|
||||
new EternalPortalStructure(), Feature.SURFACE_STRUCTURES, 16, 6);
|
||||
public static final EndStructureFeature GIANT_ICE_STAR = new EndStructureFeature("giant_ice_star",
|
||||
new GiantIceStarStructure(), Feature.SURFACE_STRUCTURES, 16, 8);
|
||||
|
||||
public static void register() {
|
||||
}
|
||||
|
||||
private static StructurePieceType register(String id, StructurePieceType pieceType) {
|
||||
return Registry.register(Registry.STRUCTURE_PIECE, BetterEnd.makeID(id), pieceType);
|
||||
}
|
||||
|
||||
public static void registerBiomeStructures(Identifier id, Biome biome, Collection<Supplier<ConfiguredStructureFeature<?, ?>>> structures) {
|
||||
|
||||
public static void registerBiomeStructures(ResourceLocation id, Biome biome,
|
||||
Collection<Supplier<ConfiguredStructureFeature<?, ?>>> structures) {
|
||||
if (!id.getPath().contains("mountain") && !id.getPath().contains("lake")) {
|
||||
addStructure(ETERNAL_PORTAL, structures);
|
||||
}
|
||||
}
|
||||
|
||||
private static void addStructure(EndStructureFeature feature, Collection<Supplier<ConfiguredStructureFeature<?, ?>>> structures) {
|
||||
structures.add(() -> { return feature.getFeatureConfigured(); });
|
||||
|
||||
private static void addStructure(EndStructureFeature feature,
|
||||
Collection<Supplier<ConfiguredStructureFeature<?, ?>>> structures) {
|
||||
structures.add(() -> {
|
||||
return feature.getFeatureConfigured();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,19 +5,19 @@ import java.util.Arrays;
|
|||
import net.fabricmc.fabric.api.tag.TagRegistry;
|
||||
import net.fabricmc.fabric.impl.tool.attribute.ToolManagerImpl;
|
||||
import net.fabricmc.fabric.impl.tool.attribute.handlers.ModdedToolsVanillaBlocksToolHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.tag.ItemTags;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.tag.Tag.Identified;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.FoodComponent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tags.Tag.Identified;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.Category;
|
||||
import net.minecraft.world.gen.surfacebuilder.SurfaceConfig;
|
||||
|
@ -32,7 +32,7 @@ import ru.betterend.util.TagHelper;
|
|||
public class EndTags {
|
||||
// Table with common (c) tags:
|
||||
// https://fabricmc.net/wiki/tutorial:tags
|
||||
|
||||
|
||||
// Block Tags
|
||||
public static final Tag.Identified<Block> BOOKSHELVES = makeCommonBlockTag("bookshelves");
|
||||
public static final Tag.Identified<Block> GEN_TERRAIN = makeBlockTag("gen_terrain");
|
||||
|
@ -41,72 +41,69 @@ public class EndTags {
|
|||
public static final Tag.Identified<Block> BLOCK_CHEST = makeCommonBlockTag("chest");
|
||||
public static final Tag.Identified<Block> END_STONES = makeCommonBlockTag("end_stones");
|
||||
public static final Tag.Identified<Block> DRAGON_IMMUNE = getMCBlockTag("dragon_immune");
|
||||
|
||||
|
||||
// Item Tags
|
||||
public static final Tag.Identified<Item> ITEM_CHEST = makeCommonItemTag("chest");
|
||||
public static final Tag.Identified<Item> IRON_INGOTS = makeCommonItemTag("iron_ingots");
|
||||
public static final Tag.Identified<Item> FURNACES = makeCommonItemTag("furnaces");
|
||||
public final static Tag<Item> HAMMERS = registerFabricItemTag("hammers");
|
||||
|
||||
|
||||
public static Tag.Identified<Block> makeBlockTag(String name) {
|
||||
Identifier id = BetterEnd.makeID(name);
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
Tag<Block> tag = BlockTags.getTagGroup().getTag(id);
|
||||
return tag == null ? (Identified<Block>) TagRegistry.block(id) : (Identified<Block>) tag;
|
||||
}
|
||||
|
||||
|
||||
public static Tag.Identified<Item> makeItemTag(String name) {
|
||||
Identifier id = BetterEnd.makeID(name);
|
||||
ResourceLocation id = BetterEnd.makeID(name);
|
||||
Tag<Item> tag = ItemTags.getTagGroup().getTag(id);
|
||||
return tag == null ? (Identified<Item>) TagRegistry.item(id) : (Identified<Item>) tag;
|
||||
}
|
||||
|
||||
|
||||
public static Tag.Identified<Block> makeCommonBlockTag(String name) {
|
||||
Identifier id = new Identifier("c", name);
|
||||
ResourceLocation id = new ResourceLocation("c", name);
|
||||
Tag<Block> tag = BlockTags.getTagGroup().getTag(id);
|
||||
return tag == null ? (Identified<Block>) TagRegistry.block(id) : (Identified<Block>) tag;
|
||||
}
|
||||
|
||||
|
||||
public static Tag.Identified<Item> makeCommonItemTag(String name) {
|
||||
Identifier id = new Identifier("c", name);
|
||||
ResourceLocation id = new ResourceLocation("c", name);
|
||||
Tag<Item> tag = ItemTags.getTagGroup().getTag(id);
|
||||
return tag == null ? (Identified<Item>) TagRegistry.item(id) : (Identified<Item>) tag;
|
||||
}
|
||||
|
||||
|
||||
public static Tag.Identified<Block> getMCBlockTag(String name) {
|
||||
Identifier id = new Identifier(name);
|
||||
ResourceLocation id = new ResourceLocation(name);
|
||||
Tag<Block> tag = BlockTags.getTagGroup().getTag(id);
|
||||
return tag == null ? (Identified<Block>) TagRegistry.block(id) : (Identified<Block>) tag;
|
||||
}
|
||||
|
||||
|
||||
public static void register() {
|
||||
addSurfaceBlock(Blocks.END_STONE);
|
||||
addSurfaceBlock(EndBlocks.THALLASIUM.ore);
|
||||
addSurfaceBlock(EndBlocks.ENDSTONE_DUST);
|
||||
addSurfaceBlock(EndBlocks.AMBER_ORE);
|
||||
|
||||
|
||||
EndItems.getModBlocks().forEach((item) -> {
|
||||
Block block = ((BlockItem) item).getBlock();
|
||||
if (block instanceof EndTerrainBlock) {
|
||||
addSurfaceBlock(block);
|
||||
TagHelper.addTag(BlockTags.NYLIUM, block);
|
||||
}
|
||||
else if (block instanceof LeavesBlock || block instanceof SimpleLeavesBlock) {
|
||||
} else if (block instanceof LeavesBlock || block instanceof SimpleLeavesBlock) {
|
||||
TagHelper.addTag(BlockTags.LEAVES, block);
|
||||
ComposterBlockAccessor.callRegisterCompostableItem(0.3F, block);
|
||||
}
|
||||
else if (block instanceof VineBlock) {
|
||||
} else if (block instanceof VineBlock) {
|
||||
TagHelper.addTag(BlockTags.CLIMBABLE, block);
|
||||
}
|
||||
else if (block instanceof PedestalBlock) {
|
||||
} else if (block instanceof PedestalBlock) {
|
||||
TagHelper.addTag(PEDESTALS, block);
|
||||
}
|
||||
|
||||
Material mat = block.getDefaultState().getMaterial();
|
||||
|
||||
Material mat = block.defaultBlockState().getMaterial();
|
||||
if (mat.equals(Material.PLANT) || mat.equals(Material.REPLACEABLE_PLANT)) {
|
||||
ComposterBlockAccessor.callRegisterCompostableItem(0.1F, block);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
EndItems.getModItems().forEach((item) -> {
|
||||
if (item.isFood()) {
|
||||
FoodComponent food = item.getFoodComponent();
|
||||
|
@ -114,36 +111,31 @@ public class EndTags {
|
|||
ComposterBlockAccessor.callRegisterCompostableItem(compost, item);
|
||||
}
|
||||
});
|
||||
|
||||
TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone, EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE);
|
||||
|
||||
TagHelper.addTag(GEN_TERRAIN, EndBlocks.ENDER_ORE, EndBlocks.FLAVOLITE.stone, EndBlocks.VIOLECITE.stone,
|
||||
EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE);
|
||||
TagHelper.addTag(END_GROUND, EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE);
|
||||
|
||||
ToolManagerImpl.tag(HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(
|
||||
Arrays.asList(
|
||||
EndItems.IRON_HAMMER,
|
||||
EndItems.GOLDEN_HAMMER,
|
||||
EndItems.DIAMOND_HAMMER,
|
||||
EndItems.NETHERITE_HAMMER,
|
||||
EndItems.AETERNIUM_HAMMER,
|
||||
EndBlocks.THALLASIUM.hammer,
|
||||
EndBlocks.TERMINITE.hammer
|
||||
)
|
||||
));
|
||||
|
||||
ToolManagerImpl.tag(HAMMERS)
|
||||
.register(new ModdedToolsVanillaBlocksToolHandler(Arrays.asList(EndItems.IRON_HAMMER,
|
||||
EndItems.GOLDEN_HAMMER, EndItems.DIAMOND_HAMMER, EndItems.NETHERITE_HAMMER,
|
||||
EndItems.AETERNIUM_HAMMER, EndBlocks.THALLASIUM.hammer, EndBlocks.TERMINITE.hammer)));
|
||||
|
||||
TagHelper.addTag(FURNACES, Blocks.FURNACE);
|
||||
TagHelper.addTag(BlockTags.ANVIL, EndBlocks.AETERNIUM_ANVIL);
|
||||
|
||||
|
||||
TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, EndBlocks.AETERNIUM_BLOCK);
|
||||
TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, EndItems.AETERNIUM_INGOT);
|
||||
|
||||
TagHelper.addTag(EndTags.DRAGON_IMMUNE, EndBlocks.ENDER_ORE, EndBlocks.ETERNAL_PEDESTAL, EndBlocks.FLAVOLITE_RUNED_ETERNAL, EndBlocks.FLAVOLITE_RUNED);
|
||||
|
||||
TagHelper.addTag(EndTags.DRAGON_IMMUNE, EndBlocks.ENDER_ORE, EndBlocks.ETERNAL_PEDESTAL,
|
||||
EndBlocks.FLAVOLITE_RUNED_ETERNAL, EndBlocks.FLAVOLITE_RUNED);
|
||||
}
|
||||
|
||||
|
||||
public static void addSurfaceBlock(Block block) {
|
||||
TagHelper.addTag(END_GROUND, block);
|
||||
TagHelper.addTag(GEN_TERRAIN, block);
|
||||
}
|
||||
|
||||
|
||||
public static void addTerrainTags(Registry<Biome> biomeRegistry) {
|
||||
biomeRegistry.forEach((biome) -> {
|
||||
if (biome.getCategory() == Category.THEEND) {
|
||||
|
@ -156,8 +148,8 @@ public class EndTags {
|
|||
});
|
||||
END_STONES.values().forEach(EndTags::addSurfaceBlock);
|
||||
}
|
||||
|
||||
|
||||
public static Tag<Item> registerFabricItemTag(String name) {
|
||||
return TagRegistry.item(new Identifier("fabric", name));
|
||||
return TagRegistry.item(new ResourceLocation("fabric", name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.world.level.block.AbstractBlock;
|
||||
import ru.betterend.blocks.basis.VineBlock;
|
||||
|
||||
public class FilaluxBlock extends VineBlock {
|
||||
public FilaluxBlock() {
|
||||
super(15, true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AbstractBlock.OffsetType getOffsetType() {
|
||||
return AbstractBlock.OffsetType.NONE;
|
||||
|
|
|
@ -6,36 +6,37 @@ import com.google.common.collect.Maps;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.block.ShapeContext;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import ru.betterend.blocks.basis.AttachedBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
|
||||
public class FilaluxWingsBlock extends AttachedBlock implements IRenderTypeable {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
|
||||
public FilaluxWingsBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).sounds(BlockSoundGroup.WET_GRASS).noCollision());
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).sounds(SoundType.WET_GRASS)
|
||||
.noCollision());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ERenderLayer getRenderLayer() {
|
||||
return ERenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
|
||||
return BOUNDING_SHAPES.get(state.get(FACING));
|
||||
return BOUNDING_SHAPES.get(state.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
BOUNDING_SHAPES.put(Direction.UP, VoxelShapes.cuboid(0.0, 0.0, 0.0, 1.0, 0.5, 1.0));
|
||||
BOUNDING_SHAPES.put(Direction.DOWN, VoxelShapes.cuboid(0.0, 0.5, 0.0, 1.0, 1.0, 1.0));
|
||||
|
|
|
@ -6,56 +6,52 @@ import net.fabricmc.api.EnvType;
|
|||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.level.block.AbstractBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.block.ShapeContext;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
|
||||
|
||||
public class PondAnemoneBlock extends UnderwaterPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(2, 0, 2, 14, 14, 14);
|
||||
|
||||
|
||||
public PondAnemoneBlock() {
|
||||
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.CORAL)
|
||||
.breakByHand(true)
|
||||
.luminance(13)
|
||||
.noCollision());
|
||||
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT).breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(SoundType.CORAL).breakByHand(true).luminance(13).noCollision());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AbstractBlock.OffsetType getOffsetType() {
|
||||
return AbstractBlock.OffsetType.NONE;
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||
public void animateTick(BlockState state, Level world, BlockPos pos, Random random) {
|
||||
double x = pos.getX() + random.nextDouble();
|
||||
double y = pos.getY() + random.nextDouble() * 0.5F + 0.5F;
|
||||
double z = pos.getZ() + random.nextDouble();
|
||||
world.addParticle(ParticleTypes.BUBBLE, x, y, z, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) {
|
||||
public boolean canGrow(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue