Compare commits

..

No commits in common. "a71bd7762cb2ba6dd9570d38c34e54e398c9e406" and "cd0ba2f0e2dcd03b46cbd959539b624e6a0dac70" have entirely different histories.

8 changed files with 6 additions and 157 deletions

View file

@ -1,35 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_sand_tiles": {
"conditions": {
"items": [
{
"items": [
"new_soviet:sand_tiles"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:sand_tiles_stairs"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_sand_tiles",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:sand_tiles_stairs"
]
},
"sends_telemetry_event": false
}

View file

@ -1,35 +0,0 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_light_bulb_item": {
"conditions": {
"items": [
{
"items": [
"new_soviet:light_bulb_item"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "new_soviet:light_bulb"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_light_bulb_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"new_soviet:light_bulb"
]
},
"sends_telemetry_event": false
}

View file

@ -1,24 +0,0 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"X": {
"item": "minecraft:iron_ingot"
},
"Y": {
"item": "minecraft:iron_nugget"
},
"Z": {
"item": "new_soviet:light_bulb_item"
}
},
"pattern": [
" X ",
" Y ",
" Z "
],
"result": {
"item": "new_soviet:light_bulb"
},
"show_notification": true
}

View file

@ -1,19 +0,0 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "new_soviet:sand_tiles"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"count": 4,
"item": "new_soviet:sand_tiles_stairs"
},
"show_notification": true
}

View file

@ -671,13 +671,7 @@ public class DataGeneration implements DataGeneratorEntrypoint {
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_SPRUCE_DOOR, Blocks.SPRUCE_DOOR); offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_SPRUCE_DOOR, Blocks.SPRUCE_DOOR);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_BIRCH_DOOR, Blocks.BIRCH_DOOR); offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_BIRCH_DOOR, Blocks.BIRCH_DOOR);
createStairsRecipe(NSE_Blocks.SAND_TILES_STAIRS, Ingredient.ofItems(NSE_Blocks.SAND_TILES)) createStairsRecipe(NSE_Blocks.SAND_TILES_STAIRS, Ingredient.ofItems(NSE_Blocks.SAND_TILES));
.criterion(hasItem(NSE_Blocks.SAND_TILES), conditionsFromItem(NSE_Blocks.SAND_TILES)).offerTo(exporter);
ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, NSE_Custom.LIGHT_BULB, 1)
.input('X', Items.IRON_INGOT).input('Y', Items.IRON_NUGGET).input('Z', NSE_Items.LIGHT_BULB)
.pattern(" X ").pattern(" Y ").pattern(" Z ")
.criterion(hasItem(NSE_Items.LIGHT_BULB), conditionsFromItem(NSE_Items.LIGHT_BULB)).offerTo(exporter);
} }
} }

View file

@ -4,8 +4,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.block.piston.PistonBehavior; import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemPlacementContext;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.BlockSoundGroup;
@ -21,22 +19,20 @@ import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView; import net.minecraft.world.BlockView;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView; import net.minecraft.world.WorldView;
import su.a71.new_soviet.registration.NSE_Custom; import su.a71.new_soviet.registration.NSE_Custom;
public class SirenBlock extends HorizontalFacingBlock implements Waterloggable { public class SirenBlock extends HorizontalFacingBlock {
public static final BooleanProperty ON; public static final BooleanProperty ON;
public static final BooleanProperty WATERLOGGED;
public SirenBlock() { public SirenBlock() {
super(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f)); super(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f));
setDefaultState(getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH).with(ON, false).with(WATERLOGGED, false)); setDefaultState(getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH).with(ON, false));
} }
@Override @Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) { protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(Properties.HORIZONTAL_FACING, ON, WATERLOGGED); builder.add(Properties.HORIZONTAL_FACING, ON);
} }
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
@ -73,10 +69,7 @@ public class SirenBlock extends HorizontalFacingBlock implements Waterloggable {
@Override @Override
public BlockState getPlacementState(ItemPlacementContext ctx) { public BlockState getPlacementState(ItemPlacementContext ctx) {
return super.getPlacementState(ctx) return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite()).with(ON, ctx.getWorld().isReceivingRedstonePower(ctx.getBlockPos()));
.with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite())
.with(ON, ctx.getWorld().isReceivingRedstonePower(ctx.getBlockPos()))
.with(WATERLOGGED, ctx.getWorld().getFluidState(ctx.getBlockPos()).getFluid() == Fluids.WATER);
} }
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
@ -105,20 +98,7 @@ public class SirenBlock extends HorizontalFacingBlock implements Waterloggable {
}; };
} }
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
if (state.get(WATERLOGGED)) {
world.scheduleFluidTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
}
return state.get(FACING).getOpposite() == direction && !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
}
public FluidState getFluidState(BlockState state) {
return state.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state);
}
static { static {
ON = RedstoneTorchBlock.LIT; ON = RedstoneTorchBlock.LIT;
WATERLOGGED = Properties.WATERLOGGED;
} }
} }

View file

@ -143,18 +143,6 @@
"block.new_soviet.chiseled_spruce_door": "Chiseled Spruce Door", "block.new_soviet.chiseled_spruce_door": "Chiseled Spruce Door",
"block.new_soviet.chiseled_birch_door": "Chiseled Birch Door", "block.new_soviet.chiseled_birch_door": "Chiseled Birch Door",
"subtitles.new_soviet.siren": "Siren goes off", "subtitles.new_soviet.siren": "Siren goes off",
"block.new_soviet.yellow_concrete": "Yellow Concrete",
"block.new_soviet.beige_concrete": "Beige Concrete",
"block.new_soviet.white_concrete": "White Concrete",
"block.new_soviet.green_concrete": "Green Concrete",
"block.new_soviet.blue_concrete": "Blue Concrete",
"block.new_soviet.red_concrete": "Red Concrete",
"block.new_soviet.cracked_yellow_concrete": "Cracked Yellow Concrete",
"block.new_soviet.cracked_beige_concrete": "Cracked Beige Concrete",
"block.new_soviet.cracked_white_concrete": "Cracked White Concrete",
"block.new_soviet.cracked_green_concrete": "Cracked Green Concrete",
"block.new_soviet.cracked_blue_concrete": "Cracked Blue Concrete",
"block.new_soviet.cracked_red_concrete": "Cracked Red Concrete",
"block.new_soviet.yellow_concrete_with_bars": "Yellow Concrete With Bars", "block.new_soviet.yellow_concrete_with_bars": "Yellow Concrete With Bars",
"block.new_soviet.beige_concrete_with_bars": "Beige Concrete With Bars", "block.new_soviet.beige_concrete_with_bars": "Beige Concrete With Bars",
"block.new_soviet.white_concrete_with_bars": "White Concrete With Bars", "block.new_soviet.white_concrete_with_bars": "White Concrete With Bars",

View file

@ -1 +1 @@
File light_bulb_broken.ogg is converted .mp3 file which was made by Mike Koenig and licensed under CC Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/). Original file is available at https://soundbible.com/105-Light-Bulb-Breaking.html File light_bulb_broken.ogg is converted .mp3 file made by Mike Koenig, which is licensed under CC Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/). Original file is available at https://soundbible.com/105-Light-Bulb-Breaking.html