Skip to content

Commit

Permalink
Merge branch 'refs/heads/multiloader' into 1.19.2/multiloader
Browse files Browse the repository at this point in the history
# Conflicts:
#	fabric/src/main/resources/copycats-fabric.mixins.json
  • Loading branch information
hlysine committed Jul 18, 2024
2 parents 5b697a8 + 054c620 commit 72fd5a3
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 23 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ jobs:
find . -regextype posix-extended -regex "\.\/($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\/build\/libs\/${{ steps.read_properties.outputs.archives_base_name }}-${{ steps.get_mod_version.outputs.version }}\+mc\.${{ steps.read_properties.outputs.minecraft_version }}-($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))-build\.${{ github.run_number }}\.jar" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Send building message to discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: env.DISCORD_WEBHOOK != ''
uses: realRobotix/action-discord-notifier@master
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }}
# - name: Send building message to discord
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# if: env.DISCORD_WEBHOOK != ''
# uses: realRobotix/action-discord-notifier@master
# with:
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
# message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }}

- name: Send built file to discord
env:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ jobs:
find . -regextype posix-extended -regex "\.\/($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\/build\/libs\/${{ steps.read_properties.outputs.archives_base_name }}-${{ steps.get_mod_version.outputs.version }}\+mc\.${{ steps.read_properties.outputs.minecraft_version }}-($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\.jar" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Send building message to discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: env.DISCORD_WEBHOOK != ''
uses: realRobotix/action-discord-notifier@master
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }}
# - name: Send building message to discord
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# if: env.DISCORD_WEBHOOK != ''
# uses: realRobotix/action-discord-notifier@master
# with:
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
# message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }}

- name: Send built file to discord
env:
Expand Down
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.0 - 2024-07-18

### Added

- Copycat Door
- Allows different materials for top and bottom halves
- Copycat Iron Trapdoor/Door
- Can only be opened with redstone
- Copycat Fluid Pipe
- Can be wrenched to add a window
- Accepts transparent materials to display the fluid inside
- Copycat Cogwheel/Large Cogwheel
- Allows different materials for the shaft and the gear
- A new accessibility option to colorize multi-state copycats
- Conversion recipes between horizontal and vertical copycats
- A shortcut key (left alt by default) to fill all parts of a multi-state copycat with the held item

### Changed

- **Major internal rewrite**
- For developers, please refer to [the wiki](https://github.com/copycats-plus/copycats/wiki/v2.0-Refactor) for a summary of changes. Most code in the `foundation` package is also documented.
- Optimized rendering on both platforms
- Separated creative tabs for decorative and functional copycats
- Re-ordered items in the creative tab for easy access
- Reverted the shape of Copycat Ladder to match vanilla ladders
- Reworked tooltips to be more concise and removed duplicate strings
- Reworked multi-state copycats to no longer consume items when the same material is already present
- Improved block outlines for Copycat Vertical Slope and Copycat Slope Layers

### Fixed

- Inconsistent connected textures on various copycats on Fabric and in 1.18.2
- Inconsistent behavior of CT toggle across versions
- Multi-state copycats not rotating properly until a block update is received
- Face culling not working for all copycats
- Transparent face hiding not working for multi-state copycats
- Transparent face hiding not working between copycats of different types
- Potentially buggy quad lighting on Forge
- Buggy connected textures between two Copycat Slabs with different orientations
- Placement helpers not rendering for various copycats
- Incorrect/missing destroy particles in various copycats
- Crash due to null pointer exception when migrating old copycats to multi-state copycats
- Incompatibility with Athena's connected textures
- Incompatibility with Indium on Fabric
- Copycat Trapdoor not climbable when above a ladder
- Various block interactions due to Copycat Slopes not having a full face on the back
- Crash due to biomes not being accessible in a superflat world on Fabric
- Buggy quad lighting on Copycat Slopes on Fabric

## 1.3.8 - 2024-06-28

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ All the copycats you've ever wanted, combined into a single mod!
- Copycat Stairs
- Copycat Fence
- Copycat Fence Gate
- Copycat Trapdoor
- Copycat Trapdoor/Iron Trapdoor
- Copycat Door/Iron Door
- Copycat Wall
- Copycat Board
- A 1-pixel thick panel. Multiple boards can be placed in the same block space like glow lichen.
Expand All @@ -52,6 +53,9 @@ All the copycats you've ever wanted, combined into a single mod!
- Copycat Wooden/Stone Button
- Copycat Wooden/Stone Pressure Plate
- Copycat Light/Heavy Weighted Pressure Plate
- Copycat Fluid Pipe
- Copycat Shaft
- Copycat Cogwheel/Large Cogwheel

## Download

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ public Direction computeLightFace() {
};
}

