Remove redundant "Soviet Combat" tab, add stuff

This commit is contained in:
Andrew-71 2023-08-07 19:50:58 +03:00
parent a71bd7762c
commit 8033255f7d
17 changed files with 59 additions and 54 deletions

View file

@ -1,3 +1,19 @@
# Блоки и функционал
## Высокий приоритет
Это критично прямо сейчас
* Добавить коричневые, жёлтые, красные и зелёные блоки.
* Сделать datagen для ступеней и полублоков, затем добавить их
## Средний приоритет
Нужно до 1.0, но не полностью ломает мод
* Механика окон
* Двери с ключами
* Духовка
## Низкий приоритет
* Терминал
=== ADD BLOCKS/FEATURES === === ADD BLOCKS/FEATURES ===
* Add brown+yellow+red+green blocks * Add brown+yellow+red+green blocks
* Add slab and stair variations * Add slab and stair variations
@ -17,4 +33,6 @@
* Good README.md and icon, assets, screenshots etc. * Good README.md and icon, assets, screenshots etc.
=== ACHIEVEMENTS === === ACHIEVEMENTS ===
Kolkhoz warrior - kill a zombie, skeleton, creeper and spider with a sickle Kolkhoz warrior - kill a zombie, skeleton, creeper and spider with a sickle
=== Блоки и функционал ===

BIN
media/NSElogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
media/nse_scr1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 KiB

BIN
media/nse_scr2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 KiB

BIN
media/nse_scr3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

View file

@ -24,7 +24,6 @@ import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags; import net.minecraft.registry.tag.BlockTags;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import su.a71.new_soviet.registration.NSE_Blocks; import su.a71.new_soviet.registration.NSE_Blocks;
import su.a71.new_soviet.registration.NSE_Combat;
import su.a71.new_soviet.registration.NSE_Custom; import su.a71.new_soviet.registration.NSE_Custom;
import su.a71.new_soviet.registration.NSE_Items; import su.a71.new_soviet.registration.NSE_Items;
@ -689,6 +688,7 @@ public class DataGeneration implements DataGeneratorEntrypoint {
@Override @Override
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) { public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
// BlockStateModelGenerator.createStairsBlockState(NSE_Blocks.SAND_TILES_STAIRS, new Identifier(NewSoviet.MOD_ID, "sand_tiles_stairs"));
} }
@Override @Override

View file

@ -8,7 +8,6 @@ import net.minecraft.util.math.random.Random;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import su.a71.new_soviet.registration.NSE_Blocks; import su.a71.new_soviet.registration.NSE_Blocks;
import su.a71.new_soviet.registration.NSE_Combat;
import su.a71.new_soviet.registration.NSE_Custom; import su.a71.new_soviet.registration.NSE_Custom;
import su.a71.new_soviet.registration.NSE_Items; import su.a71.new_soviet.registration.NSE_Items;
@ -31,6 +30,5 @@ public class NewSoviet implements ModInitializer {
NSE_Blocks.initFlame(); NSE_Blocks.initFlame();
NSE_Items.init(); NSE_Items.init();
NSE_Custom.init(); NSE_Custom.init();
NSE_Combat.init();
} }
} }

View file

@ -19,7 +19,6 @@ public class TVBlock extends HorizontalFacingBlock {
setDefaultState(getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH)); setDefaultState(getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH));
} }
@Override @Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) { protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(Properties.HORIZONTAL_FACING); builder.add(Properties.HORIZONTAL_FACING);

View file

@ -0,0 +1,36 @@
package su.a71.new_soviet.entity;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.util.math.BlockPos;
public class TVBlockEntity extends BlockEntity {
/*
Digit Color
0 black
1 red
2 green
3 yellow
4 blue
5 magenta
6 cyan
7 white
*/
public int[][] display;
public TVBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
}
@Override
protected void writeNbt(NbtCompound nbt) {
//nbt.putIntArray();
super.writeNbt(nbt);
}
@Override
public void readNbt(NbtCompound nbt) {
super.readNbt(nbt);
}
}

View file

