Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TISUnion/TISCarpet113
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: build397
Choose a base ref
...
head repository: TISUnion/TISCarpet113
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: TIS-Server
Choose a head ref

Commits on Apr 28, 2023

  1. Add OP permission check to command `/log <loggerName> <option> <playe…

    …rName>` and `/log clean <playerName>` that controls logger subscription for other players
    Fallen-Breath committed Apr 28, 2023
    Copy the full SHA
    308f6c7 View commit details

Commits on May 3, 2023

  1. Copy the full SHA
    8588216 View commit details
  2. Added logger playerCheckLight

    by simply compare the light level before and after the check
    Fallen-Breath committed May 3, 2023
    Copy the full SHA
    d2713b2 View commit details

Commits on May 21, 2023

  1. Copy the full SHA
    dd5444b View commit details

Commits on May 28, 2023

  1. fixed Messenger.entity

    Fallen-Breath committed May 28, 2023
    Copy the full SHA
    3101d4d View commit details
  2. Copy the full SHA
    d1a1d8f View commit details
  3. Add /info world container player_related and `/info chunk entity_li…

    …st` subcommands for ghost player debug
    Fallen-Breath committed May 28, 2023
    Copy the full SHA
    d23ef87 View commit details
  4. Copy the full SHA
    ab9896a View commit details
  5. renamed rule threadstoneLogger to loggerThreadstone

    for consistency
    Fallen-Breath committed May 28, 2023
    Copy the full SHA
    0edb010 View commit details
  6. rule category LOGGER

    Fallen-Breath committed May 28, 2023
    Copy the full SHA
    2e2e7bd View commit details
  7. Ported rule fakePlayerRemoteSpawning

    and it's condition is stricter
    stop bot abuse
    Fallen-Breath committed May 28, 2023
    Copy the full SHA
    91a6dff View commit details
  8. Copy the full SHA
    cfc6d1d View commit details

Commits on May 29, 2023

  1. Copy the full SHA
    29df7b4 View commit details

Commits on Jun 16, 2023

  1. updated rule yeetUpdateSuppressionCrash impl from CTA

    add cause class name display
    add oom / cce support
    Fallen-Breath committed Jun 16, 2023
    Copy the full SHA
    4108cbd View commit details

Commits on Jun 18, 2023

  1. Copy the full SHA
    c9fb56d View commit details

Commits on Jul 16, 2023

  1. use git subproject to store the TISCM_libs

    so we no longer need catbox
    Fallen-Breath committed Jul 16, 2023
    Copy the full SHA
    abfc819 View commit details
  2. Copy the full SHA
    414c408 View commit details
  3. Copy the full SHA
    1cfd772 View commit details
  4. Copy the full SHA
    e354700 View commit details

Commits on Nov 2, 2023

  1. change: use lapis ore instead of redstone ore for rule `updateSuppres…

    …sionSimulator`
    
    redstone ore might have random update in random tick phase, which is bad
    sync from Carpet TIS Addition
    Fallen-Breath committed Nov 2, 2023
    Copy the full SHA
    9b332f9 View commit details

Commits on Nov 5, 2023

  1. Copy the full SHA
    652c394 View commit details

Commits on Mar 2, 2024

  1. compat network NBT change introduced in mc1.20.2

    Fallen-Breath committed Mar 2, 2024
    Copy the full SHA
    3deb6d0 View commit details
  2. github action node16 thing

    Fallen-Breath committed Mar 2, 2024
    Copy the full SHA
    f3b15a6 View commit details

Commits on Mar 6, 2024

  1. fixed nested usage of markReaderIndex+readerIndex

    Fallen-Breath committed Mar 6, 2024
    Copy the full SHA
    7525359 View commit details

Commits on Jun 25, 2024

  1. lithium tick scheduler seems to be not vanilla (as not vanilla as lit…

    …hium in mc 1.15/1.16), disable for now
    
    to reproduce: 0t -> repeater, the repeater depower event will be executed in a wrong priority
    todo: update to the lithium 1.17
    Fallen-Breath committed Jun 25, 2024
    Copy the full SHA
    71249cd View commit details
  2. the maven solution

    todo: fix `files.minecraftforge.net` and `libraries.minecraft.net`, the remaining 2
    Fallen-Breath committed Jun 25, 2024
    Copy the full SHA
    4c90bd7 View commit details
  3. Ported rule debugNbtQueryNoPermission

    Fallen-Breath committed Jun 25, 2024
    Copy the full SHA
    c6826b5 View commit details

