Initially add changes, god this will take a while

This commit is contained in:
Andrew-71 2023-08-13 22:25:32 +03:00
parent b43a0668aa
commit 0fad36a08c
272 changed files with 3438 additions and 197 deletions

View file

@ -0,0 +1,62 @@
package su.a71.new_soviet.Materials;
import net.fabricmc.yarn.constants.MiningLevels;
import net.minecraft.item.Items;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.util.Lazy;
import java.util.function.Supplier;
public enum NSE_ToolMaterials implements ToolMaterial
{
IRON_FOR_RAKE(MiningLevels.IRON, 800, 15.0f, 2.0f, 14, () -> Ingredient.ofItems(Items.IRON_INGOT));
private final int miningLevel;
private final int itemDurability;
private final float miningSpeed;
private final float attackDamage;
private final int enchantability;
private final Lazy<Ingredient> repairIngredient;
private NSE_ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
this.miningLevel = miningLevel;
this.itemDurability = itemDurability;
this.miningSpeed = miningSpeed;
this.attackDamage = attackDamage;
this.enchantability = enchantability;
this.repairIngredient = new Lazy<Ingredient>(repairIngredient);
}
@Override
public int getDurability() {
return this.itemDurability;
}
@Override
public float getMiningSpeedMultiplier() {
return this.miningSpeed;
}
@Override
public float getAttackDamage() {
return this.attackDamage;
}
@Override
public int getMiningLevel() {
return this.miningLevel;
}
@Override
public int getEnchantability() {
return this.enchantability;
}
@Override
public Ingredient getRepairIngredient() {
return this.repairIngredient.get();
}
}

View file

@ -1,6 +1,8 @@
package su.a71.new_soviet.blocks;
import net.minecraft.block.*;
import net.minecraft.particle.DustParticleEffect;
import net.minecraft.text.Text;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.fluid.FluidState;
@ -25,6 +27,7 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
import org.jetbrains.annotations.Nullable;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.registration.NSE_Custom;
import su.a71.new_soviet.registration.NSE_Items;
@ -70,15 +73,28 @@ public class LightBulbBlock extends Block implements Waterloggable {
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
if (!world.isClient && state.get(BROKEN) && player.getInventory().getMainHandStack().getItem() == NSE_Items.LIGHT_BULB) {
if (!world.isClient && state.get(BROKEN) && player.getInventory().getMainHandStack().getItem() == NSE_Items.LIGHT_BULB && !world.isReceivingRedstonePower(pos)) {
if (!player.isCreative())
player.getInventory().getMainHandStack().decrement(1);
world.setBlockState(pos, (BlockState)state.with(BROKEN, false)
.with(ON, world.isReceivingRedstonePower(pos)), 2);
world.setBlockState(pos, (BlockState)state.with(BROKEN, false));
//.with(ON, world.isReceivingRedstonePower(pos)), 2);
} else if (!world.isClient && state.get(BROKEN) && player.getInventory().getMainHandStack().getItem() == NSE_Items.LIGHT_BULB) {
player.sendMessage(Text.translatable("block.new_soviet.light_bulb_block.energized"));
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.ELECTRIC_HIT, SoundCategory.AMBIENT, 0.8f, 1f);
if (!player.isCreative()) {
player.heal(-1 * NewSoviet.RANDOM.nextBetween(1, 4));
}
if (NewSoviet.RANDOM.nextBetween(1, 32) == 1){
if (!player.isCreative())
player.getInventory().getMainHandStack().decrement(1);
world.setBlockState(pos, (BlockState)state.with(BROKEN, false)
.with(ON, world.isReceivingRedstonePower(pos)), 2);
}
}
return super.onUse(state, world, pos, player, hand, hit);
}
@Override
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) {
if (!state.get(BROKEN)) {

View file

@ -0,0 +1,115 @@
package su.a71.new_soviet.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.*;
import net.minecraft.block.enums.WallMountLocation;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particle.DustParticleEffect;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
import net.minecraft.world.event.GameEvent;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.sounds.Sounds;
public class SwitchBlock extends LeverBlock {
public static final BooleanProperty POWERED = Properties.POWERED;
protected static final VoxelShape NORTH_WALL_SHAPE = Block.createCuboidShape(5.5, 5.5, 15, 10.5, 10.5, 16);
protected static final VoxelShape SOUTH_WALL_SHAPE = Block.createCuboidShape(5.5, 5.5, 0, 10.5, 10.5, 1);
protected static final VoxelShape WEST_WALL_SHAPE = Block.createCuboidShape(15, 5.5, 5.5, 16, 10.5, 10.5);
protected static final VoxelShape EAST_WALL_SHAPE = Block.createCuboidShape(0.0, 5.5, 5.5, 1, 10.5, 10.5);
protected static final VoxelShape FLOOR_Z_AXIS_SHAPE = Block.createCuboidShape(5.5, 0.0, 5.5, 10.5, 1, 10.5);
protected static final VoxelShape FLOOR_X_AXIS_SHAPE = Block.createCuboidShape(5.5, 0.0, 5.5, 10.5, 1, 10.5);
protected static final VoxelShape CEILING_Z_AXIS_SHAPE = Block.createCuboidShape(5.5, 15.0, 5.5, 10.5, 16.0, 10.5);
protected static final VoxelShape CEILING_X_AXIS_SHAPE = Block.createCuboidShape(5.5, 15.0, 5.5, 10.5, 16.0, 10.5);
public SwitchBlock(FabricBlockSettings fabricBlockSettings) {
super(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f).mapColor(MapColor.TERRACOTTA_WHITE).noCollision());
this.setDefaultState((BlockState)((BlockState)((BlockState)((BlockState)this.stateManager.getDefaultState()).with(FACING, Direction.NORTH)).with(POWERED, false)).with(FACE, WallMountLocation.WALL));
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
switch ((WallMountLocation)state.get(FACE)) {
case FLOOR: {
switch (state.get(FACING).getAxis()) {
case X: {
return FLOOR_X_AXIS_SHAPE;
}
}
return FLOOR_Z_AXIS_SHAPE;
}
case WALL: {
switch (state.get(FACING)) {
case EAST: {
return EAST_WALL_SHAPE;
}
case WEST: {
return WEST_WALL_SHAPE;
}
case SOUTH: {
return SOUTH_WALL_SHAPE;
}
}
return NORTH_WALL_SHAPE;
}
}
switch (state.get(FACING).getAxis()) {
case X: {
return CEILING_X_AXIS_SHAPE;
}
}
return CEILING_Z_AXIS_SHAPE;
}
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
if (world.isClient) {
BlockState blockState = (BlockState)state.cycle(POWERED);
return ActionResult.SUCCESS;
}
BlockState blockState = this.togglePower(state, world, pos);
float f = blockState.get(POWERED) != false ? 1f : 0.9f;
world.playSound(null, pos, Sounds.SWITCH_PRESS, SoundCategory.BLOCKS, 0.6f, f);
world.emitGameEvent((Entity)player, blockState.get(POWERED) != false ? GameEvent.BLOCK_ACTIVATE : GameEvent.BLOCK_DEACTIVATE, pos);
return ActionResult.CONSUME;
}
private static void spawnParticles(BlockState state, WorldAccess world, BlockPos pos, float alpha) {
Direction direction = state.get(FACING).getOpposite();
Direction direction2 = SwitchBlock.getDirection(state).getOpposite();
double d = (double)pos.getX() + 0.5 + 0.1 * (double)direction.getOffsetX() + 0.2 * (double)direction2.getOffsetX();
double e = (double)pos.getY() + 0.5 + 0.1 * (double)direction.getOffsetY() + 0.2 * (double)direction2.getOffsetY();
double f = (double)pos.getZ() + 0.5 + 0.1 * (double)direction.getOffsetZ() + 0.2 * (double)direction2.getOffsetZ();
world.addParticle(new DustParticleEffect(DustParticleEffect.RED, alpha), d, e, f, 0.0, 0.0, 0.0);
}
@Override
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
if (state.get(POWERED).booleanValue() && random.nextFloat() < 0.25f) {
//SwitchBlock.spawnParticles(state, world, pos, 0.5f);
}
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(FACE, FACING, POWERED);
}
}

