注册充电站方块

This commit is contained in:
17146 2024-12-06 21:55:15 +08:00
parent 320d4e0950
commit f839d00768
12 changed files with 97 additions and 45 deletions

View file

@ -1,6 +1,7 @@
// 1.20.1 2024-11-28T19:45:16.1283469 Loot Tables // 1.20.1 2024-12-06T21:51:55.0829733 Loot Tables
98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_tables/blocks/barbed_wire.json 98386b2e65b2afb7cf5b0cabf6a7b0f062c1e640 data/superbwarfare/loot_tables/blocks/barbed_wire.json
811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_tables/blocks/cemented_carbide_block.json 811e69929a14e6736015849c220100bb58d914c9 data/superbwarfare/loot_tables/blocks/cemented_carbide_block.json
9e4d3e3c60529571c1902818916ffe72dd2dbc2a data/superbwarfare/loot_tables/blocks/charging_station.json
8ed3f1d518c86fe6ed14f14f3121c2e24e109269 data/superbwarfare/loot_tables/blocks/container.json 8ed3f1d518c86fe6ed14f14f3121c2e24e109269 data/superbwarfare/loot_tables/blocks/container.json
dabbe17417c944567dc6dfcdcba32b8377c24f69 data/superbwarfare/loot_tables/blocks/deepslate_galena_ore.json dabbe17417c944567dc6dfcdcba32b8377c24f69 data/superbwarfare/loot_tables/blocks/deepslate_galena_ore.json
a7c1af3e194d35a64544902468bd964f45f2f9ef data/superbwarfare/loot_tables/blocks/deepslate_scheelite_ore.json a7c1af3e194d35a64544902468bd964f45f2f9ef data/superbwarfare/loot_tables/blocks/deepslate_scheelite_ore.json

View file

@ -1,5 +1,5 @@
// 1.20.1 2024-11-28T19:20:29.861331 Tags for minecraft:block mod id superbwarfare // 1.20.1 2024-12-06T21:51:55.0782775 Tags for minecraft:block mod id superbwarfare
0acfd31854bf15f2c108138b3df7206bd2593e6b data/minecraft/tags/blocks/mineable/axe.json 0acfd31854bf15f2c108138b3df7206bd2593e6b data/minecraft/tags/blocks/mineable/axe.json
e059c279c01c012fe89bd4bfadf8cd6d70b3b948 data/minecraft/tags/blocks/mineable/pickaxe.json e78725c77652a79d8e1fa4a614b7b75027aa1883 data/minecraft/tags/blocks/mineable/pickaxe.json
3da7f021790388a122717f16f51c7ec5232eebcb data/minecraft/tags/blocks/mineable/shovel.json 3da7f021790388a122717f16f51c7ec5232eebcb data/minecraft/tags/blocks/mineable/shovel.json
f42a8c01336e64b74da966f03d45ee0d60ac5d6b data/minecraft/tags/blocks/needs_iron_tool.json f42a8c01336e64b74da966f03d45ee0d60ac5d6b data/minecraft/tags/blocks/needs_iron_tool.json

View file

@ -14,6 +14,7 @@
"superbwarfare:deepslate_silver_ore", "superbwarfare:deepslate_silver_ore",
"superbwarfare:silver_block", "superbwarfare:silver_block",
"superbwarfare:jump_pad", "superbwarfare:jump_pad",
"superbwarfare:container" "superbwarfare:container",
"superbwarfare:charging_station"
] ]
} }

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:air"
}
],
"rolls": 1.0
}
],
"random_sequence": "superbwarfare:blocks/charging_station"
}

View file

@ -0,0 +1,23 @@
package com.atsuishio.superbwarfare.block;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
public class ChargingStationBlock extends BaseEntityBlock {
public ChargingStationBlock() {
super(BlockBehaviour.Properties.of().sound(SoundType.METAL).strength(3.0f).requiresCorrectToolForDrops());
}
@Nullable
@Override
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
return null;
}
}

View file

