Skip to content

Commit 2c98728

Browse files
authored
General code cleanup and small fixes (Creators-of-Create#6343)
* redo switch statement using modern java's arrow case * fix: Add moss carpet to brittle tag fixes Creators-of-Create#6342 * update tags * run datagen * formatting * fix comment * fix comment
1 parent 3d84836 commit 2c98728

File tree

7 files changed

+96
-16
lines changed

7 files changed

+96
-16
lines changed

src/generated/resources/.cache/cache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5754,18 +5754,19 @@ d79c82bc6cf59b073b2f51f5fea9c98e81d14b68 data/create/recipes/weathered_copper_ti
57545754
452d480dd50b97fce72e0c89429cf68db534c6b2 data/create/recipes/weathered_copper_tile_slab_from_weathered_copper_tiles_stonecutting.json
57555755
ac265a674626e0e832330086fd18fe0be37fc327 data/create/recipes/weathered_copper_tile_stairs.json
57565756
5942a571f79c40524bbf408775cf91de4715f2b6 data/create/recipes/weathered_copper_tile_stairs_from_weathered_copper_tiles_stonecutting.json
5757-
2a2700b43614f86d3294726595cb28ed7dca4387 data/create/tags/blocks/brittle.json
5757+
c6ebd818a43e51dd369b2c5ffd1aa8a918da4f1b data/create/tags/blocks/brittle.json
57585758
d99d5c67bdffff60789a19bd51a5c5267c75e0a4 data/create/tags/blocks/casing.json
57595759
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/create/tags/blocks/contraption_inventory_deny.json
57605760
bc203f09dd7f48965d146d0bd035fb904cb75e7d data/create/tags/blocks/copycat_allow.json
57615761
d4a3b66f4b763b9a2dcdea74b7273f0ae85cb335 data/create/tags/blocks/copycat_deny.json
5762+
34cb3537d3c9b99fcc4ed6d20be93300084f2452 data/create/tags/blocks/corals.json
57625763
5dc11813fcc096750528ed3ea681947b4939758b data/create/tags/blocks/fan_processing_catalysts/blasting.json
57635764
53735494c1e4af154adb4d1d39359a42747dde22 data/create/tags/blocks/fan_processing_catalysts/haunting.json
57645765
95c28b97149d4f689a52ccf99bc3178e2bfa5d1c data/create/tags/blocks/fan_processing_catalysts/smoking.json
57655766
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/create/tags/blocks/fan_processing_catalysts/splashing.json
57665767
73c2c85233075d2854d209b71ff2160308a7919c data/create/tags/blocks/fan_transparent.json
57675768
ad8fa04f7bbbafd70d0ce158af78a35e899301e2 data/create/tags/blocks/girdable_tracks.json
5768-
5445d23a146003f0aa8de86643c4315d4afd4ef6 data/create/tags/blocks/movable_empty_collider.json
5769+
bdef538d08f848cb91bf8fa596472d7881de1ea4 data/create/tags/blocks/movable_empty_collider.json
57695770
6e5d3b2123fbb00e7f439c091623619502551bca data/create/tags/blocks/non_movable.json
57705771
10781e8cfcbb3486327aace3aa00e437fb44b331 data/create/tags/blocks/ore_override_stone.json
57715772
760adb521c2e475a6414f97291f46c02d294fa74 data/create/tags/blocks/passive_boiler_heaters.json

src/generated/resources/data/create/tags/blocks/brittle.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
"minecraft:bell",
2929
"minecraft:cocoa",
3030
"minecraft:flower_pot",
31+
"minecraft:moss_carpet",
32+
"minecraft:bamboo_sapling",
33+
"minecraft:big_dripleaf",
34+
"minecraft:vine",
35+
"minecraft:twisting_vines_plant",
36+
"minecraft:twisting_vines",
37+
"minecraft:weeping_vines_plant",
38+
"minecraft:weeping_vines",
39+
"minecraft:cake",
40+
"#create:corals",
41+
"#minecraft:cave_vines",
42+
"#minecraft:banners",
3143
"#minecraft:beds",
3244
"#minecraft:doors"
3345
]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"minecraft:dead_tube_coral",
5+
"minecraft:dead_brain_coral",
6+
"minecraft:dead_bubble_coral",
7+
"minecraft:dead_fire_coral",
8+
"minecraft:dead_horn_coral",
9+
"minecraft:tube_coral",
10+
"minecraft:brain_coral",
11+
"minecraft:bubble_coral",
12+
"minecraft:fire_coral",
13+
"minecraft:horn_coral",
14+
"minecraft:dead_tube_coral_fan",
15+
"minecraft:dead_brain_coral_fan",
16+
"minecraft:dead_bubble_coral_fan",
17+
"minecraft:dead_fire_coral_fan",
18+
"minecraft:dead_horn_coral_fan",
19+
"minecraft:tube_coral_fan",
20+
"minecraft:brain_coral_fan",
21+
"minecraft:bubble_coral_fan",
22+
"minecraft:fire_coral_fan",
23+
"minecraft:horn_coral_fan",
24+
"minecraft:dead_tube_coral_wall_fan",
25+
"minecraft:dead_brain_coral_wall_fan",
26+
"minecraft:dead_bubble_coral_wall_fan",
27+
"minecraft:dead_fire_coral_wall_fan",
28+
"minecraft:dead_horn_coral_wall_fan",
29+
"minecraft:tube_coral_wall_fan",
30+
"minecraft:brain_coral_wall_fan",
31+
"minecraft:bubble_coral_wall_fan",
32+
"minecraft:fire_coral_wall_fan",
33+
"minecraft:horn_coral_wall_fan"
34+
]
35+
}