@ -1,48 +0,0 @@
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.block.MapColor;
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.text.Text;
import net.minecraft.util.Identifier;
import su.a71.new_soviet.NewSoviet;
import su.a71.new_soviet.blocks.*;
import java.util.Optional;
import java.util.function.Supplier;
public class NSE_Combat {
public static final LandMineBlock LANDMINE = new LandMineBlock(FabricBlockSettings.create().mapColor(MapColor.LIGHT_GRAY));
private static final ItemGroup NSE_COMBAT_TAB = FabricItemGroup.builder()
.icon(() -> new ItemStack(LANDMINE))
.displayName(Text.translatable("itemGroup.new_soviet.combat"))
.build();
private static void register(String name, Supplier<? extends Block> supplier, ItemGroup tab) {
Registry.register(Registries.BLOCK, new Identifier(NewSoviet.MOD_ID, name), supplier.get());
BlockItem blockItem = new BlockItem(supplier.get(), new FabricItemSettings());
Registry.register(Registries.ITEM, new Identifier(NewSoviet.MOD_ID, name), blockItem);
Optional<RegistryKey<ItemGroup>> key = Registries.ITEM_GROUP.getKey(tab);
key.ifPresent(itemGroupRegistryKey -> ItemGroupEvents.modifyEntriesEvent(itemGroupRegistryKey).register(content -> {
content.add(blockItem);
}));
}
public static void init() {
Registry.register(Registries.ITEM_GROUP, new Identifier("new_soviet", "combat"), NSE_COMBAT_TAB);
register("landmine", () -> LANDMINE, NSE_COMBAT_TAB);
}
}

View file

@ -37,6 +37,8 @@ public class NSE_Custom {
public static final SirenBlock SIREN = new SirenBlock(); public static final SirenBlock SIREN = new SirenBlock();
public static final SoundEvent SIREN_SOUND = SoundEvent.of(new Identifier("new_soviet", "siren_sound")); public static final SoundEvent SIREN_SOUND = SoundEvent.of(new Identifier("new_soviet", "siren_sound"));
public static final LandMineBlock LANDMINE = new LandMineBlock(FabricBlockSettings.create().mapColor(MapColor.LIGHT_GRAY));
private static final ItemGroup NSE_CUSTOM_TAB = FabricItemGroup.builder() private static final ItemGroup NSE_CUSTOM_TAB = FabricItemGroup.builder()
.icon(() -> new ItemStack(TV)) .icon(() -> new ItemStack(TV))
.displayName(Text.translatable("itemGroup.new_soviet.custom")) .displayName(Text.translatable("itemGroup.new_soviet.custom"))
@ -64,6 +66,7 @@ public class NSE_Custom {
register("light_bulb", () -> LIGHT_BULB, NSE_CUSTOM_TAB); register("light_bulb", () -> LIGHT_BULB, NSE_CUSTOM_TAB);
register("ceiling_fan", () -> CEILING_FAN, NSE_CUSTOM_TAB); register("ceiling_fan", () -> CEILING_FAN, NSE_CUSTOM_TAB);
register("siren", () -> SIREN, NSE_CUSTOM_TAB); register("siren", () -> SIREN, NSE_CUSTOM_TAB);
register("landmine", () -> LANDMINE, NSE_CUSTOM_TAB);
Registry.register(Registries.SOUND_EVENT, new Identifier("new_soviet", "siren_sound"), SIREN_SOUND); Registry.register(Registries.SOUND_EVENT, new Identifier("new_soviet", "siren_sound"), SIREN_SOUND);
Registry.register(Registries.SOUND_EVENT, new Identifier("new_soviet", "light_bulb_broken_sound"), LIGHT_BULB_BROKEN_SOUND); Registry.register(Registries.SOUND_EVENT, new Identifier("new_soviet", "light_bulb_broken_sound"), LIGHT_BULB_BROKEN_SOUND);

View file

@ -2,7 +2,6 @@
"itemGroup.new_soviet.building_blocks": "Soviet Building Blocks", "itemGroup.new_soviet.building_blocks": "Soviet Building Blocks",
"itemGroup.new_soviet.items": "Soviet Items", "itemGroup.new_soviet.items": "Soviet Items",
"itemGroup.new_soviet.custom": "Soviet Additions", "itemGroup.new_soviet.custom": "Soviet Additions",
"itemGroup.new_soviet.combat": "Soviet Combat",
"block.new_soviet.sand_tiles": "Sand Tiles", "block.new_soviet.sand_tiles": "Sand Tiles",
"block.new_soviet.cracked_sand_tiles": "Cracked Sand Tiles", "block.new_soviet.cracked_sand_tiles": "Cracked Sand Tiles",
"block.new_soviet.mossy_sand_tiles": "Mossy Sand Tiles", "block.new_soviet.mossy_sand_tiles": "Mossy Sand Tiles",

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B