Commits on Oct 1, 2024

  1. Ported rule spawnBabyProbably and spawnJockeyProbably

    Fallen-Breath committed Oct 1, 2024
    Copy the full SHA
    00e90c6 View commit details

Commits on Dec 1, 2024

  1. Copy the full SHA
    c7e7101 View commit details
  2. Copy the full SHA
    7da226d View commit details
  3. Add portalCache logger

    Fallen-Breath committed Dec 1, 2024
    Copy the full SHA
    d88aa92 View commit details

Commits on Dec 3, 2024

  1. more maven hack

    Fallen-Breath committed Dec 3, 2024
    Copy the full SHA
    5a2e643 View commit details
  2. fix LithiumServerTickScheduler fix TickEntry<T> field values not up-t…

    …o-date when reuse
    
    just don't reuse
    Fallen-Breath committed Dec 3, 2024
    Copy the full SHA
    b28381e View commit details
  3. Revert "fix LithiumServerTickScheduler fix TickEntry<T> field values …

    …not up-to-date when reuse"
    
    still buggy, revert
    This reverts commit b28381e.
    Fallen-Breath committed Dec 3, 2024
    Copy the full SHA
    2afd6d3 View commit details
  4. portalCache logger message fix

    Fallen-Breath committed Dec 3, 2024
    Copy the full SHA
    5afaec5 View commit details
  5. portalCache logger better portal coord tp command

    Fallen-Breath committed Dec 3, 2024
    Copy the full SHA
    1f0ddc9 View commit details

Commits on Dec 4, 2024

  1. portalCache logger better messaging

    Fallen-Breath committed Dec 4, 2024
    Copy the full SHA
    e456f7a View commit details
  2. using worldedit from our custom fork

    now worldedit can finally work in prod client env
    Fallen-Breath committed Dec 4, 2024
    Copy the full SHA
    42907ef View commit details

Commits on Dec 9, 2024

  1. TISCM creativeNoClip extra: make xp orb forget no clip players

    Fallen-Breath committed Dec 9, 2024
    Copy the full SHA
    ced82e5 View commit details
Showing with 1,636 additions and 236 deletions.
  1. +8 −11 .github/workflows/gradle.yml
  2. +0 −1 .gitignore
  3. +3 −0 .gitmodules
  4. +2 −1 README.md
  5. +1 −0 TISCM_libs
  6. +14 −12 build.gradle
  7. +1 −1 patches/net/minecraft/block/BlockBeacon.java.patch
  8. +2 −2 patches/net/minecraft/block/BlockNote.java.patch
  9. +18 −5 patches/net/minecraft/block/BlockRailPowered.java.patch
  10. +17 −3 patches/net/minecraft/command/impl/TeleportCommand.java.patch
  11. +12 −6 patches/net/minecraft/entity/item/EntityXPOrb.java.patch
  12. +24 −0 patches/net/minecraft/entity/monster/AbstractSkeleton.java.patch
  13. +25 −0 patches/net/minecraft/entity/monster/EntityPhantom.java.patch
  14. +24 −0 patches/net/minecraft/entity/monster/EntitySpider.java.patch
  15. +48 −2 patches/net/minecraft/entity/monster/EntityZombie.java.patch
  16. +1 −1 patches/net/minecraft/entity/player/EntityPlayerMP.java.patch
  17. +18 −0 patches/net/minecraft/network/NetHandlerPlayServer.java.patch
  18. +2 −2 patches/net/minecraft/server/MinecraftServer.java.patch
  19. +13 −1 patches/net/minecraft/server/management/PlayerChunkMap.java.patch
  20. +7 −1 patches/net/minecraft/server/management/PlayerChunkMapEntry.java.patch
  21. +32 −0 patches/net/minecraft/util/IntHashMap.java.patch
  22. +44 −11 patches/net/minecraft/world/Teleporter.java.patch
  23. +67 −34 patches/net/minecraft/world/World.java.patch
  24. +92 −18 patches/net/minecraft/world/WorldServer.java.patch
  25. +1 −1 patches/net/minecraft/world/chunk/BlockStateContainer.java.patch
  26. +58 −32 patches/net/minecraft/world/chunk/Chunk.java.patch
  27. +4 −4 patches/net/minecraft/world/gen/ChunkProviderServer.java.patch
  28. +1 −0 settings.gradle
  29. +132 −4 src/main/java/carpet/commands/InfoCommand.java
  30. +2 −0 src/main/java/carpet/commands/LogCommand.java
  31. +17 −0 src/main/java/carpet/commands/PlayerCommand.java
  32. +17 −33 src/main/java/carpet/helpers/UpdateSuppressionException.java
  33. +61 −0 src/main/java/carpet/helpers/UpdateSuppressionSimulator.java
  34. +9 −0 src/main/java/carpet/logging/LoggerRegistry.java
  35. +131 −0 src/main/java/carpet/logging/ghostPlayer/GhostPlayerLogger.java
  36. +70 −0 src/main/java/carpet/logging/playerCheckLight/PlayerCheckLightLogger.java
  37. +111 −0 src/main/java/carpet/logging/portalCache/PortalCacheLogger.java
  38. +2 −2 src/main/java/carpet/logging/threadstone/ThreadstoneLogger.java
  39. +4 −1 src/main/java/carpet/network/CarpetClientNetworkHandler.java
  40. +4 −1 src/main/java/carpet/network/CarpetServerNetworkHandler.java
  41. +61 −0 src/main/java/carpet/network/ProtocolFixer.java
  42. +2 −1 src/main/java/carpet/network/tiscm/TISCMClientPacketHandler.java
  43. +2 −1 src/main/java/carpet/network/tiscm/TISCMServerPacketHandler.java
  44. +109 −3 src/main/java/carpet/settings/CarpetSettings.java
  45. +1 −1 src/main/java/carpet/settings/ParsedRule.java
  46. +1 −0 src/main/java/carpet/settings/RuleCategory.java
  47. +25 −7 src/main/java/carpet/utils/CommandUtil.java
  48. +1 −1 src/main/java/carpet/utils/Messenger.java
  49. +135 −0 src/main/java/carpet/utils/NetworkUtil.java
  50. +1 −1 src/main/java/carpet/utils/deobfuscator/StackTracePrinter.java
  51. +3 −1 src/main/java/me/fallenbreath/lmspaster/LitematicaServerPasterAccess.java
  52. +21 −1 src/main/java/me/fallenbreath/lmspaster/LitematicaServerPasterMod.java
  53. +55 −0 src/main/java/me/fallenbreath/lmspaster/network/LmsPasterPayload.java
  54. +27 −11 src/main/java/me/fallenbreath/lmspaster/network/Network.java
  55. +35 −16 src/main/java/me/fallenbreath/lmspaster/network/ServerNetworkHandler.java
  56. +20 −0 src/main/java/me/fallenbreath/lmspaster/util/RegistryUtil.java
  57. +2 −1 src/main/java/redstone/multimeter/common/network/AbstractPacketHandler.java
  58. +36 −1 src/main/resources/assets/carpet/lang/zh_cn.yml
19 changes: 8 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -10,12 +10,12 @@ jobs:
concurrency: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Generate build number for push
id: buildnumber
if: ${{ github.event_name == 'push' }}
uses: einaregilsson/build-number@v3
uses: onyxmueller/build-tag-number@v1
with:
token: ${{ secrets.github_token }}

@@ -60,20 +60,17 @@ jobs:
hardcoded_optimization: 'false'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 1.8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8.0

- name: Download libs
run: |
wget https://files.catbox.moe/xqp3xy.zip -O TISCM_libs.zip
unzip TISCM_libs.zip
- name: Cache gradle files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
@@ -111,7 +108,7 @@ jobs:
cd installer
./create_installer_all_in_one.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: '[${{matrix.name}}] TISCarpet build${{ needs.prepare.outputs.build_number }} installer'
path: installer/TISCarpet_installer.tar.gz
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -8,5 +8,4 @@
/installer/*.zip
/installer/*.tar.gz
Carpetmod.iml
/TISCM_libs
/TISCM_libs*.zip
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "TISCM_libs"]
path = TISCM_libs
url = https://github.com/TISUnion/TISCM_libs.git
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@ Notes:

- Remember to `genPatches` before committing your changes
- Remember to `setup` after switching git branch / pulling from remote repository
- You need to download TISCM_libs from [here](https://files.catbox.moe/xqp3xy.zip) and unzip it into the project folder, since some library providers are down
- You need to also pull subproject [TISCM_libs](https://github.com/TISUnion/TISCM_libs), since some library providers are down
- e.g. `git submodule update --init`

See also: https://github.com/gnembon/carpetmod/blob/master/README.md
1 change: 1 addition & 0 deletions TISCM_libs
Submodule TISCM_libs added at dae7f7
26 changes: 14 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
buildscript {
repositories {
mavenLocal()
maven { url "$projectDir/TISCM_libs" }
maven { url = 'http://files.minecraftforge.net/maven' }
jcenter()
// mavenLocal()
// maven { url "$projectDir/TISCM_libs" }
// maven { url 'https://maven.fallenbreath.me/releases' }
// maven { url 'http://files.minecraftforge.net/maven' }
// jcenter()
mavenCentral()
//maven {url 'http://plugins.gradle.org/m2/'} // For debug purposes
maven { url 'https://maven.fallenbreath.me/tiscm13' }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.23'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.23' // newer version does not work
classpath 'com.github.abrarsyed.jastyle:jAstyle:1.3'
classpath 'com.google.code.gson:gson:2.8.0' // because groovy JsonGenerator doesn't exist wtf
classpath 'commons-io:commons-io:2.6'
@@ -113,10 +114,10 @@ def projectMod = project(':' + settings.modname) {
}
}
repositories {
maven { url = 'https://maven.enginehub.org/repo' } // worldedit
maven { url = 'https://www.jitpack.io' } // spark
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' } // spark dependency
mavenLocal()
// maven { url = 'https://maven.enginehub.org/repo' } // worldedit
// maven { url = 'https://www.jitpack.io' } // spark
// maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' } // spark dependency
maven { url 'https://maven.fallenbreath.me/tiscm13' }
mavenCentral()
}
patcher {
@@ -184,8 +185,8 @@ def projectMod = project(':' + settings.modname) {
}
dependencies {
// World Edit
compile 'com.sk89q.worldedit:worldedit-core:7.2.7'
worldEditLibs ('com.sk89q.worldedit:worldedit-core:7.2.7') {
compile 'com.github.TISUnion.WorldEdit:worldedit-core:9621654d2b'
worldEditLibs ('com.github.TISUnion.WorldEdit:worldedit-core:9621654d2b') {
exclude group: 'com.ibm.icu' // not used in worldedit at all
exclude group: 'org.antlr', module: 'antlr4' // only reserves the runtime package
exclude group: 'org.yaml' // worldedit only uses yaml stuffs in bukkit
@@ -228,6 +229,7 @@ def projectMod = project(':' + settings.modname) {
"org.lwjgl.util.DebugLoader": "true"
]
environment += [
// https://maven.fallenbreath.me/tiscm13/tiscm13_forge_gradle_assets.zip
assetDirectory: file("${gradle.getGradleUserHomeDir()}/caches/forge_gradle/assets/"),
nativesDirectory: extractNatives.output
]
2 changes: 1 addition & 1 deletion patches/net/minecraft/block/BlockBeacon.java.patch
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
HttpUtil.DOWNLOADER_EXECUTOR.submit(() ->
{
+ // TISCM threadstone logger logs beacons
+ boolean logBeacons = CarpetSettings.threadstoneLogger && LoggerRegistry.__threadstone;
+ boolean logBeacons = CarpetSettings.loggerThreadstone && LoggerRegistry.__threadstone;
+ long startNano = logBeacons ? System.nanoTime() : 0;
+
+ // TISCM threadstone logger add try
4 changes: 2 additions & 2 deletions patches/net/minecraft/block/BlockNote.java.patch
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
+ {
+ HttpUtil.DOWNLOADER_EXECUTOR.submit(() -> {
+ // IBlockState#updateNeighbors = PP update
+ if (CarpetSettings.threadstoneLogger && LoggerRegistry.__threadstone)
+ if (CarpetSettings.loggerThreadstone && LoggerRegistry.__threadstone)
+ {
+ ThreadstoneLogger.getInstance().onNoteBlockDebugThreadStarted();
+ }
@@ -83,7 +83,7 @@
+ }
+ catch (Throwable throwable)
+ {
+ if (CarpetSettings.threadstoneLogger && LoggerRegistry.__threadstone)
+ if (CarpetSettings.loggerThreadstone && LoggerRegistry.__threadstone)
+ {
+ ThreadstoneLogger.getInstance().onExceptionallyEndedAsyncThread(throwable);
+ }
23 changes: 18 additions & 5 deletions patches/net/minecraft/block/BlockRailPowered.java.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
--- a/net/minecraft/block/BlockRailPowered.java
+++ b/net/minecraft/block/BlockRailPowered.java
@@ -1,5 +1,8 @@
@@ -1,6 +1,11 @@
package net.minecraft.block;

+import carpet.helpers.UpdateSuppressionSimulator;
+import carpet.logging.microtiming.MicroTimingLoggerManager;
+import carpet.logging.microtiming.enums.EventType;
+import carpet.settings.CarpetSettings;
import net.minecraft.block.state.IBlockState;
+import net.minecraft.init.Blocks;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
@@ -11,8 +14,9 @@
import net.minecraft.state.IProperty;
@@ -11,8 +16,9 @@
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -20,7 +23,7 @@
{
public static final EnumProperty<RailShape> SHAPE = BlockStateProperties.RAIL_SHAPE_STRAIGHT;
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
@@ -25,7 +29,8 @@
@@ -25,7 +31,8 @@

protected boolean findPoweredRailSignal(World worldIn, BlockPos pos, IBlockState state, boolean p_176566_4_, int p_176566_5_)
{
@@ -30,16 +33,26 @@
{
return false;
}
@@ -177,15 +182,19 @@
@@ -177,15 +184,29 @@
boolean flag = state.get(POWERED);
boolean flag1 = worldIn.isBlockPowered(pos) || this.findPoweredRailSignal(worldIn, pos, state, true, 0) || this.findPoweredRailSignal(worldIn, pos, state, false, 0);

+ logPowered(worldIn, pos, flag1); // RSMM
+
if (flag1 != flag)
{
+ // TISCM updateSuppressionSimulator
+ if (UpdateSuppressionSimulator.isActivated())
+ {
+ if (!flag1 && worldIn.getBlockState(pos.down()).getBlock() == Blocks.LAPIS_ORE)
+ {
+ UpdateSuppressionSimulator.kaboom();
+ }
+ }
+
worldIn.setBlockState(pos, state.with(POWERED, Boolean.valueOf(flag1)), 3);
+ MicroTimingLoggerManager.onEmitBlockUpdate(worldIn, this, pos, EventType.ACTION_START, "updateState"); // TISCM Micro Timing logger
+
worldIn.notifyNeighborsOfStateChange(pos.down(), this);

if (state.get(SHAPE).isAscending())
@@ -50,7 +63,7 @@
}
}

@@ -333,4 +342,22 @@
@@ -333,4 +354,22 @@
{
builder.add(SHAPE, POWERED);
}
20 changes: 17 additions & 3 deletions patches/net/minecraft/command/impl/TeleportCommand.java.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
--- a/net/minecraft/command/impl/TeleportCommand.java
+++ b/net/minecraft/command/impl/TeleportCommand.java
@@ -1,5 +1,6 @@
@@ -1,5 +1,7 @@
package net.minecraft.command.impl;

+import carpet.helpers.CommandPermissionHelper;
+import carpet.settings.CarpetSettings;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.tree.LiteralCommandNode;
@@ -30,11 +31,10 @@
@@ -30,11 +32,10 @@
{
public static void register(CommandDispatcher<CommandSource> dispatcher)
{
@@ -22,7 +23,7 @@
return teleportToPos(p_198807_0_.getSource(), EntityArgument.getEntities(p_198807_0_, "targets"), p_198807_0_.getSource().getWorld(), Vec3Argument.getLocation(p_198807_0_, "location"), (ILocationArgument)null, (TeleportCommand.Facing)null);
}).then(Commands.argument("rotation", RotationArgument.rotation()).executes((p_198811_0_) ->
{
@@ -58,10 +58,9 @@
@@ -58,17 +59,21 @@
{
return teleportToEntity(p_200562_0_.getSource(), Collections.singleton(p_200562_0_.getSource().assertIsEntity()), EntityArgument.getEntity(p_200562_0_, "destination"));
})));
@@ -36,3 +37,16 @@
}

private static int teleportToEntity(CommandSource source, Collection <? extends Entity > targets, Entity destination)
{
for (Entity entity : targets)
{
- teleport(source, entity, source.getWorld(), destination.posX, destination.posY, destination.posZ, EnumSet.noneOf(SPacketPlayerPosLook.EnumFlags.class), destination.rotationYaw, destination.rotationPitch, (TeleportCommand.Facing)null);
+ // TISCM teleportCommandCrossDimensionSupport
+ WorldServer destWorld = CarpetSettings.teleportCommandCrossDimensionSupport ?
+ (WorldServer)destination.world : // modded
+ source.getWorld(); // vanilla
+
+ teleport(source, entity, destWorld, destination.posX, destination.posY, destination.posZ, EnumSet.noneOf(SPacketPlayerPosLook.EnumFlags.class), destination.rotationYaw, destination.rotationPitch, (TeleportCommand.Facing)null);
}

if (targets.size() == 1)
18 changes: 12 additions & 6 deletions patches/net/minecraft/entity/item/EntityXPOrb.java.patch
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@
public EntityXPOrb(World worldIn)
{
super(EntityType.EXPERIENCE_ORB, worldIn);
@@ -103,28 +128,40 @@
@@ -103,28 +128,46 @@
}

this.pushOutOfBlocks(this.posX, (this.getBoundingBox().minY + this.getBoundingBox().maxY) / 2.0D, this.posZ);
@@ -89,6 +89,12 @@
this.closestPlayer = null;
}

+ // TISCM creativeNoClip extra
+ if (this.closestPlayer != null && CreativeNoClipHelper.canEntityIgnoreClip(this.closestPlayer))
+ {
+ this.closestPlayer = null;
+ }
+
if (this.closestPlayer != null)
{
- double d1 = (this.closestPlayer.posX - this.posX) / 8.0D;
@@ -100,7 +106,7 @@
double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);
double d5 = 1.0D - d4;

@@ -138,6 +175,21 @@
@@ -138,6 +181,21 @@
}

this.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);
@@ -122,23 +128,23 @@
float f = 0.98F;

if (this.onGround)
@@ -159,6 +211,7 @@
@@ -159,6 +217,7 @@

if (this.xpOrbAge >= 6000)
{
+ this.recordRemoval(LiteralRemovalReason.DESPAWN_TIMEOUT); // TISCM lifetime tracker
this.remove();
}
}
@@ -193,6 +246,7 @@
@@ -193,6 +252,7 @@

if (this.xpOrbHealth <= 0)
{
+ this.setDeathDamageSource(source); // TISCM lifetime tracker
this.remove();
}

@@ -218,8 +272,11 @@
@@ -218,8 +278,11 @@
{
if (!this.world.isRemote)
{
@@ -151,7 +157,7 @@
entityIn.xpCooldown = 2;
entityIn.onItemPickup(this, 1);
ItemStack itemstack = EnchantmentHelper.getEnchantedItem(Enchantments.MENDING, entityIn);
@@ -251,6 +308,10 @@
@@ -251,6 +314,10 @@
return xp * 2;
}

24 changes: 24 additions & 0 deletions patches/net/minecraft/entity/monster/AbstractSkeleton.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- a/net/minecraft/entity/monster/AbstractSkeleton.java
+++ b/net/minecraft/entity/monster/AbstractSkeleton.java
@@ -3,6 +3,8 @@
import java.time.LocalDate;
import java.time.temporal.ChronoField;
import javax.annotation.Nullable;
+
+import carpet.settings.CarpetSettings;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.CreatureAttribute;
import net.minecraft.entity.EntityCreature;
@@ -131,6 +133,12 @@
flag = false;
}

+ // TISCM undeadDontBurnInSunlight
+ if (CarpetSettings.undeadDontBurnInSunlight)
+ {
+ flag = false;
+ }
+
if (flag)
{
this.setFire(8);
25 changes: 25 additions & 0 deletions patches/net/minecraft/entity/monster/EntityPhantom.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/net/minecraft/entity/monster/EntityPhantom.java
+++ b/net/minecraft/entity/monster/EntityPhantom.java
@@ -2,6 +2,8 @@

import java.util.List;
import javax.annotation.Nullable;
+
+import carpet.settings.CarpetSettings;
import net.minecraft.entity.CreatureAttribute;
import net.minecraft.entity.EntityBodyHelper;
import net.minecraft.entity.EntityFlying;
@@ -152,7 +154,12 @@
{
if (this.isInDaylight())
{
- this.setFire(8);
+ // TISCM undeadDontBurnInSunlight wrapped setFire call
+// this.setFire(8);
+ if (CarpetSettings.undeadDontBurnInSunlight)
+ {
+ this.setFire(8);
+ }
}

super.livingTick();
Loading