@ -33,6 +33,7 @@ public class ModBlockLootProvider extends BlockLootSubProvider {
this.dropSelf(ModBlocks.TUNGSTEN_BLOCK.get()); this.dropSelf(ModBlocks.TUNGSTEN_BLOCK.get());
this.dropSelf(ModBlocks.CEMENTED_CARBIDE_BLOCK.get()); this.dropSelf(ModBlocks.CEMENTED_CARBIDE_BLOCK.get());
this.dropSelf(ModBlocks.SILVER_BLOCK.get()); this.dropSelf(ModBlocks.SILVER_BLOCK.get());
this.dropSelf(ModBlocks.CHARGING_STATION.get());
this.add(ModBlocks.GALENA_ORE.get(), this.createOreDrop(ModBlocks.GALENA_ORE.get(), ModItems.GALENA.get())); this.add(ModBlocks.GALENA_ORE.get(), this.createOreDrop(ModBlocks.GALENA_ORE.get(), ModItems.GALENA.get()));
this.add(ModBlocks.SCHEELITE_ORE.get(), this.createOreDrop(ModBlocks.SCHEELITE_ORE.get(), ModItems.SCHEELITE.get())); this.add(ModBlocks.SCHEELITE_ORE.get(), this.createOreDrop(ModBlocks.SCHEELITE_ORE.get(), ModItems.SCHEELITE.get()));

View file

@ -28,7 +28,7 @@ public class ModBlockTagProvider extends BlockTagsProvider {
ModBlocks.DEEPSLATE_GALENA_ORE.get(), ModBlocks.DEEPSLATE_SCHEELITE_ORE.get(), ModBlocks.DRAGON_TEETH.get(), ModBlocks.DEEPSLATE_GALENA_ORE.get(), ModBlocks.DEEPSLATE_SCHEELITE_ORE.get(), ModBlocks.DRAGON_TEETH.get(),
ModBlocks.REFORGING_TABLE.get(), ModBlocks.LEAD_BLOCK.get(), ModBlocks.STEEL_BLOCK.get(), ModBlocks.TUNGSTEN_BLOCK.get(), ModBlocks.REFORGING_TABLE.get(), ModBlocks.LEAD_BLOCK.get(), ModBlocks.STEEL_BLOCK.get(), ModBlocks.TUNGSTEN_BLOCK.get(),
ModBlocks.CEMENTED_CARBIDE_BLOCK.get(), ModBlocks.SILVER_ORE.get(), ModBlocks.DEEPSLATE_SILVER_ORE.get(), ModBlocks.CEMENTED_CARBIDE_BLOCK.get(), ModBlocks.SILVER_ORE.get(), ModBlocks.DEEPSLATE_SILVER_ORE.get(),
ModBlocks.SILVER_BLOCK.get(), ModBlocks.JUMP_PAD.get(), ModBlocks.CONTAINER.get()); ModBlocks.SILVER_BLOCK.get(), ModBlocks.JUMP_PAD.get(), ModBlocks.CONTAINER.get(), ModBlocks.CHARGING_STATION.get());
this.tag(BlockTags.MINEABLE_WITH_SHOVEL).add(ModBlocks.SANDBAG.get()); this.tag(BlockTags.MINEABLE_WITH_SHOVEL).add(ModBlocks.SANDBAG.get());
} }
} }

View file

@ -66,6 +66,7 @@ public class AnnihilatorEntity extends Entity implements GeoEntity, ICannonEntit
public static final float MAX_HEALTH = CannonConfig.ANNIHILATOR_HP.get(); public static final float MAX_HEALTH = CannonConfig.ANNIHILATOR_HP.get();
public static final float SHOOT_COST = CannonConfig.ANNIHILATOR_SHOOT_COST.get().floatValue(); public static final float SHOOT_COST = CannonConfig.ANNIHILATOR_SHOOT_COST.get().floatValue();
protected int interpolationSteps; protected int interpolationSteps;
protected double serverYRot; protected double serverYRot;
protected double serverXRot; protected double serverXRot;