View file

@ -1,49 +0,0 @@
package su.a71.new_soviet.items;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.sound.SoundCategory;
import net.minecraft.stat.Stats;
import net.minecraft.text.Text;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.registration.NSE_Items;
import java.util.List;
public class DiceD20Item extends Item {
public DiceD20Item(Settings settings) {
super(settings);
}
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
ItemStack itemStack = user.getStackInHand(hand);
user.getItemCooldownManager().set(this, 20 * itemStack.getCount());
if (!world.isClient) {
StringBuilder output = new StringBuilder();
for (var i = 0; i < itemStack.getCount(); i++) {
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), NSE_Items.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
output.append(NewSoviet.RANDOM.nextBetween(1, this.getSides())).append(", ");
}
user.sendMessage(Text.translatable(itemStack.getCount() == 1 ? "item.new_soviet.dice.thrown" : "item.new_soviet.dice.thrown_multiple").append(" " + output.subSequence(0, output.length() - 2)));
}
user.increaseStat(Stats.USED.getOrCreateStat(this), itemStack.getCount());
return TypedActionResult.success(itemStack, world.isClient());
}
public int getSides() {
return 20;
}
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
tooltip.add(Text.translatable("item.new_soviet.dice_d20.tooltip"));
super.appendTooltip(stack, world, tooltip, context);
}
}

View file

@ -1,49 +0,0 @@
package su.a71.new_soviet.items;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.sound.SoundCategory;
import net.minecraft.stat.Stats;
import net.minecraft.text.Text;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.registration.NSE_Items;
import java.util.List;
public class DiceD4Item extends Item {
public DiceD4Item(Settings settings) {
super(settings);
}
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
ItemStack itemStack = user.getStackInHand(hand);
user.getItemCooldownManager().set(this, 20 * itemStack.getCount());
if (!world.isClient) {
StringBuilder output = new StringBuilder();
for (var i = 0; i < itemStack.getCount(); i++) {
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), NSE_Items.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
output.append(NewSoviet.RANDOM.nextBetween(1, this.getSides())).append(", ");
}
user.sendMessage(Text.translatable(itemStack.getCount() == 1 ? "item.new_soviet.dice.thrown" : "item.new_soviet.dice.thrown_multiple").append(" " + output.subSequence(0, output.length() - 2)));
}
user.increaseStat(Stats.USED.getOrCreateStat(this), itemStack.getCount());
return TypedActionResult.success(itemStack, world.isClient());
}
public int getSides() {
return 4;
}
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
tooltip.add(Text.translatable("item.new_soviet.dice_d4.tooltip"));
super.appendTooltip(stack, world, tooltip, context);
}
}

View file