private static Axis longestAxis(double normalX, double normalY, double normalZ) {
private static final double EPSILON = 0.05;

public static Axis longestAxis(double normalX, double normalY, double normalZ) {
Axis result = Axis.Y;
double longest = Math.abs(normalY);
double a = Math.abs(normalX);

if (a > longest) {
if (a > longest + EPSILON) {
result = Axis.X;
longest = a;
}

return Math.abs(normalZ) > longest
return Math.abs(normalZ) > longest + EPSILON
? Axis.Z : result;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.copycatsplus.copycats.fabric.mixin.compat.indium;

import com.copycatsplus.copycats.foundation.copycat.model.assembly.MutableQuad;
import link.infra.indium.renderer.helper.GeometryHelper;
import net.minecraft.core.Direction;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(GeometryHelper.class)
@Pseudo
public class GeometryHelperMixin {
@Inject(
method = "longestAxis(FFF)Lnet/minecraft/core/Direction$Axis;",
at = @At("HEAD"),
cancellable = true
)
private static void longestAxis(float normalX, float normalY, float normalZ, CallbackInfoReturnable<Direction.Axis> cir) {
cir.setReturnValue(MutableQuad.longestAxis(normalX, normalY, normalZ));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.copycatsplus.copycats.fabric.mixin.copycat.base;

import com.copycatsplus.copycats.foundation.copycat.model.assembly.MutableQuad;
import net.fabricmc.fabric.impl.client.indigo.renderer.helper.GeometryHelper;
import net.minecraft.core.Direction;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(GeometryHelper.class)
@Pseudo
public class GeometryHelperMixin {
@Inject(
method = "longestAxis(FFF)Lnet/minecraft/core/Direction$Axis;",
at = @At("HEAD"),
cancellable = true
)
private static void longestAxis(float normalX, float normalY, float normalZ, CallbackInfoReturnable<Direction.Axis> cir) {
cir.setReturnValue(MutableQuad.longestAxis(normalX, normalY, normalZ));
}
}
2 changes: 2 additions & 0 deletions fabric/src/main/resources/copycats-fabric.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"compatibilityLevel": "JAVA_17",
"mixins": [
"HolderReferenceMixin",
"compat.indium.GeometryHelperMixin",
"copycat.base.CopycatBlockEntityMixin$BlockEntityWithoutAttachmentData",
"copycat.base.CopycatBlockEntityMixin$FluidPipeData",
"copycat.base.CopycatBlockEntityMixin$StraightPipeData",
"copycat.base.CopycatBlockMixin",
"copycat.base.GeometryHelperMixin",
"copycat.base.multistate.MultiStateCopycatBlockEntityMixin$BlockEntityWithoutAttachmentData",
"copycat.base.multistate.MultiStateCopycatBlockMixin"
],
Expand Down
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"homepage": "https://github.com/copycats-plus/copycats/",
"promos": {
"1.20.1-recommended": "1.20.1-1.3.8",
"1.19.2-recommended": "1.19.2-1.3.8",
"1.18.2-recommended": "1.18.2-1.3.8"
"1.20.1-recommended": "1.20.1-2.0.0",
"1.19.2-recommended": "1.19.2-2.0.0",
"1.18.2-recommended": "1.18.2-2.0.0"
}
}

0 comments on commit 72fd5a3

Please sign in to comment.