View file

@ -28,4 +28,5 @@ public class ModBlocks {
public static final RegistryObject<Block> SILVER_BLOCK = REGISTRY.register("silver_block", SilverBlock::new); public static final RegistryObject<Block> SILVER_BLOCK = REGISTRY.register("silver_block", SilverBlock::new);
public static final RegistryObject<Block> CEMENTED_CARBIDE_BLOCK = REGISTRY.register("cemented_carbide_block", CementedCarbideBlock::new); public static final RegistryObject<Block> CEMENTED_CARBIDE_BLOCK = REGISTRY.register("cemented_carbide_block", CementedCarbideBlock::new);
public static final RegistryObject<Block> CONTAINER = REGISTRY.register("container", ContainerBlock::new); public static final RegistryObject<Block> CONTAINER = REGISTRY.register("container", ContainerBlock::new);
public static final RegistryObject<Block> CHARGING_STATION = REGISTRY.register("charging_station", ChargingStationBlock::new);
} }

View file

@ -235,6 +235,7 @@ public class ModItems {
public static final RegistryObject<Item> BARBED_WIRE = block(ModBlocks.BARBED_WIRE); public static final RegistryObject<Item> BARBED_WIRE = block(ModBlocks.BARBED_WIRE);
public static final RegistryObject<Item> DRAGON_TEETH = block(ModBlocks.DRAGON_TEETH); public static final RegistryObject<Item> DRAGON_TEETH = block(ModBlocks.DRAGON_TEETH);
public static final RegistryObject<Item> REFORGING_TABLE = block(ModBlocks.REFORGING_TABLE); public static final RegistryObject<Item> REFORGING_TABLE = block(ModBlocks.REFORGING_TABLE);
public static final RegistryObject<Item> CHARGING_STATION = block(ModBlocks.CHARGING_STATION);
public static final RegistryObject<Item> LEAD_BLOCK = block(ModBlocks.LEAD_BLOCK); public static final RegistryObject<Item> LEAD_BLOCK = block(ModBlocks.LEAD_BLOCK);
public static final RegistryObject<Item> STEEL_BLOCK = block(ModBlocks.STEEL_BLOCK); public static final RegistryObject<Item> STEEL_BLOCK = block(ModBlocks.STEEL_BLOCK);
public static final RegistryObject<Item> TUNGSTEN_BLOCK = block(ModBlocks.TUNGSTEN_BLOCK); public static final RegistryObject<Item> TUNGSTEN_BLOCK = block(ModBlocks.TUNGSTEN_BLOCK);

View file

@ -209,6 +209,7 @@
"block.superbwarfare.steel_block": "Steel Block", "block.superbwarfare.steel_block": "Steel Block",
"block.superbwarfare.silver_block": "Silver Block", "block.superbwarfare.silver_block": "Silver Block",
"block.superbwarfare.cemented_carbide_block": "Cemented Carbide Block", "block.superbwarfare.cemented_carbide_block": "Cemented Carbide Block",
"block.superbwarfare.charging_station": "Charging Station",
"item.superbwarfare.high_energy_explosives": "High Energy Explosives", "item.superbwarfare.high_energy_explosives": "High Energy Explosives",
"item.superbwarfare.grain": "Grain", "item.superbwarfare.grain": "Grain",

View file

@ -209,6 +209,7 @@
"block.superbwarfare.silver_block": "银块", "block.superbwarfare.silver_block": "银块",
"block.superbwarfare.cemented_carbide_block": "硬质合金块", "block.superbwarfare.cemented_carbide_block": "硬质合金块",
"block.superbwarfare.steel_block": "钢块", "block.superbwarfare.steel_block": "钢块",
"block.superbwarfare.charging_station": "充电站",
"item.superbwarfare.high_energy_explosives": "高能炸药", "item.superbwarfare.high_energy_explosives": "高能炸药",
"item.superbwarfare.grain": "推进药柱", "item.superbwarfare.grain": "推进药柱",