Skip to content

Commit 1fe0758

Browse files
committed
Fixed resources
1 parent b45f2bb commit 1fe0758

24 files changed

+98
-158
lines changed

buildSrc/src/main/kotlin/multiloader-loader.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,21 @@ tasks {
2525
processResources {
2626
dependsOn(commonResources)
2727
from(commonResources)
28+
29+
if (project.stonecutterBuild.eval(commonMod.mc, ">=1.21.9")) {
30+
filesMatching("**/*lightning_rod*") {
31+
exclude()
32+
}
33+
}
34+
35+
if (project.stonecutterBuild.eval(commonMod.mc, "<1.21.4")) {
36+
filesMatching("**/*pale_oak*") {
37+
exclude()
38+
}
39+
}
2840
}
41+
42+
jar {
43+
exclude("accesswideners/**")
44+
}
2945
}

common/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ artifacts {
5959
add(commonResources.name, it)
6060
}
6161
}
62-
}
62+
}

common/src/main/java/com/faboslav/friendsandfoes/common/init/FriendsAndFoesItems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public final class FriendsAndFoesItems
6161
public final static RegistryEntry<Item> JUNGLE_BEEHIVE = registerItem("jungle_beehive", (properties) -> new BlockItem(FriendsAndFoesBlocks.JUNGLE_BEEHIVE.get(), properties), () -> new Item.Properties().stacksTo(64));
6262
public final static RegistryEntry<Item> MANGROVE_BEEHIVE = registerItem("mangrove_beehive", (properties) -> new BlockItem(FriendsAndFoesBlocks.MANGROVE_BEEHIVE.get(), properties), () -> new Item.Properties().stacksTo(64));
6363
public final static RegistryEntry<Item> SPRUCE_BEEHIVE = registerItem("spruce_beehive", (properties) -> new BlockItem(FriendsAndFoesBlocks.SPRUCE_BEEHIVE.get(), properties), () -> new Item.Properties().stacksTo(64));
64-
//? if >=1.21.4 {
64+
//? if >= 1.21.4 {
6565
public final static RegistryEntry<Item> PALE_OAK_BEEHIVE = registerItem("pale_oak_beehive", (properties) -> new BlockItem(FriendsAndFoesBlocks.PALE_OAK_BEEHIVE.get(), properties), () -> new Item.Properties().stacksTo(64));
6666
//?}
6767
public final static RegistryEntry<Item> WARPED_BEEHIVE = registerItem("warped_beehive", (properties) -> new BlockItem(FriendsAndFoesBlocks.WARPED_BEEHIVE.get(), properties), () -> new Item.Properties().stacksTo(64));

common/src/main/java/com/faboslav/friendsandfoes/common/mixin/ServerWorldMixin.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import com.faboslav.friendsandfoes.common.FriendsAndFoes;
44
import com.faboslav.friendsandfoes.common.entity.ZombieHorseEntityAccess;
5-
import com.faboslav.friendsandfoes.common.tag.FriendsAndFoesTags;
65
import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod;
76
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
87
import net.minecraft.core.BlockPos;
@@ -29,6 +28,7 @@
2928
/*import net.minecraft.world.entity.ai.village.poi.PoiManager;
3029
import java.util.Optional;
3130
import net.minecraft.world.level.levelgen.Heightmap;
31+
import com.faboslav.friendsandfoes.common.tag.FriendsAndFoesTags;
3232
*///?}
3333

3434
//? if >=1.21.3 {
@@ -102,7 +102,11 @@ protected ServerWorldMixin(
102102
&& this.isRainingAt(blockPos = this.findLightningTargetAround(this.getBlockRandomPos(i, 0, j, 15)))
103103
) {
104104
DifficultyInstance localDifficulty = this.getCurrentDifficultyAt(blockPos);
105-
boolean canZombieHorseSpawn = ((ServerLevel)(Object)this).getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) localDifficulty.getEffectiveDifficulty() * 0.01 && !this.getBlockState(blockPos.below()).is(FriendsAndFoesTags.LIGHTNING_RODS);
105+
boolean canZombieHorseSpawn = ((ServerLevel)(Object)this).getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) localDifficulty.getEffectiveDifficulty() * 0.01;
106+
107+
//? if <= 1.21.8 {
108+
/*canZombieHorseSpawn = canZombieHorseSpawn && !this.getBlockState(blockPos.below()).is(FriendsAndFoesTags.LIGHTNING_RODS);
109+
*///?}
106110

107111
if (canZombieHorseSpawn) {
108112
ZombieHorse zombieHorse = EntityType.ZOMBIE_HORSE.create(this/*? if >=1.21.3 {*/, VersionedEntitySpawnReason.EVENT/*?}*/);

common/src/main/java/com/faboslav/friendsandfoes/common/tag/FriendsAndFoesTags.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public final class FriendsAndFoesTags
1818
{
1919
public static final TagKey<PoiType> BEEKEEPER_ACQUIRABLE_JOB_SITE = pointOfInterestTypeTag("beekeeper_acquirable_job_site");
2020
public static final TagKey<Block> COPPER_BUTTONS = blockTag("copper_buttons");
21-
public static final TagKey<Block> LIGHTNING_RODS = blockTag("lightning_rods");
22-
public static final TagKey<PoiType> LIGHTNING_ROD_POI = pointOfInterestTypeTag("lightning_rods");
2321
public static final TagKey<Item> CRAB_TEMPT_ITEMS = itemTag("crab_tempt_items");
2422
public static final TagKey<Block> CRABS_SPAWNABLE_ON = blockTag("crabs_spawnable_on");
2523
public static final TagKey<Block> CRAB_BURROW_SPOT_BLOCKS = blockTag("crab_burrow_spot_blocks");
@@ -40,6 +38,10 @@ public final class FriendsAndFoesTags
4038
public static final TagKey<Biome> HAS_MOOBLOOMS = biomeTag("has_moobloom/any");
4139
public static final TagKey<Biome> HAS_RASCAL = biomeTag("has_rascal");
4240
public static final TagKey<Biome> HAS_SAVANNA_MAULER = biomeTag("has_savanna_mauler");
41+
//? if <= 1.21.8 {
42+
/*public static final TagKey<Block> LIGHTNING_RODS = blockTag("lightning_rods");
43+
public static final TagKey<PoiType> LIGHTNING_ROD_POI = pointOfInterestTypeTag("lightning_rods");
44+
*///?}
4345

4446
private static TagKey<Block> blockTag(String name) {
4547
return TagKey.create(Registries.BLOCK, FriendsAndFoes.makeID(name));
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
//? if <= 1.21.8 {
3-
/*"type": "minecraft:block",
2+
"type": "minecraft:block",
43
"pools": [
54
{
65
"rolls": 1,
@@ -16,7 +15,5 @@
1615
}
1716
]
1817
}
19-
],
20-
21-
*///?}
18+
]
2219
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
//? if <= 1.21.8 {
3-
/*"type": "minecraft:block",
2+
"type": "minecraft:block",
43
"pools": [
54
{
65
"rolls": 1,
@@ -17,6 +16,4 @@
1716
]
1817
}
1918
]
20-
21-
*///?}
2219
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
//? if <= 1.21.8 {
3-
/*"type": "minecraft:block",
2+
"type": "minecraft:block",
43
"pools": [
54
{
65
"rolls": 1,
@@ -16,7 +15,5 @@
1615
}
1716
]
1817
}
19-
],
20-
21-
*///?}
18+
]
2219
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
//? if <= 1.21.8 {
3-
/*"type": "minecraft:block",
2+
"type": "minecraft:block",
43
"pools": [
54
{
65
"rolls": 1,
@@ -16,7 +15,5 @@
1615
}
1716
]
1817
}
19-
],
20-
21-
*///?}
18+
]
2219
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
//? if <= 1.21.8 {
3-
/*"type": "minecraft:block",
2+
"type": "minecraft:block",
43
"pools": [
54
{
65
"rolls": 1,
@@ -16,7 +15,5 @@
1615
}
1716
]
1817
}
19-
],
20-
21-
*///?}
18+
]
2219
}

0 commit comments

Comments
 (0)