src/generated/resources/data/create/tags/blocks/movable_empty_collider.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
"minecraft:powder_snow",
66
"minecraft:tripwire",
77
"minecraft:tripwire_hook",
8-
"#minecraft:fence_gates"
8+
"minecraft:bamboo_sapling",
9+
"minecraft:vine",
10+
"minecraft:twisting_vines_plant",
11+
"minecraft:twisting_vines",
12+
"minecraft:weeping_vines_plant",
13+
"minecraft:weeping_vines",
14+
"#create:corals",
15+
"#minecraft:cave_vines",
16+
"#minecraft:fence_gates",
17+
"#minecraft:banners"
918
]
1019
}

src/main/java/com/simibubi/create/AllTags.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ public enum AllBlockTags {
102102
WINDMILL_SAILS,
103103
WRENCH_PICKUP,
104104

105+
CORALS,
106+
105107
RELOCATION_NOT_SUPPORTED(FORGE),
106108
WG_STONE(FORGE),
107109

src/main/java/com/simibubi/create/content/kinetics/deployer/DeployerFakePlayer.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,12 @@ public static void entitiesDontRetaliate(LivingChangeTargetEvent event) {
160160

161161
CKinetics.DeployerAggroSetting setting = AllConfigs.server().kinetics.ignoreDeployerAttacks.get();
162162

163-
switch (setting) {
164-
case ALL:
165-
event.setCanceled(true);
166-
break;
167-
case CREEPERS:
168-
if (mob instanceof Creeper)
169-
event.setCanceled(true);
170-
break;
171-
case NONE:
172-
default:
163+
switch(setting) {
164+
case ALL -> event.setCanceled(true);
165+
case CREEPERS -> {
166+
if (mob instanceof Creeper)
167+
event.setCanceled(true);
168+
}
173169
}
174170
}
175171

src/main/java/com/simibubi/create/infrastructure/data/CreateRegistrateTags.java

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ public static void addGenerators() {
3232

3333
private static void genBlockTags(RegistrateTagsProvider<Block> prov) {
3434
prov.tag(AllBlockTags.BRITTLE.tag)
35-
.add(Blocks.BELL, Blocks.COCOA, Blocks.FLOWER_POT)
35+
.add(Blocks.BELL, Blocks.COCOA, Blocks.FLOWER_POT, Blocks.MOSS_CARPET, Blocks.BAMBOO_SAPLING,
36+
Blocks.BIG_DRIPLEAF, Blocks.VINE, Blocks.TWISTING_VINES_PLANT, Blocks.TWISTING_VINES,
37+
Blocks.WEEPING_VINES_PLANT, Blocks.WEEPING_VINES, Blocks.CAKE
38+
)
39+
.addTag(AllBlockTags.CORALS.tag)
40+
.addTag(BlockTags.CAVE_VINES)
41+
.addTag(BlockTags.BANNERS)
3642
.addTag(BlockTags.BEDS)
3743
.addTag(BlockTags.DOORS);
3844

@@ -59,8 +65,14 @@ private static void genBlockTags(RegistrateTagsProvider<Block> prov) {
5965
.addTag(BlockTags.LEAVES);
6066

6167
prov.tag(AllBlockTags.MOVABLE_EMPTY_COLLIDER.tag)
62-
.add(Blocks.COBWEB, Blocks.POWDER_SNOW, Blocks.TRIPWIRE, Blocks.TRIPWIRE_HOOK)
63-
.addTag(BlockTags.FENCE_GATES);
68+
.add(Blocks.COBWEB, Blocks.POWDER_SNOW, Blocks.TRIPWIRE, Blocks.TRIPWIRE_HOOK, Blocks.BAMBOO_SAPLING,
69+
Blocks.VINE, Blocks.TWISTING_VINES_PLANT, Blocks.TWISTING_VINES, Blocks.WEEPING_VINES_PLANT,
70+
Blocks.WEEPING_VINES
71+
)
72+
.addTag(AllBlockTags.CORALS.tag)
73+
.addTag(BlockTags.CAVE_VINES)
74+
.addTag(BlockTags.FENCE_GATES)
75+
.addTag(BlockTags.BANNERS);
6476

6577
prov.tag(AllBlockTags.ORE_OVERRIDE_STONE.tag)
6678
.addTag(BlockTags.STONE_ORE_REPLACEABLES);
@@ -88,6 +100,19 @@ private static void genBlockTags(RegistrateTagsProvider<Block> prov) {
88100
.addTag(BlockTags.PRESSURE_PLATES)
89101
.addTag(BlockTags.RAILS);
90102

103+
prov.tag(AllBlockTags.CORALS.tag)
104+
.add(Blocks.DEAD_TUBE_CORAL, Blocks.DEAD_BRAIN_CORAL, Blocks.DEAD_BUBBLE_CORAL, Blocks.DEAD_FIRE_CORAL,
105+
Blocks.DEAD_HORN_CORAL, Blocks.TUBE_CORAL, Blocks.BRAIN_CORAL, Blocks.BUBBLE_CORAL,
106+
Blocks.FIRE_CORAL, Blocks.HORN_CORAL, Blocks.DEAD_TUBE_CORAL_FAN,
107+
Blocks.DEAD_BRAIN_CORAL_FAN, Blocks.DEAD_BUBBLE_CORAL_FAN, Blocks.DEAD_FIRE_CORAL_FAN,
108+
Blocks.DEAD_HORN_CORAL_FAN, Blocks.TUBE_CORAL_FAN, Blocks.BRAIN_CORAL_FAN,
109+
Blocks.BUBBLE_CORAL_FAN, Blocks.FIRE_CORAL_FAN, Blocks.HORN_CORAL_FAN,
110+
Blocks.DEAD_TUBE_CORAL_WALL_FAN, Blocks.DEAD_BRAIN_CORAL_WALL_FAN,
111+
Blocks.DEAD_BUBBLE_CORAL_WALL_FAN, Blocks.DEAD_FIRE_CORAL_WALL_FAN,
112+
Blocks.DEAD_HORN_CORAL_WALL_FAN, Blocks.TUBE_CORAL_WALL_FAN, Blocks.BRAIN_CORAL_WALL_FAN,
113+
Blocks.BUBBLE_CORAL_WALL_FAN, Blocks.FIRE_CORAL_WALL_FAN, Blocks.HORN_CORAL_WALL_FAN
114+
);
115+
91116
// COMPAT
92117

93118
TagGen.addOptional(prov.tag(AllBlockTags.NON_MOVABLE.tag), Mods.IE,

0 commit comments

Comments
 (0)