Skip to content

Commit

Permalink
Merge branch 'mc1.18/fabric/dev' into mc1.19/fabric/dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	FABRIC_CHANGELOG.txt
#	gradle.properties
#	src/generated/resources/.cache/cache
#	src/main/java/com/simibubi/create/compat/computercraft/implementation/ComputerBehaviour.java
#	src/main/java/com/simibubi/create/content/contraptions/actors/seat/SeatBlock.java
#	src/main/java/com/simibubi/create/content/contraptions/render/ContraptionRenderDispatcher.java
#	src/main/java/com/simibubi/create/content/equipment/armor/DivingHelmetItem.java
#	src/main/java/com/simibubi/create/content/kinetics/waterwheel/WaterWheelStructuralBlock.java
#	src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java
#	src/main/java/com/simibubi/create/foundation/ponder/element/WorldSectionElement.java
#	src/main/java/com/simibubi/create/foundation/render/BakedModelRenderHelper.java
#	src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java
#	src/main/resources/data/create/recipes/compat/byg/crushing/ametrine_ore.json
#	src/main/resources/data/create/recipes/compat/byg/crushing/anthracite_ore.json
#	src/main/resources/data/create/recipes/compat/byg/crushing/lignite_ore.json
  • Loading branch information
TropheusJ committed Jul 8, 2023
2 parents 23175b3 + e37a012 commit ff09bda
Show file tree
Hide file tree
Showing 133 changed files with 9,419 additions and 3,590 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ body:
label: Mod Version
description: The version of the mod you were using when the bug occured
options:
- "0.5.1d"
- "0.5.1c"
- "0.5.1b"
- "0.5.1a"
- "0.5.0i"
Expand Down Expand Up @@ -114,6 +116,7 @@ body:
label: Minecraft Version
description: The version of Minecraft you were using when the bug occured
options:
- "1.20.1"
- "1.19.2"
- "1.18.2"
- "1.18.1"
Expand Down
2 changes: 1 addition & 1 deletion FABRIC_CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ No formatting, just plain text. CurseForge support for it is terrible.

Change logging starts below:
----------
- require newer FAPI, should fix issues with Porting Lib not loading
- updated to 0.5.1.c
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center"><img src="https://i.imgur.com/SXaePW6.png" alt="Logo" width="200"></p>
<h1 align="center">Create <br>
<a href="https://www.patreon.com/simibubi"><img src="https://img.shields.io/badge/Supporters-80-ff5733" alt="Patreon"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/create-fabric/files"><img src="https://img.shields.io/badge/Available%20for-MC%201.18%20to%20MC%201.19-c70039" alt="Supported Versions"></a>
<a href="https://www.patreon.com/simibubi"><img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dsimibubi%26type%3Dpatrons&style=flat&label=Supporters&color=ff5733" alt="Patreon"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/create-fabric/files"><img src="https://cf.way2muchnoise.eu/versions/624165(c70039).svg" alt="Supported Versions"></a>
<a href="https://github.com/Creators-of-Create/Create/blob/master/LICENSE"><img src="https://img.shields.io/github/license/Creators-of-Create/Create?style=flat&color=900c3f" alt="License"></a>
<a href="https://discord.gg/hmaD7Se"><img src="https://img.shields.io/discord/620934202875183104?color=5865f2&label=Discord&style=flat" alt="Discord"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/create-fabric"><img src="http://cf.way2muchnoise.eu/624165.svg" alt="CF"></a>
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ loader_version = 0.14.19
fabric_version = 0.76.0+1.19.2

# Mod Properties
mod_version = 0.5.1-b
mod_version = 0.5.1-c
maven_group = com.simibubi.create

# Dependencies
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"replace": false,
"values": []
}
62 changes: 56 additions & 6 deletions src/main/java/com/simibubi/create/AllTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
import static com.simibubi.create.AllTags.NameSpace.QUARK;
import static com.simibubi.create.AllTags.NameSpace.TIC;

import com.simibubi.create.foundation.data.TagGen;
import com.simibubi.create.foundation.utility.Lang;

import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -42,6 +43,7 @@ public static TagKey<Fluid> forgeFluidTag(String path) {
}

public enum NameSpace {

MOD(Create.ID, false, true),
FORGE("c"),
TIC("tconstruct"),
Expand All @@ -65,6 +67,7 @@ public enum NameSpace {
}

public enum AllBlockTags {

BRITTLE,
CASING,
FAN_TRANSPARENT,
Expand Down Expand Up @@ -132,11 +135,12 @@ public boolean matches(BlockState state) {
return state.is(tag);
}

private static void init() {
}
private static void init() {}

}

public enum AllItemTags {

BLAZE_BURNER_FUEL_REGULAR(MOD, "blaze_burner_fuel/regular"),
BLAZE_BURNER_FUEL_SPECIAL(MOD, "blaze_burner_fuel/special"),
CASING,
Expand Down Expand Up @@ -199,11 +203,12 @@ public boolean matches(ItemStack stack) {
return stack.is(tag);
}

private static void init() {
}
private static void init() {}

}

public enum AllFluidTags {

BOTTOMLESS_ALLOW(MOD, "bottomless/allow"),
BOTTOMLESS_DENY(MOD, "bottomless/deny"),
// fabric: extra tag for diving helmet behavior
Expand Down Expand Up @@ -247,13 +252,58 @@ public boolean matches(FluidState state) {
return state.is(tag);
}

private static void init() {
private static void init() {}

}

public enum AllEntityTags {

IGNORE_SEAT,

;

public final TagKey<EntityType<?>> tag;
public final boolean alwaysDatagen;

AllEntityTags() {
this(MOD);
}

AllEntityTags(NameSpace namespace) {
this(namespace, namespace.optionalDefault, namespace.alwaysDatagenDefault);
}

AllEntityTags(NameSpace namespace, String path) {
this(namespace, path, namespace.optionalDefault, namespace.alwaysDatagenDefault);
}

AllEntityTags(NameSpace namespace, boolean optional, boolean alwaysDatagen) {
this(namespace, null, optional, alwaysDatagen);
}

AllEntityTags(NameSpace namespace, String path, boolean optional, boolean alwaysDatagen) {
ResourceLocation id = new ResourceLocation(namespace.id, path == null ? Lang.asId(name()) : path);
if (optional) {
tag = optionalTag(Registry.ENTITY_TYPE, id);
} else {
tag = TagKey.create(Registry.ENTITY_TYPE_REGISTRY, id);
}
this.alwaysDatagen = alwaysDatagen;
}

public boolean matches(Entity entity) {
return entity.getType()
.is(tag);
}

private static void init() {}

}

public static void init() {
AllBlockTags.init();
AllItemTags.init();
AllFluidTags.init();
AllEntityTags.init();
}
}
2 changes: 1 addition & 1 deletion src/main/java/com/simibubi/create/Create.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class Create implements ModInitializer {

public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.5.1b";
public static final String VERSION = "0.5.1c";

public static final Logger LOGGER = LogUtils.getLogger();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ public ComputerBehaviour(SmartBlockEntity te) {
this.peripheral = getPeripheralFor(te);
}

public static IPeripheral getPeripheralFor(SmartBlockEntity te) {
if (te instanceof SpeedControllerBlockEntity scbe)
public static IPeripheral getPeripheralFor(SmartBlockEntity be) {
if (be instanceof SpeedControllerBlockEntity scbe)
return new SpeedControllerPeripheral(scbe, scbe.targetSpeed);
if (te instanceof DisplayLinkBlockEntity dlbe)
if (be instanceof DisplayLinkBlockEntity dlbe)
return new DisplayLinkPeripheral(dlbe);
if (te instanceof SequencedGearshiftBlockEntity sgbe)
if (be instanceof SequencedGearshiftBlockEntity sgbe)
return new SequencedGearshiftPeripheral(sgbe);
if (te instanceof SpeedGaugeBlockEntity sgbe)
if (be instanceof SpeedGaugeBlockEntity sgbe)
return new SpeedGaugePeripheral(sgbe);
if (te instanceof StressGaugeBlockEntity sgbe)
if (be instanceof StressGaugeBlockEntity sgbe)
return new StressGaugePeripheral(sgbe);
if (te instanceof StationBlockEntity sbe)
if (be instanceof StationBlockEntity sbe)
return new StationPeripheral(sbe);

throw new IllegalArgumentException(
"No peripheral available for " + Registry.BLOCK_ENTITY_TYPE.getKey(te.getType()));
"No peripheral available for " + Registry.BLOCK_ENTITY_TYPE.getKey(be.getType()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import java.util.Optional;
import java.util.UUID;

import com.simibubi.create.foundation.utility.AdventureUtil;

import io.github.fabricators_of_create.porting_lib.entity.RemovalFromWorldListener;

import io.github.fabricators_of_create.porting_lib.util.EnvExecutor;
Expand Down Expand Up @@ -309,6 +311,9 @@ public boolean handlePlayerInteraction(Player player, BlockPos localPos, Directi
}
}

if (toDismount != null && AdventureUtil.isAdventure(player))
return false;

if (toDismount != null && !level.isClientSide) {
Vec3 transformedVector = getPassengerPosition(toDismount, 1);
toDismount.stopRiding();
Expand Down Expand Up @@ -880,7 +885,7 @@ public Matrix3d asMatrix() {
if (xRotation != 0)
matrix.multiply(new Matrix3d().asXRotation(AngleHelper.rad(-xRotation)));
if (yRotation != 0)
matrix.multiply(new Matrix3d().asYRotation(AngleHelper.rad(yRotation)));
matrix.multiply(new Matrix3d().asYRotation(AngleHelper.rad(-yRotation)));
if (zRotation != 0)
matrix.multiply(new Matrix3d().asZRotation(AngleHelper.rad(-zRotation)));
return matrix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.util.Iterator;
import java.util.List;

import com.simibubi.create.foundation.utility.AdventureUtil;

import org.apache.commons.lang3.tuple.MutablePair;

import com.simibubi.create.AllMovementBehaviours;
Expand All @@ -29,6 +31,8 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
@Override
public boolean handlePlayerInteraction(Player player, InteractionHand activeHand, BlockPos localPos,
AbstractContraptionEntity contraptionEntity) {
if (AdventureUtil.isAdventure(player))
return false;
Contraption contraption = contraptionEntity.getContraption();

MutablePair<StructureBlockInfo, MovementContext> actor = contraption.getActorAt(localPos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import com.google.common.base.Optional;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTags.AllEntityTags;
import com.simibubi.create.foundation.block.ProperWaterloggedBlock;
import com.simibubi.create.foundation.utility.BlockHelper;

import com.simibubi.create.infrastructure.config.AllConfigs;
import io.github.fabricators_of_create.porting_lib.block.CustomPathNodeTypeBlock;
import io.github.fabricators_of_create.porting_lib.util.TagUtil;
import net.fabricmc.fabric.api.registry.LandPathNodeTypesRegistry;
import net.minecraft.MethodsReturnNonnullByDefault;
Expand Down Expand Up @@ -186,6 +188,12 @@ public static boolean canBePickedUp(Entity passenger) {
return false;
if (passenger instanceof Player)
return false;
if (AllEntityTags.IGNORE_SEAT.matches(passenger))
return false;
if (!AllConfigs.server().logistics.seatHostileMobs.get() && !passenger.getType()
.getCategory()
.isFriendly())
return false;
return passenger instanceof LivingEntity;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.behaviour.MovingInteractionBehaviour;

import com.simibubi.create.foundation.utility.AdventureUtil;
import com.tterrag.registrate.fabric.EnvExecutor;

import net.minecraft.core.BlockPos;
Expand All @@ -19,6 +20,8 @@ public class ControlsInteractionBehaviour extends MovingInteractionBehaviour {
@Override
public boolean handlePlayerInteraction(Player player, InteractionHand activeHand, BlockPos localPos,
AbstractContraptionEntity contraptionEntity) {
if (AdventureUtil.isAdventure(player))
return false;
if (AllItems.WRENCH.isIn(player.getItemInHand(activeHand)))
return false;

Expand Down
Loading

0 comments on commit ff09bda

Please sign in to comment.