Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.util;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.StalactiteBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.BlueVineBlock;
|
||||
import org.betterx.betterend.blocks.basis.FurBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,13 +20,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.dimension.DimensionType;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.StalactiteBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.BlueVineBlock;
|
||||
import org.betterx.betterend.blocks.basis.FurBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.IntStream;
|
||||
|
@ -129,7 +130,7 @@ public class BlockFixer {
|
|||
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(
|
||||
level,
|
||||
p
|
||||
)) {
|
||||
)) {
|
||||
add.add(p);
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +139,7 @@ public class BlockFixer {
|
|||
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(
|
||||
level,
|
||||
p
|
||||
)) {
|
||||
)) {
|
||||
add.add(p);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package org.betterx.betterend.util;
|
||||
|
||||
import org.betterx.bclib.api.v2.BonemealAPI;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.BonemealAPI;
|
||||
import org.betterx.betterend.blocks.basis.EndTerrainBlock;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -33,7 +34,7 @@ public class BonemealPlants {
|
|||
EndBiomes.GLOWING_GRASSLANDS.getID(),
|
||||
EndBlocks.BLOOMING_COOKSONIA,
|
||||
EndBlocks.END_MOSS
|
||||
);
|
||||
);
|
||||
BonemealAPI.addLandGrass(EndBiomes.GLOWING_GRASSLANDS.getID(), EndBlocks.VAIOLUSH_FERN, EndBlocks.END_MOSS);
|
||||
BonemealAPI.addLandGrass(EndBiomes.GLOWING_GRASSLANDS.getID(), EndBlocks.FRACTURN, EndBlocks.END_MOSS);
|
||||
BonemealAPI.addLandGrass(EndBiomes.GLOWING_GRASSLANDS.getID(), EndBlocks.SALTEAGO, EndBlocks.END_MOSS);
|
||||
|
@ -43,19 +44,19 @@ public class BonemealPlants {
|
|||
EndBlocks.CREEPING_MOSS,
|
||||
EndBlocks.END_MOSS,
|
||||
0.1F
|
||||
);
|
||||
);
|
||||
BonemealAPI.addLandGrass(
|
||||
EndBiomes.GLOWING_GRASSLANDS.getID(),
|
||||
EndBlocks.UMBRELLA_MOSS,
|
||||
EndBlocks.END_MOSS,
|
||||
0.1F
|
||||
);
|
||||
);
|
||||
BonemealAPI.addLandGrass(
|
||||
EndBiomes.GLOWING_GRASSLANDS.getID(),
|
||||
EndBlocks.TWISTED_UMBRELLA_MOSS,
|
||||
EndBlocks.END_MOSS,
|
||||
0.1F
|
||||
);
|
||||
);
|
||||
|
||||
BonemealAPI.addLandGrass(EndBlocks.ORANGO, EndBlocks.RUTISCUS);
|
||||
BonemealAPI.addLandGrass(EndBlocks.AERIDIUM, EndBlocks.RUTISCUS, 0.2F);
|
||||
|
@ -71,13 +72,13 @@ public class BonemealPlants {
|
|||
EndBlocks.SANGNUM,
|
||||
EndBlocks.MOSSY_OBSIDIAN,
|
||||
EndBlocks.MOSSY_DRAGON_BONE
|
||||
);
|
||||
);
|
||||
BonemealAPI.addLandGrass(
|
||||
EndBlocks.CLAWFERN,
|
||||
EndBlocks.SANGNUM,
|
||||
EndBlocks.MOSSY_OBSIDIAN,
|
||||
EndBlocks.MOSSY_DRAGON_BONE
|
||||
);
|
||||
);
|
||||
BonemealAPI.addLandGrass(EndBlocks.SANGNUM, EndBlocks.SMALL_AMARANITA_MUSHROOM, 0.1F);
|
||||
BonemealAPI.addLandGrass(EndBlocks.SMALL_AMARANITA_MUSHROOM, EndBlocks.MOSSY_OBSIDIAN, 0.1F);
|
||||
BonemealAPI.addLandGrass(EndBlocks.SMALL_AMARANITA_MUSHROOM, EndBlocks.MOSSY_DRAGON_BONE, 0.1F);
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.util;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.complexmaterials.WoodenComplexMaterial;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
@ -11,15 +19,8 @@ import net.minecraft.world.level.storage.loot.entries.LootItem;
|
|||
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
||||
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.complexmaterials.WoodenComplexMaterial;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
|
||||
|
||||
public class LootTableUtil {
|
||||
private static final ResourceLocation END_CITY_TREASURE_ID = new ResourceLocation("chests/end_city_treasure");
|
||||
|
@ -49,7 +50,7 @@ public class LootTableUtil {
|
|||
} else if (id.getNamespace().equals(BetterEnd.MOD_ID)) {
|
||||
addCommonItems(table);
|
||||
if (FOGGY_MUSHROOMLAND.equals(id)) {
|
||||
LootPool.Builder builder =LootPool.lootPool();
|
||||
LootPool.Builder builder = LootPool.lootPool();
|
||||
builder.setRolls(UniformGenerator.between(4, 8));
|
||||
builder.add(LootItem.lootTableItem(EndBlocks.MOSSY_GLOWSHROOM.getBlock(WoodenComplexMaterial.BLOCK_PLANKS)));
|
||||
builder.add(LootItem.lootTableItem(EndBlocks.MOSSY_GLOWSHROOM_SAPLING));
|
||||
|
@ -71,7 +72,7 @@ public class LootTableUtil {
|
|||
builder.add(LootItem.lootTableItem(EndItems.SHADOW_BERRY_RAW));
|
||||
table.withPool(builder);
|
||||
} else if (LANTERN_WOODS.equals(id)) {
|
||||
LootPool.Builder builder =LootPool.lootPool();
|
||||
LootPool.Builder builder = LootPool.lootPool();
|
||||
builder.setRolls(UniformGenerator.between(4, 8));
|
||||
builder.add(LootItem.lootTableItem(EndBlocks.LUCERNIA.getBlock(WoodenComplexMaterial.BLOCK_PLANKS)));
|
||||
builder.add(LootItem.lootTableItem(EndBlocks.LUCERNIA_SAPLING));
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.util;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,10 +17,6 @@ import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -38,7 +39,7 @@ public class StructureErode {
|
|||
state,
|
||||
world,
|
||||
mut
|
||||
) && random.nextInt(8) == 0 && world.isEmptyBlock(
|
||||
) && random.nextInt(8) == 0 && world.isEmptyBlock(
|
||||
mut.below(2))) {
|
||||
int r = MHelper.randRange(1, 4, random);
|
||||
int cx = mut.getX();
|
||||
|
@ -66,7 +67,7 @@ public class StructureErode {
|
|||
world.getBlockState(mut),
|
||||
world,
|
||||
mut
|
||||
)) {
|
||||
)) {
|
||||
BlocksHelper.setWithoutUpdate(world, mut, Blocks.AIR);
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +103,7 @@ public class StructureErode {
|
|||
world.getBlockState(mut.above()),
|
||||
world,
|
||||
mut
|
||||
)) {
|
||||
)) {
|
||||
BlocksHelper.setWithoutUpdate(world, mut, Blocks.AIR);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue