Skip to content

Commit

Permalink
Merge branch 'wildfire'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/publish.yml
#	common/src/main/java/com/faboslav/friendsandfoes/block/Oxidizable.java
#	common/src/main/java/com/faboslav/friendsandfoes/init/ModBlocks.java
#	common/src/main/java/com/faboslav/friendsandfoes/init/ModItems.java
#	common/src/main/java/com/faboslav/friendsandfoes/mixin/AxeItemMixin.java
#	common/src/main/java/com/faboslav/friendsandfoes/mixin/HoneycombItemMixin.java
#	common/src/main/java/com/faboslav/friendsandfoes/mixin/LightningRodBlockMixin.java
#	common/src/main/java/com/faboslav/friendsandfoes/tag/FriendsAndFoesTags.java
#	gradle.properties
  • Loading branch information
Faboslav committed Aug 2, 2022
2 parents 154f6f5 + dc9f9a8 commit d0aa8ec
Show file tree
Hide file tree
Showing 107 changed files with 1,794 additions and 981 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
charset = utf-8
end_of_line = lf
Expand Down
48 changes: 21 additions & 27 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ env:
1.19.1
FABRIC_DEPENDENCIES: |
fabric-api | depends | *
architectury-api | depends | *
FORGE_DEPENDENCIES: |
architectury-api | depends | *
QUILT_DEPENDENCIES: |
qsl | depends | *
architectury-api | depends | *
RETRY_ATTEMPTS: 3
RELAY_DELAY: 10000
VERSION_RESOLVER: latest
Expand Down Expand Up @@ -52,9 +48,9 @@ jobs:
with:
name: "friends-and-foes"
path: |
fabric/build/libs/friendsandfoes-fabric-mc1.19.1-1.5.5.jar
forge/build/libs/friendsandfoes-forge-mc1.19.1-1.5.5.jar
quilt/build/libs/friendsandfoes-quilt-mc1.19.1-1.5.5.jar
fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.6.jar
forge/build/libs/friendsandfoes-forge-mc1.19-1.5.6.jar
quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.6.jar
LICENSE.txt
publish-license-to-release:
Expand Down Expand Up @@ -90,7 +86,7 @@ jobs:
- name: "Publish Fabric to GitHub"
uses: AButler/[email protected]
with:
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19.1-1.5.5.jar'
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.6.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-fabric-to-curseforge:
Expand All @@ -111,11 +107,11 @@ jobs:
curseforge-id: 551364
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19.1-1.5.5.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Fabric)"
name: "Friends&Foes mc1.19-1.5.6 (Fabric)"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand Down Expand Up @@ -143,12 +139,12 @@ jobs:
modrinth-unfeature-mode: version-intersection
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19.1-1.5.5.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Fabric)"
version: "fabric-mc1.19.1-1.5.5"
name: "Friends&Foes mc1.19-1.5.6 (Fabric)"
version: "fabric-mc1.19-1.5.6"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand All @@ -170,7 +166,7 @@ jobs:
- name: "Publish Forge to GitHub"
uses: AButler/[email protected]
with:
files: 'forge/build/libs/friendsandfoes-forge-mc1.19.1-1.5.5.jar'
files: 'forge/build/libs/friendsandfoes-forge-mc1.19-1.5.6.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-forge-to-curseforge:
Expand All @@ -191,12 +187,11 @@ jobs:
curseforge-id: 602059
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19.1-1.5.5.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Forge)"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
name: "Friends&Foes mc1.19-1.5.6 (Forge)"
java: ${{ env.JAVA_VERSIONS }}

retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand All @@ -223,13 +218,12 @@ jobs:
modrinth-unfeature-mode: version-intersection
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19.1-1.5.5.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Forge)"
version: "forge-mc1.19.1-1.5.5"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
name: "Friends&Foes mc1.19-1.5.6 (Forge)"
version: "forge-mc1.19-1.5.6"
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
retry-delay: ${{ env.RETRY_DELAY }}
Expand All @@ -251,7 +245,7 @@ jobs:
- name: "Publish Quilt to GitHub"
uses: AButler/[email protected]
with:
files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19.1-1.5.5.jar'
files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.6.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-quilt-to-curseforge:
Expand All @@ -272,11 +266,11 @@ jobs:
curseforge-id: 628248
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.1-1.5.5.jar"
files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: quilt
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Quilt)"
name: "Friends&Foes mc1.19-1.5.6 (Quilt)"
dependencies: ${{ env.QUILT_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand Down Expand Up @@ -304,12 +298,12 @@ jobs:
modrinth-unfeature-mode: version-intersection
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19.1-1.5.5.jar"
files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.6.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: quilt
game-versions: ${{ env.GAME_VERSIONS }}
name: "Friends&Foes mc1.19.1-1.5.5 (Quilt)"
version: "quilt-mc1.19.1-1.5.5"
name: "Friends&Foes mc1.19-1.5.6 (Quilt)"
version: "quilt-mc1.19-1.5.6"
dependencies: ${{ env.QUILT_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

- Fixed beekeeper related crash
- Fixed quilt crashes
-
-

## mc1.19-1.5.2, June 19, 2022

- Mod is now tag driven (thus much more customizable trough datapacks)
Expand Down Expand Up @@ -48,7 +49,7 @@
- Changed Glares spawn group (so it is unique for example like axolotl spawn group)
- All Glares are now persisted
- Fixed iceologer/illusioner spawning in the raids/world
- Fixed mauler attacking while burrowed
- Fixed mauler attacking while burrowed

## mc1.18.2-1.4.1, May 29, 2022

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@ build-project: ## Builds project
refresh: ## Refresh dependencies
./gradlew --refresh-dependencies

clean-cache: ## Cleans cache
./gradlew --stop
rm -rf $GRADLE_HOME/caches/transforms-*
rm -rf $GRADLE_HOME/caches/build-cache-*
./gradlew clean

gen-sources: ## Generate sources
./gradlew genSources
20 changes: 11 additions & 9 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
architectury {
common(rootProject.enabled_platforms.split(","))
}

loom {
accessWidenerPath = file("src/main/resources/friendsandfoes.accesswidener")
}

dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "dev.architectury:architectury:${rootProject.architectury_version}"
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config_version}")

implementation("com.github.LlamaLad7:MixinExtras:${rootProject.mixin_extras_version}")
annotationProcessor("com.github.LlamaLad7:MixinExtras:${rootProject.mixin_extras_version}")
}

repositories {
Expand All @@ -12,11 +22,3 @@ repositories {
}
}
}

architectury {
common(rootProject.enabled_platforms.split(","))
}

loom {
accessWidenerPath = file("src/main/resources/friendsandfoes.accesswidener")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
import com.faboslav.friendsandfoes.config.omegaconfig.OmegaConfig;
import com.faboslav.friendsandfoes.init.*;
import com.faboslav.friendsandfoes.util.ServerTickDeltaCounter;
import com.faboslav.friendsandfoes.util.UpdateChecker;
import net.minecraft.util.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;

public final class FriendsAndFoes
{
private static final FriendsAndFoesConfig CONFIG = OmegaConfig.register(FriendsAndFoesConfig.class);
Expand Down Expand Up @@ -38,38 +35,19 @@ public static Logger getLogger() {
return LOGGER;
}

public static void checkForNewUpdates() {
CompletableFuture.runAsync(() -> {
if (FriendsAndFoes.getConfig().checkForNewUpdates) {
String latestVersion = UpdateChecker.getLatestVersion();

if (latestVersion == null) {
return;
}

if (latestVersion.equals(MOD_VERSION) == false) {
getLogger().info("[Friends&Foes] An update is available! You're using {} version but the latest version is {}!", MOD_VERSION, latestVersion);
}
}
});
}

public static void initRegisters() {
ModBlocks.initRegister();
ModCriteria.init();
ModEntityTypes.initRegister();
ModItems.initRegister();
ModPointOfInterestTypes.initRegister();
ModSounds.initRegister();
ModVillagerProfessions.initRegister();
public static void init() {
FriendsAndFoesBlocks.init();
FriendsAndFoesCriteria.init();
FriendsAndFoesEntityTypes.init();
FriendsAndFoesItems.init();
FriendsAndFoesPointOfInterestTypes.init();
FriendsAndFoesSoundEvents.init();
FriendsAndFoesVillagerProfessions.init();
}

public static void initCustomRegisters() {
ModBlocks.init();
ModEntityTypes.init();
ModItems.init();
ModBlockEntityTypes.init();
ModSounds.init();
ModVillagerProfessions.init();
public static void postInit() {
FriendsAndFoesEntityTypes.postInit();
FriendsAndFoesBlockEntityTypes.postInit();
FriendsAndFoesVillagerProfessions.postInit();
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.faboslav.friendsandfoes;

import com.faboslav.friendsandfoes.init.ModEntityModelLayer;
import com.faboslav.friendsandfoes.init.ModEntityRenderer;
import com.faboslav.friendsandfoes.init.ModRenderType;
import com.faboslav.friendsandfoes.init.FriendAndFoesEntityRenderer;
import com.faboslav.friendsandfoes.init.FriendsAndFoesEntityModelLayer;
import com.faboslav.friendsandfoes.init.FriendsAndFoesRenderType;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

public final class FriendsAndFoesClient
{
@Environment(EnvType.CLIENT)
public static void initRegisters() {
ModEntityRenderer.init();
ModEntityModelLayer.init();
public static void init() {
FriendsAndFoesEntityModelLayer.init();
}

@Environment(EnvType.CLIENT)
public static void initCustomRegisters() {
ModRenderType.init();
public static void postInit() {
FriendAndFoesEntityRenderer.postInit();
FriendsAndFoesRenderType.postInit();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faboslav.friendsandfoes.block;

final public class ExposedCopperButtonBlock extends CopperButtonBlock
public final class ExposedCopperButtonBlock extends CopperButtonBlock
{
public static final int PRESS_TICKS = 7;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faboslav.friendsandfoes.block;

import com.faboslav.friendsandfoes.init.ModBlocks;
import com.faboslav.friendsandfoes.init.FriendsAndFoesBlocks;
import com.google.common.base.Suppliers;
import com.google.common.collect.BiMap;
import com.google.common.collect.ImmutableBiMap;
Expand All @@ -16,12 +16,12 @@ public interface Oxidizable extends net.minecraft.block.Oxidizable
{
Supplier<BiMap<Block, Block>> OXIDATION_LEVEL_INCREASES = Suppliers.memoize(() -> {
return (BiMap) ImmutableBiMap.builder()
.put(ModBlocks.COPPER_BUTTON.get(), ModBlocks.EXPOSED_COPPER_BUTTON.get())
.put(ModBlocks.EXPOSED_COPPER_BUTTON.get(), ModBlocks.WEATHERED_COPPER_BUTTON.get())
.put(ModBlocks.WEATHERED_COPPER_BUTTON.get(), ModBlocks.OXIDIZED_COPPER_BUTTON.get())
.put(Blocks.LIGHTNING_ROD, ModBlocks.EXPOSED_LIGHTNING_ROD.get())
.put(ModBlocks.EXPOSED_LIGHTNING_ROD.get(), ModBlocks.WEATHERED_LIGHTNING_ROD.get())
.put(ModBlocks.WEATHERED_LIGHTNING_ROD.get(), ModBlocks.OXIDIZED_LIGHTNING_ROD.get())
.put(FriendsAndFoesBlocks.COPPER_BUTTON.get(), FriendsAndFoesBlocks.EXPOSED_COPPER_BUTTON.get())
.put(FriendsAndFoesBlocks.EXPOSED_COPPER_BUTTON.get(), FriendsAndFoesBlocks.WEATHERED_COPPER_BUTTON.get())
.put(FriendsAndFoesBlocks.WEATHERED_COPPER_BUTTON.get(), FriendsAndFoesBlocks.OXIDIZED_COPPER_BUTTON.get())
.put(Blocks.LIGHTNING_ROD, FriendsAndFoesBlocks.EXPOSED_LIGHTNING_ROD.get())
.put(FriendsAndFoesBlocks.EXPOSED_LIGHTNING_ROD.get(), FriendsAndFoesBlocks.WEATHERED_LIGHTNING_ROD.get())
.put(FriendsAndFoesBlocks.WEATHERED_LIGHTNING_ROD.get(), FriendsAndFoesBlocks.OXIDIZED_LIGHTNING_ROD.get())
.build();
});
Supplier<BiMap<Block, Block>> OXIDATION_LEVEL_DECREASES = Suppliers.memoize(() -> {
Expand Down Expand Up @@ -56,12 +56,14 @@ static BlockState getUnaffectedOxidationState(BlockState state) {
return getUnaffectedOxidationBlock(state.getBlock()).getStateWithProperties(state);
}

@Override
default Optional<BlockState> getDegradationResult(BlockState state) {
return getIncreasedOxidationBlock(state.getBlock()).map((block) -> {
return block.getStateWithProperties(state);
});
}

@Override
default float getDegradationChanceMultiplier() {
return this.getDegradationLevel() == net.minecraft.block.Oxidizable.OxidationLevel.UNAFFECTED ? 0.75F:1.0F;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faboslav.friendsandfoes.block;

final public class OxidizedCopperButtonBlock extends CopperButtonBlock
public final class OxidizedCopperButtonBlock extends CopperButtonBlock
{
public static final int PRESS_TICKS = 1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.faboslav.friendsandfoes.block;

final public class WeatheredCopperButtonBlock extends CopperButtonBlock
public final class WeatheredCopperButtonBlock extends CopperButtonBlock
{
public static final int PRESS_TICKS = 4;

Expand Down
Loading

0 comments on commit d0aa8ec

Please sign in to comment.