@ -12,13 +12,18 @@ import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.registration.NSE_Items;
import su.a71.new_soviet.sounds.Sounds;
import java.util.List;
public class DiceItem extends Item {
public DiceItem(Settings settings) {
private final int sides;
private final String loacl_tooltip;
public DiceItem(int sides, String localTooltip, Settings settings) {
super(settings);
this.sides = sides;
this.loacl_tooltip = localTooltip;
}
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
@ -27,7 +32,7 @@ public class DiceItem extends Item {
if (!world.isClient) {
StringBuilder output = new StringBuilder();
for (var i = 0; i < itemStack.getCount(); i++) {
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), NSE_Items.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
world.playSound((PlayerEntity)null, user.getX(), user.getY(), user.getZ(), Sounds.DICE_SOUND, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
output.append(NewSoviet.RANDOM.nextBetween(1, this.getSides())).append(", ");
}
user.sendMessage(Text.translatable(itemStack.getCount() == 1 ? "item.new_soviet.dice.thrown" : "item.new_soviet.dice.thrown_multiple").append(" " + output.subSequence(0, output.length() - 2)));
@ -38,12 +43,12 @@ public class DiceItem extends Item {
}
public int getSides() {
return 6;
return sides;
}
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
tooltip.add(Text.translatable("item.new_soviet.dice_d6.tooltip"));
tooltip.add(Text.translatable(loacl_tooltip));
super.appendTooltip(stack, world, tooltip, context);
}
}

View file

@ -0,0 +1,75 @@
package su.a71.new_soviet.items;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.mojang.datafixers.util.Pair;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.*;
import net.minecraft.sound.SoundCategory;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;
import su.a71.new_soviet.sounds.Sounds;
import su.a71.new_soviet.util.NSE_Tags;
import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Predicate;
public class RakeItem extends MiningToolItem {
protected static final Map<Block, Pair<Predicate<ItemUsageContext>, Consumer<ItemUsageContext>>> TILLING_ACTIONS = Maps.newHashMap(ImmutableMap.of(Blocks.GRASS_BLOCK, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT_PATH, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.DIRT, Pair.of(HoeItem::canTillFarmland, RakeItem.createTillAction(Blocks.FARMLAND.getDefaultState())), Blocks.COARSE_DIRT, Pair.of(RakeItem::canTillFarmland, RakeItem.createTillAction(Blocks.DIRT.getDefaultState())), Blocks.ROOTED_DIRT, Pair.of(itemUsageContext -> true, RakeItem.createTillAndDropAction(Blocks.DIRT.getDefaultState(), Items.HANGING_ROOTS))));
public RakeItem(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
super(attackDamage, attackSpeed, material, NSE_Tags.Blocks.RAKE_MINEABLE, settings);
}
public ActionResult useOnBlock(ItemUsageContext context) {
BlockPos blockPos;
World world = context.getWorld();
Pair<Predicate<ItemUsageContext>, Consumer<ItemUsageContext>> pair = TILLING_ACTIONS.get(world.getBlockState(blockPos = context.getBlockPos()).getBlock());
if (pair == null) {
return ActionResult.PASS;
}
Predicate<ItemUsageContext> predicate = pair.getFirst();
Consumer<ItemUsageContext> consumer = pair.getSecond();
if (predicate.test(context)) {
PlayerEntity playerEntity = context.getPlayer();
world.playSound(playerEntity, blockPos, Sounds.ITEM_RAKE_TILL, SoundCategory.BLOCKS, 1.0f, 1.0f);
if (!world.isClient) {
consumer.accept(context);
if (playerEntity != null) {
context.getStack().damage(1, playerEntity, p -> p.sendToolBreakStatus(context.getHand()));
}
}
return ActionResult.success(world.isClient);
}
return ActionResult.PASS;
}
public static Consumer<ItemUsageContext> createTillAction(BlockState result) {
return context -> {
context.getWorld().setBlockState(context.getBlockPos(), result, Block.NOTIFY_ALL | Block.REDRAW_ON_MAIN_THREAD);
context.getWorld().emitGameEvent(GameEvent.BLOCK_CHANGE, context.getBlockPos(), GameEvent.Emitter.of(context.getPlayer(), result));
};
}
public static Consumer<ItemUsageContext> createTillAndDropAction(BlockState result, ItemConvertible droppedItem) {
return context -> {
context.getWorld().setBlockState(context.getBlockPos(), result, Block.NOTIFY_ALL | Block.REDRAW_ON_MAIN_THREAD);
context.getWorld().emitGameEvent(GameEvent.BLOCK_CHANGE, context.getBlockPos(), GameEvent.Emitter.of(context.getPlayer(), result));
Block.dropStack(context.getWorld(), context.getBlockPos(), context.getSide(), new ItemStack(droppedItem));
};
}
public static boolean canTillFarmland(ItemUsageContext context) {
return context.getSide() != Direction.DOWN && context.getWorld().getBlockState(context.getBlockPos().up()).isAir();
}
}

View file

@ -12,11 +12,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.resource.featuretoggle.FeatureFlag;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.text.Text;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.blocks.ConcreteWithBarsBlock;
import su.a71.new_soviet.sounds.Sounds;
import java.util.Optional;
import java.util.function.Supplier;
@ -24,7 +27,7 @@ import java.util.function.Supplier;
public class NSE_Blocks {
// BUILDING BRICKS/TILES ====================
public static final Block SAND_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.MUD_BRICKS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TERRACOTTA_BROWN));
public static final Block SAND_TILES = new Block(FabricBlockSettings.create().sounds(Sounds.SAND_TILES_SOUNDS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TERRACOTTA_BROWN));
public static final StairsBlock SAND_TILES_STAIRS = new StairsBlock(SAND_TILES.getDefaultState(), FabricBlockSettings.copy(SAND_TILES));
public static final Block CRACKED_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block MOSSY_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
@ -32,12 +35,28 @@ public class NSE_Blocks {
public static final Block SMALL_CRACKED_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block HERRINGBONE_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block CROSS_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block BIG_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block BIG_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES).sounds(BlockSoundGroup.DECORATED_POT));
public static final Block SAND_BRICKS = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block CRACKED_SAND_BRICKS = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block MOSSY_SAND_BRICKS = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block BIG_SAND_BRICKS = new Block(FabricBlockSettings.copy(SAND_TILES));
//bricks
public static final Block BRICK_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TERRACOTTA_BROWN));
public static final Block CRACKED_BRICK_TILES = new Block(FabricBlockSettings.copy(BRICK_TILES));
public static final Block MOSSY_BRICK_TILES = new Block(FabricBlockSettings.copy(BRICK_TILES));
public static final Block DIRTY_BRICK_TILES = new Block(FabricBlockSettings.copy(BRICK_TILES));
public static final Block DARK_BRICK_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.DARK_RED));
public static final Block CRACKED_DARK_BRICK_TILES = new Block(FabricBlockSettings.copy(DARK_BRICK_TILES));
public static final Block MOSSY_DARK_BRICK_TILES = new Block(FabricBlockSettings.copy(DARK_BRICK_TILES));
public static final Block DIRTY_DARK_BRICK_TILES = new Block(FabricBlockSettings.copy(DARK_BRICK_TILES));
public static final Block GLAZED_BRICK_TILES = new Block(FabricBlockSettings.copy(BRICK_TILES));
public static final Block CRACKED_GLAZED_BRICK_TILES = new Block(FabricBlockSettings.copy(BRICK_TILES));
//red bricks
public static final Block RED_BRICKS = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.DEEPSLATE_BRICKS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.RED));
public static final Block CRACKED_RED_BRICKS = new Block(FabricBlockSettings.copy(RED_BRICKS));
public static final Block MOSSY_RED_BRICKS = new Block(FabricBlockSettings.copy(RED_BRICKS));
//teal
public static final Block TEAL_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TEAL));
public static final Block CRACKED_TEAL_TILES = new Block(FabricBlockSettings.copy(TEAL_TILES));
public static final Block MOSSY_TEAL_TILES = new Block(FabricBlockSettings.copy(TEAL_TILES));
@ -47,6 +66,16 @@ public class NSE_Blocks {
public static final Block CRACKED_GLAZED_TEAL_TILES = new Block(FabricBlockSettings.copy(TEAL_TILES));
public static final Block VARIATED_TEAL_TILES = new Block(FabricBlockSettings.copy(TEAL_TILES));
public static final Block BIG_GREEN_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.DECORATED_POT).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TEAL));
public static final Block BIG_GREEN_TILES_CRACKED = new Block(FabricBlockSettings.copy(BIG_GREEN_TILES));
public static final Block GREEN_BRICKS = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.NETHER_BRICKS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.DARK_GREEN));
public static final Block CRACKED_GREEN_BRICKS = new Block(FabricBlockSettings.copy(GREEN_BRICKS));
public static final Block MOSSY_GREEN_BRICKS = new Block(FabricBlockSettings.copy(GREEN_BRICKS));
public static final Block GREEN_BRICKS_2 = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.NETHER_BRICKS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.DARK_GREEN));
public static final Block CRACKED_GREEN_BRICKS_2 = new Block(FabricBlockSettings.copy(GREEN_BRICKS_2));
public static final Block MOSSY_GREEN_BRICKS_2 = new Block(FabricBlockSettings.copy(GREEN_BRICKS_2));
public static final Block AQUAMARINE_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.DARK_AQUA));
public static final Block CRACKED_AQUAMARINE_TILES = new Block(FabricBlockSettings.copy(AQUAMARINE_TILES));
public static final Block MOSSY_AQUAMARINE_TILES = new Block(FabricBlockSettings.copy(AQUAMARINE_TILES));
@ -68,6 +97,12 @@ public class NSE_Blocks {
public static final Block MOSSY_CALCITE_TILES = new Block(FabricBlockSettings.copy(Blocks.CALCITE));
public static final Block DIAGONAL_CALCITE_TILES = new Block(FabricBlockSettings.copy(Blocks.CALCITE));
//NII WALLS
public static final Block NII_WALL_1 = new Block(FabricBlockSettings.copy(Blocks.DIORITE));
public static final Block CRACKED_NII_WALL_1 = new Block(FabricBlockSettings.copy(NSE_Blocks.NII_WALL_1));
public static final Block NII_WALL_2 = new Block(FabricBlockSettings.copy(NSE_Blocks.NII_WALL_1).mapColor(DyeColor.LIGHT_GRAY));
public static final Block NII_WALL_3 = new Block(FabricBlockSettings.copy(NSE_Blocks.NII_WALL_1).mapColor(DyeColor.GRAY));
//DRIPSTONE
public static final Block DRIPSTONE_TILES = new Block(FabricBlockSettings.copy(Blocks.DRIPSTONE_BLOCK));
public static final Block CRACKED_DRIPSTONE_TILES = new Block(FabricBlockSettings.copy(Blocks.DRIPSTONE_BLOCK));
public static final Block MOSSY_DRIPSTONE_TILES = new Block(FabricBlockSettings.copy(Blocks.DRIPSTONE_BLOCK));
@ -83,6 +118,7 @@ public class NSE_Blocks {
public static final Block LIGHT_BLUE_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.LIGHT_BLUE));
public static final Block CRACKED_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block MOSSY_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block VARIATED_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES).strength(1.5f, 6f).requiresTool().mapColor(MapColor.LIGHT_BLUE));
public static final Block SMALL_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block SMALL_CRACKED_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block GLAZED_LIGHT_BLUE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
@ -108,9 +144,12 @@ public class NSE_Blocks {
public static final Block MOSSY_TUFF_BRICKS = new Block(FabricBlockSettings.copy(Blocks.TUFF));
public static final Block SMALL_WHITE_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.WHITE));
public static final Block SMALL_CRACKED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block CRACKED_GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block SMALL_CRACKED_WHITE_TILES = new Block(FabricBlockSettings.copy(SMALL_WHITE_TILES));
public static final Block GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(SMALL_WHITE_TILES));
public static final Block CRACKED_GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(SMALL_WHITE_TILES));
public static final Block SMALL_YELLOW_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.YELLOW));
public static final Block SMALL_CRACKED_YELLOW_TILES = new Block(FabricBlockSettings.copy(SMALL_YELLOW_TILES));
public static final Block WHITEWASH = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.OFF_WHITE));
public static final Block CRACKED_WHITEWASH = new Block(FabricBlockSettings.copy(WHITEWASH));
@ -135,29 +174,29 @@ public class NSE_Blocks {
public static final Block CRACKED_GREEN_CONCRETE = new Block(FabricBlockSettings.copy(WHITE_CONCRETE).mapColor(MapColor.TERRACOTTA_GREEN));
public static final ConcreteWithBarsBlock GREEN_CONCRETE_WITH_BARS = new ConcreteWithBarsBlock(FabricBlockSettings.copy(WHITE_CONCRETE).mapColor(MapColor.TERRACOTTA_GREEN));
// WOOD/FLOOR ======
public static final Block HERRINGBONE_ACACIA_PLANKS = new Block(FabricBlockSettings.copy(Blocks.ACACIA_PLANKS));
public static final Block CROSS_ACACIA_PLANKS = new Block(FabricBlockSettings.copy(Blocks.ACACIA_PLANKS));
public static final Block HERRINGBONE_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.OAK_PLANKS));
public static final Block CROSS_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.OAK_PLANKS));
public static final Block HERRINGBONE_BIRCH_PLANKS = new Block(FabricBlockSettings.copy(Blocks.BIRCH_PLANKS));
public static final Block CROSS_BIRCH_PLANKS = new Block(FabricBlockSettings.copy(Blocks.BIRCH_PLANKS));
public static final Block HERRINGBONE_CRIMSON_PLANKS = new Block(FabricBlockSettings.copy(Blocks.CRIMSON_PLANKS));
public static final Block CROSS_CRIMSON_PLANKS = new Block(FabricBlockSettings.copy(Blocks.CRIMSON_PLANKS));
public static final Block HERRINGBONE_DARK_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.DARK_OAK_PLANKS));
public static final Block CROSS_DARK_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.DARK_OAK_PLANKS));
public static final Block HERRINGBONE_JUNGLE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.JUNGLE_PLANKS));
public static final Block CROSS_JUNGLE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.JUNGLE_PLANKS));
public static final Block HERRINGBONE_MANGROVE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.MANGROVE_PLANKS));
public static final Block CROSS_MANGROVE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.MANGROVE_PLANKS));
public static final Block HERRINGBONE_SPRUCE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.SPRUCE_PLANKS));
public static final Block CROSS_SPRUCE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.SPRUCE_PLANKS));
// WOOD/FLOOR ==========
public static final Block HERRINGBONE_ACACIA_PLANKS = new Block(FabricBlockSettings.copy(Blocks.ACACIA_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_ACACIA_PLANKS = new Block(FabricBlockSettings.copy(Blocks.ACACIA_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.OAK_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.OAK_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_BIRCH_PLANKS = new Block(FabricBlockSettings.copy(Blocks.BIRCH_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_BIRCH_PLANKS = new Block(FabricBlockSettings.copy(Blocks.BIRCH_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_CRIMSON_PLANKS = new Block(FabricBlockSettings.copy(Blocks.CRIMSON_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_CRIMSON_PLANKS = new Block(FabricBlockSettings.copy(Blocks.CRIMSON_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_DARK_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.DARK_OAK_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_DARK_OAK_PLANKS = new Block(FabricBlockSettings.copy(Blocks.DARK_OAK_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_JUNGLE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.JUNGLE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_JUNGLE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.JUNGLE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_MANGROVE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.MANGROVE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_MANGROVE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.MANGROVE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_SPRUCE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.SPRUCE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block CROSS_SPRUCE_PLANKS = new Block(FabricBlockSettings.copy(Blocks.SPRUCE_PLANKS).sounds(Sounds.PARQUET_SOUNDS));
public static final Block HERRINGBONE_PARQUET = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.WOOD).strength(2f, 3f).mapColor(MapColor.OAK_TAN));
public static final Block HERRINGBONE_PARQUET = new Block(FabricBlockSettings.create().sounds(Sounds.PARQUET_SOUNDS).strength(2f, 3f).mapColor(MapColor.OAK_TAN));
public static final Block STRAIGHT_PARQUET = new Block(FabricBlockSettings.copy(HERRINGBONE_PARQUET));
public static final Block SEPARATED_PARQUET = new Block(FabricBlockSettings.copy(HERRINGBONE_PARQUET));
public static final Block GREEN_LINOLEUM = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.WOOD).strength(2, 3f).mapColor(MapColor.TERRACOTTA_GREEN));
public static final Block GREEN_LINOLEUM = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.CHERRY_WOOD).strength(2, 3f).mapColor(MapColor.TERRACOTTA_GREEN));
public static final Block BLUE_LINOLEUM = new Block(FabricBlockSettings.copy(GREEN_LINOLEUM).mapColor(MapColor.TERRACOTTA_BLUE));
public static final Block RED_LINOLEUM = new Block(FabricBlockSettings.copy(GREEN_LINOLEUM).mapColor(MapColor.TERRACOTTA_RED));
public static final Block GRAY_LINOLEUM = new Block(FabricBlockSettings.copy(GREEN_LINOLEUM).mapColor(MapColor.TERRACOTTA_GRAY));
@ -172,7 +211,10 @@ public class NSE_Blocks {
public static final DoorBlock CHISELED_SPRUCE_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.SPRUCE_DOOR), BlockSetType.SPRUCE);
public static final DoorBlock CHISELED_BIRCH_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.BIRCH_DOOR), BlockSetType.BIRCH);
// Industrial =====================================
public static final Block NII_FLOOR = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.POLISHED_DEEPSLATE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.GRAY));
// Industrial ==========
public static final Block INDUSTRIAL_WARNING = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).hardness(4f).resistance(6f).requiresTool().mapColor(MapColor.BLACK));
public static final Block RED_WARNING = new Block(FabricBlockSettings.copy(INDUSTRIAL_WARNING).mapColor(MapColor.RED));
public static final Block ORANGE_WARNING = new Block(FabricBlockSettings.copy(INDUSTRIAL_WARNING).mapColor(MapColor.ORANGE));
@ -186,10 +228,21 @@ public class NSE_Blocks {
public static final Block PURPLE_WARNING = new Block(FabricBlockSettings.copy(INDUSTRIAL_WARNING).mapColor(MapColor.PURPLE));
public static final Block MAGENTA_WARNING = new Block(FabricBlockSettings.copy(INDUSTRIAL_WARNING).mapColor(MapColor.MAGENTA));
public static final Block METAL_PLATING = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).hardness(5f).requiresTool().mapColor(MapColor.IRON_GRAY));
public static final Block CRATE = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.WOOD).nonOpaque().mapColor(MapColor.OAK_TAN));
public static final Block METAL_PLATING = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.NETHERITE).hardness(5f).requiresTool().mapColor(MapColor.IRON_GRAY));
public static final BarrelBlock CRATE = new BarrelBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.CHISELED_BOOKSHELF).nonOpaque().mapColor(MapColor.OAK_TAN).hardness(1.8f));
public static final WallBlock CONCRETE_WALL = new WallBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).mapColor(MapColor.STONE_GRAY));
// MEAT ==========
public static final Block MEAT = new Block(FabricBlockSettings.create().velocityMultiplier(0.8f).sounds(Sounds.MEAT_SOUNDS).nonOpaque().mapColor(MapColor.DARK_RED).hardness(8f));
public static final Block MEAT_EYE = new Block(FabricBlockSettings.copy(MEAT));
public static final Block MEAT_TEETH = new Block(FabricBlockSettings.copy(MEAT));
// WALLPAPER BLOCKS ==========
public static final Block GREEN_WALLPAPER = new Block(FabricBlockSettings.create().sounds(Sounds.WALLPAPER_BLOCK_SOUNDS).nonOpaque().mapColor(MapColor.DARK_GREEN).hardness(10f));
public static final Block BROWN_WALLPAPER = new Block(FabricBlockSettings.copy(GREEN_WALLPAPER).mapColor(MapColor.BROWN));
public static final Block BEIGE_WALLPAPER = new Block(FabricBlockSettings.copy(GREEN_WALLPAPER).mapColor(MapColor.DIRT_BROWN));
public static final SnowBlock PURPLE_GOO = new SnowBlock(FabricBlockSettings.copy(MEAT).hardness(1.2f).nonOpaque());
private static final ItemGroup NSE_BUILDING_TAB = FabricItemGroup.builder()
.icon(() -> new ItemStack(CALCITE_TILES))
.displayName(Text.translatable("itemGroup.new_soviet.building_blocks"))
@ -222,6 +275,22 @@ public class NSE_Blocks {
register("cracked_sand_bricks", () -> CRACKED_SAND_BRICKS, NSE_BUILDING_TAB);
register("mossy_sand_bricks", () -> MOSSY_SAND_BRICKS, NSE_BUILDING_TAB);
register("big_sand_bricks", () -> BIG_SAND_BRICKS, NSE_BUILDING_TAB);
//brick
register("brick_tiles", () -> BRICK_TILES, NSE_BUILDING_TAB);
register("cracked_brick_tiles", () -> CRACKED_BRICK_TILES, NSE_BUILDING_TAB);
register("mossy_brick_tiles", () -> MOSSY_BRICK_TILES, NSE_BUILDING_TAB);
register("dirty_brick_tiles", () -> DIRTY_BRICK_TILES, NSE_BUILDING_TAB);
register("dark_brick_tiles", () -> DARK_BRICK_TILES, NSE_BUILDING_TAB);
register("cracked_dark_brick_tiles", () -> CRACKED_DARK_BRICK_TILES, NSE_BUILDING_TAB);
register("mossy_dark_brick_tiles", () -> MOSSY_DARK_BRICK_TILES, NSE_BUILDING_TAB);
register("dirty_dark_brick_tiles", () -> DIRTY_DARK_BRICK_TILES, NSE_BUILDING_TAB);
register("glazed_brick_tiles", () -> GLAZED_BRICK_TILES, NSE_BUILDING_TAB);
register("cracked_glazed_brick_tiles", () -> CRACKED_GLAZED_BRICK_TILES, NSE_BUILDING_TAB);
//red bricks
register("red_bricks", () -> RED_BRICKS, NSE_BUILDING_TAB);
register("cracked_red_bricks", () -> CRACKED_RED_BRICKS, NSE_BUILDING_TAB);
register("mossy_red_bricks", () -> MOSSY_RED_BRICKS, NSE_BUILDING_TAB);
//teal
register("teal_tiles", () -> TEAL_TILES, NSE_BUILDING_TAB);
register("cracked_teal_tiles", () -> CRACKED_TEAL_TILES, NSE_BUILDING_TAB);
register("mossy_teal_tiles", () -> MOSSY_TEAL_TILES, NSE_BUILDING_TAB);
@ -230,6 +299,16 @@ public class NSE_Blocks {
register("glazed_teal_tiles", () -> GLAZED_TEAL_TILES, NSE_BUILDING_TAB);
register("cracked_glazed_teal_tiles", () -> CRACKED_GLAZED_TEAL_TILES, NSE_BUILDING_TAB);
register("variated_teal_tiles", () -> VARIATED_TEAL_TILES, NSE_BUILDING_TAB);
register("big_green_tiles", () -> BIG_GREEN_TILES, NSE_BUILDING_TAB);
register("big_green_tiles_cracked", () -> BIG_GREEN_TILES_CRACKED, NSE_BUILDING_TAB);
register("green_bricks", () -> GREEN_BRICKS, NSE_BUILDING_TAB);
register("cracked_green_bricks", () -> CRACKED_GREEN_BRICKS, NSE_BUILDING_TAB);
register("mossy_green_bricks", () -> MOSSY_GREEN_BRICKS, NSE_BUILDING_TAB);
register("green_bricks_2", () -> GREEN_BRICKS_2, NSE_BUILDING_TAB);
register("cracked_green_bricks_2", () -> CRACKED_GREEN_BRICKS_2, NSE_BUILDING_TAB);
register("mossy_green_bricks_2", () -> MOSSY_GREEN_BRICKS_2, NSE_BUILDING_TAB);
register("aquamarine_tiles", () -> AQUAMARINE_TILES, NSE_BUILDING_TAB);
register("cracked_aquamarine_tiles", () -> CRACKED_AQUAMARINE_TILES, NSE_BUILDING_TAB);
register("mossy_aquamarine_tiles", () -> MOSSY_AQUAMARINE_TILES, NSE_BUILDING_TAB);
@ -248,6 +327,12 @@ public class NSE_Blocks {
register("cracked_calcite_tiles", () -> CRACKED_CALCITE_TILES, NSE_BUILDING_TAB);
register("mossy_calcite_tiles", () -> MOSSY_CALCITE_TILES, NSE_BUILDING_TAB);
register("diagonal_calcite_tiles", () -> DIAGONAL_CALCITE_TILES, NSE_BUILDING_TAB);
//nii walls
register("nii_wall_1", () -> NII_WALL_1, NSE_BUILDING_TAB);
register("cracked_nii_wall_1", () -> CRACKED_NII_WALL_1, NSE_BUILDING_TAB);
register("nii_wall_2", () -> NII_WALL_2, NSE_BUILDING_TAB);
register("nii_wall_3", () -> NII_WALL_3, NSE_BUILDING_TAB);
//dripstone
register("dripstone_tiles", () -> DRIPSTONE_TILES, NSE_BUILDING_TAB);
register("cracked_dripstone_tiles", () -> CRACKED_DRIPSTONE_TILES, NSE_BUILDING_TAB);
register("mossy_dripstone_tiles", () -> MOSSY_DRIPSTONE_TILES, NSE_BUILDING_TAB);
@ -261,6 +346,7 @@ public class NSE_Blocks {
register("light_blue_tiles", () -> LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("cracked_light_blue_tiles", () -> CRACKED_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("mossy_light_blue_tiles", () -> MOSSY_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("variated_light_blue_tiles", () -> VARIATED_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("small_light_blue_tiles", () -> SMALL_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("small_cracked_light_blue_tiles", () -> SMALL_CRACKED_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
register("glazed_light_blue_tiles", () -> GLAZED_LIGHT_BLUE_TILES, NSE_BUILDING_TAB);
@ -286,6 +372,9 @@ public class NSE_Blocks {
register("glazed_white_tiles", () -> GLAZED_WHITE_TILES, NSE_BUILDING_TAB);
register("cracked_glazed_white_tiles", () -> CRACKED_GLAZED_WHITE_TILES, NSE_BUILDING_TAB);
register("small_yellow_tiles", () -> SMALL_YELLOW_TILES, NSE_BUILDING_TAB);
register("small_cracked_yellow_tiles", () -> SMALL_CRACKED_YELLOW_TILES, NSE_BUILDING_TAB);
register("whitewash", () -> WHITEWASH, NSE_BUILDING_TAB);
register("cracked_whitewash", () -> CRACKED_WHITEWASH, NSE_BUILDING_TAB);
register("very_cracked_whitewash", () -> VERY_CRACKED_WHITEWASH, NSE_BUILDING_TAB);
@ -309,6 +398,8 @@ public class NSE_Blocks {
register("cracked_green_concrete", () -> CRACKED_GREEN_CONCRETE, NSE_BUILDING_TAB);
register("green_concrete_with_bars", () -> GREEN_CONCRETE_WITH_BARS, NSE_BUILDING_TAB);
register("nii_floor", () -> NII_FLOOR, NSE_BUILDING_TAB);
register("herringbone_acacia_planks", () -> HERRINGBONE_ACACIA_PLANKS, NSE_BUILDING_TAB);
register("cross_acacia_planks", () -> CROSS_ACACIA_PLANKS, NSE_BUILDING_TAB);
register("herringbone_oak_planks", () -> HERRINGBONE_OAK_PLANKS, NSE_BUILDING_TAB);
@ -361,6 +452,15 @@ public class NSE_Blocks {
register("metal_plating", () -> METAL_PLATING, NSE_BUILDING_TAB);
register("crate", () -> CRATE, NSE_BUILDING_TAB);
register("concrete_wall", () -> CONCRETE_WALL, NSE_BUILDING_TAB); // TODO: Broken
register("meat", () -> MEAT, NSE_BUILDING_TAB);
register("meat_eye", () -> MEAT_EYE, NSE_BUILDING_TAB);
register("meat_teeth", () -> MEAT_TEETH, NSE_BUILDING_TAB);
register("purple_goo", () -> PURPLE_GOO, NSE_BUILDING_TAB);
register("green_wallpaper", () -> GREEN_WALLPAPER, NSE_BUILDING_TAB);
register("brown_wallpaper", () -> BROWN_WALLPAPER, NSE_BUILDING_TAB);
register("beige_wallpaper", () -> BEIGE_WALLPAPER, NSE_BUILDING_TAB);
}
public static void initFlame() {

View file

@ -9,6 +9,7 @@ import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.MapColor;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
@ -36,6 +37,8 @@ public class NSE_Custom {
FabricBlockEntityTypeBuilder.create(TVBlockEntity::new, TV, RED_TV, BROWN_TV).build()
);
public static final RadioBlock RADIO = new RadioBlock();
public static final SwitchBlock SWITCH = new SwitchBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f).mapColor(MapColor.TERRACOTTA_WHITE));
public static final LampBlock LAMP = new LampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.LANTERN).strength(1f, 1.5f).mapColor(MapColor.WHITE));
public static final LightBulbBlock LIGHT_BULB = new LightBulbBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.GLASS).strength(1f, 1.5f).mapColor(MapColor.WHITE));
public static final SoundEvent LIGHT_BULB_BROKEN_SOUND = SoundEvent.of(new Identifier(NewSoviet.MOD_ID, "light_bulb_broken_sound"));
@ -45,7 +48,9 @@ public class NSE_Custom {
public static final SirenBlock SIREN = new SirenBlock();
public static final SoundEvent SIREN_SOUND = SoundEvent.of(new Identifier(NewSoviet.MOD_ID, "siren_sound"));
public static final LandMineBlock LANDMINE = new LandMineBlock(FabricBlockSettings.create().mapColor(MapColor.LIGHT_GRAY).offset(AbstractBlock.OffsetType.XZ).dynamicBounds().strength(3f, 2f));
public static final SoundEvent ELECTRIC_HIT = SoundEvent.of(new Identifier(NewSoviet.MOD_ID, "electric_hit"));
public static final LandMineBlock LANDMINE = new LandMineBlock(FabricBlockSettings.create().mapColor(MapColor.LIGHT_GRAY).offset(AbstractBlock.OffsetType.XZ).dynamicBounds());
private static final ItemGroup NSE_CUSTOM_TAB = FabricItemGroup.builder()
.icon(() -> new ItemStack(TV))
@ -75,6 +80,7 @@ public class NSE_Custom {
register("ceiling_fan", () -> CEILING_FAN, NSE_CUSTOM_TAB);
register("siren", () -> SIREN, NSE_CUSTOM_TAB);
register("landmine", () -> LANDMINE, NSE_CUSTOM_TAB);
register("switch", () -> SWITCH, NSE_CUSTOM_TAB);
Registry.register(Registries.SOUND_EVENT, new Identifier(NewSoviet.MOD_ID, "siren_sound"), SIREN_SOUND);
Registry.register(Registries.SOUND_EVENT, new Identifier(NewSoviet.MOD_ID, "light_bulb_broken_sound"), LIGHT_BULB_BROKEN_SOUND);

View file

@ -1,40 +1,37 @@
package su.a71.new_soviet.registration;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.item.*;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundEvent;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import java.util.Optional;
import java.util.function.Supplier;
import net.minecraft.util.Rarity;
import su.a71.new_soviet.Materials.NSE_ToolMaterials;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.items.DiceD20Item;
import su.a71.new_soviet.items.DiceD4Item;
import su.a71.new_soviet.items.DiceItem;
import su.a71.new_soviet.items.RakeItem;
public class NSE_Items {
// Like an iron axe but a hoe and slightly faster (-2.8f vs -3.1f) and a bit weaker (6 vs 6.5 damage)
public static final ToolItem SICKLE = new HoeItem(ToolMaterials.IRON, 6, -2.8F, new Item.Settings());
public static final FoodComponent COCONUT_FC = (new FoodComponent.Builder()).hunger(4).saturationModifier(1.2F).statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 100, 1), 1.0F).statusEffect(new StatusEffectInstance(StatusEffects.ABSORPTION, 2400, 0), 1.0F).alwaysEdible().build();
public static final Item COCONUT = new Item(new Item.Settings().food(COCONUT_FC).rarity(Rarity.EPIC));
public static final RakeItem RAKE = new RakeItem(NSE_ToolMaterials.IRON_FOR_RAKE, 6, -2.6F, new Item.Settings());
public static final DiceItem DICE_D6 = new DiceItem(new Item.Settings().maxCount(6));
public static final DiceD4Item DICE_D4 = new DiceD4Item(new Item.Settings().maxCount(6));
public static final DiceD20Item DICE_D20 = new DiceD20Item(new Item.Settings().maxCount(6));
public static final SoundEvent DICE_SOUND = SoundEvent.of(new Identifier("new_soviet", "dice_sound"));
//public static final FoodComponent COCONUT_FC = (new FoodComponent.Builder()).hunger(4).saturationModifier(1.2F).statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 100, 1), 1.0F).statusEffect(new StatusEffectInstance(StatusEffects.ABSORPTION, 2400, 0), 1.0F).alwaysEdible().build();
public static final FoodComponent CONCENTRATE_FC = (new FoodComponent.Builder()).hunger(5).saturationModifier(1.0F).alwaysEdible().build();
public static final Item CONCENTRATE = new Item(new Item.Settings().food(CONCENTRATE_FC));
//public static final Item COCONUT = new Item(new Item.Settings().food(COCONUT_FC).rarity(Rarity.EPIC));
public static final DiceItem DICE_D6 = new DiceItem(6, "item.new_soviet.dice_d6.tooltip", new Item.Settings().maxCount(6));
public static final DiceItem DICE_D4 = new DiceItem(4, "item.new_soviet.dice_d4.tooltip", new Item.Settings().maxCount(6));
public static final DiceItem DICE_D20 = new DiceItem(20, "item.new_soviet.dice_d20.tooltip", new Item.Settings().maxCount(6));
public static final Item LIGHT_BULB = new Item(new Item.Settings());
@ -56,12 +53,12 @@ public class NSE_Items {
public static void init() {
Registry.register(Registries.ITEM_GROUP, new Identifier("new_soviet", "items"), NSE_ITEMS_TAB);
register("sickle", () -> SICKLE, NSE_ITEMS_TAB);
register("coconut", () -> COCONUT, NSE_ITEMS_TAB);
register("rake", () -> RAKE, NSE_ITEMS_TAB);
register("concentrate", () -> CONCENTRATE, NSE_ITEMS_TAB);
//register("coconut", () -> COCONUT, NSE_ITEMS_TAB);
register("dice_d6", () -> DICE_D6, NSE_ITEMS_TAB);
register("dice_d4", () -> DICE_D4, NSE_ITEMS_TAB);
register("dice_d20", () -> DICE_D20, NSE_ITEMS_TAB);
register("light_bulb_item", () -> LIGHT_BULB, NSE_ITEMS_TAB);
Registry.register(Registries.SOUND_EVENT, new Identifier("new_soviet", "dice_sound"), DICE_SOUND);
}
}

View file

@ -0,0 +1,45 @@
package su.a71.new_soviet.sounds;
import net.minecraft.block.Blocks;
import net.minecraft.sound.SoundEvents;
import su.a71.new_soviet.NewSoviet;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;
public class Sounds {
//dice sound
public static SoundEvent DICE_SOUND = registerSoundEvent("dice_sound");
//parquet sounds
public static SoundEvent PARQUET_WALK = registerSoundEvent("parquet_walk");
public static final BlockSoundGroup PARQUET_SOUNDS = new BlockSoundGroup(1f, 1f,
BlockSoundGroup.CHERRY_WOOD.getBreakSound(), Sounds.PARQUET_WALK, BlockSoundGroup.CHERRY_WOOD.getPlaceSound(),
BlockSoundGroup.CHERRY_WOOD.getHitSound(), Sounds.PARQUET_WALK);
//meat sounds
public static final BlockSoundGroup MEAT_SOUNDS = new BlockSoundGroup(1f, 1f,
BlockSoundGroup.MUD.getBreakSound(), BlockSoundGroup.HONEY.getStepSound(), BlockSoundGroup.MUD.getPlaceSound(),
BlockSoundGroup.MUD.getHitSound(), BlockSoundGroup.HONEY.getStepSound());
//switch sound
public static SoundEvent SWITCH_PRESS = registerSoundEvent("switch_press");
//sand tiles sounds
public static final BlockSoundGroup SAND_TILES_SOUNDS = new BlockSoundGroup(1f, 0.8f,
BlockSoundGroup.MUD_BRICKS.getBreakSound(), BlockSoundGroup.DECORATED_POT.getStepSound(), BlockSoundGroup.MUD_BRICKS.getPlaceSound(),
BlockSoundGroup.MUD_BRICKS.getHitSound(), BlockSoundGroup.DECORATED_POT.getStepSound());
//wallpaper block sounds
public static final BlockSoundGroup WALLPAPER_BLOCK_SOUNDS = new BlockSoundGroup(1f, 0.7f,
BlockSoundGroup.BAMBOO_WOOD.getBreakSound(), BlockSoundGroup.WOOL.getStepSound(), BlockSoundGroup.BAMBOO_WOOD.getPlaceSound(),
BlockSoundGroup.WOOL.getHitSound(), BlockSoundGroup.WOOL.getStepSound());
//rake sound
public static SoundEvent ITEM_RAKE_TILL = registerSoundEvent("item_rake_till");
private static SoundEvent registerSoundEvent(String name) {
Identifier id = new Identifier(NewSoviet.MOD_ID, name);
return Registry.register(Registries.SOUND_EVENT, id, SoundEvent.of(id));
}
}

View file

@ -0,0 +1,17 @@
package su.a71.new_soviet.util;
import net.minecraft.block.Block;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;
import su.a71.new_soviet.NewSoviet;
public class NSE_Tags {
public class Blocks {
public static final TagKey<Block> RAKE_MINEABLE =
createTag("rake");
private static TagKey<Block> createTag(String name) {
return TagKey.of(RegistryKeys.BLOCK, new Identifier(NewSoviet.MOD_ID, name));
}
}
}