Skip to content

Commit 39364b3

Browse files
committed
Update to Minecraft 1.21
1 parent 80ec5df commit 39364b3

File tree

378 files changed

+5490
-9869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+5490
-9869
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up JDK 17
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: '17'
21+
java-version: '21'
2222
- name: Cache Gradle User Files
2323
uses: actions/cache@v1
2424
with:

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up JDK 17
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: '17'
21+
java-version: '21'
2222
- name: Cache Gradle User Files
2323
uses: actions/cache@v1
2424
with:

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
# Arclight
22

3-
A Bukkit server implementation utilizing Mixin.
3+
A Bukkit server implementation on common mod loaders.
44

55
![Downloads](https://img.shields.io/github/downloads/IzzelAliz/Arclight/total?style=flat-square) ![GitHub](https://img.shields.io/github/license/IzzelAliz/Arclight?style=flat-square)
66

7-
| Release | Forge | NeoForge | Fabric | Status | Downloads |
8-
|:---------------------|:--------|:---------|:-------|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
9-
| Whisper (1.20.4) | 49.0.49 | 20.4.234 | 0.97.0 | ACTIVE | [![1.20.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Whisper&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AWhisper) |
10-
| Trials (1.20-1.20.1) | 47.2.20 | - | - | LTS | [![1.20.1 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Trials&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ATrials) |
11-
| Horn (1.19-1.19.2) | 43.3.7 | - | - | LTS | [![Horn Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-19?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-19) |
7+
| Release | Forge | NeoForge | Fabric | Status | Downloads |
8+
|:---------------------|:--------|:------------|:--------|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
9+
| Feudal Kings (1.21) | 51.0.5 | 21.0.4-beta | 0.100.1 | ACTIVE | [![1.21 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=FeudalKings&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AFeudalKings) |
10+
| Whisper (1.20.4) | 49.0.49 | 20.4.234 | 0.97.0 | ACTIVE | [![1.20.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Whisper&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AWhisper) |
11+
| Trials (1.20-1.20.1) | 47.2.20 | - | - | LTS | [![1.20.1 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Trials&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ATrials) |
1212

1313
**Legacy versions**:
1414

1515
<details>
1616

17-
| Release | Forge | Status | Build |
18-
|:-------------------:|:-------:|:-------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
19-
| Net (1.20.2) | 48.1.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/Net%2F1.0.1) | [![1.20.2 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Net&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ANet) |
20-
| Executions (1.19.4) | 45.2.6 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/Executions%2F1.0.6) | [![1.19.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Executions&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AExecutions) |
21-
| Great Horn (1.19.3) | 44.1.22 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/GreatHorn/1.0.3) | [![1.19 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=GreatHorn&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-19) |
22-
| 1.18.x | 40.2.14 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.18%2F1.0.10) | [![1.18 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.18&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-18) |
23-
| 1.17.x | 37.1.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.17/1.0.2) | [![1.17 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-17?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-17) |
24-
| 1.16.x | 36.2.39 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.16%2F1.0.25) | [![1.16 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.16&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) |
25-
| 1.15.x | 31.2.48 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.15/1.0.19) | [![1.15 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-15?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-15) |
26-
| 1.14.x | 28.2.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.0.6) | [![1.14 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight) |
17+
| Release | Forge | NeoForge | Fabric | Status | Downloads |
18+
|:--------------------|:--------|:---------|:-------|:-------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
19+
| Net (1.20.2) | 48.1.0 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/Net%2F1.0.1) | [![1.20.2 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Net&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ANet) |
20+
| Executions (1.19.4) | 45.2.6 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/Executions%2F1.0.6) | [![1.19.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Executions&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AExecutions) |
21+
| Great Horn (1.19.3) | 44.1.22 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/GreatHorn/1.0.3) | [![1.19 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=GreatHorn&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-19) |
22+
| Horn (1.19-1.19.2) | 43.3.7 | - | - | LEGACY | [![Horn Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-19?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-19) |
23+
| 1.18.x | 40.2.14 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.18%2F1.0.10) | [![1.18 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.18&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-18) |
24+
| 1.17.x | 37.1.0 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.17/1.0.2) | [![1.17 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-17?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-17) |
25+
| 1.16.x | 36.2.39 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.16%2F1.0.25) | [![1.16 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.16&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) |
26+
| 1.15.x | 31.2.48 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.15/1.0.19) | [![1.15 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-15?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-15) |
27+
| 1.14.x | 28.2.0 | | | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.0.6) | [![1.14 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight) |
2728

2829
* Legacy version still accepts pull requests.
2930

arclight-common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ loom {
1919
arclight {
2020
mcVersion = minecraftVersion
2121
forgeVersion = project.ext.forgeVersion
22-
bukkitVersion = 'v1_20_R3'
22+
bukkitVersion = 'v1_21_R1'
2323
accessTransformer = project.file('bukkit.at')
2424
extraMapping = project(':arclight-common').file('extra_mapping.tsrg')
2525
}
Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
package io.izzel.arclight.common.bridge.bukkit;
22

3-
import java.util.Map;
4-
import net.minecraft.nbt.CompoundTag;
5-
import net.minecraft.nbt.Tag;
6-
73
public interface ItemMetaBridge {
84

9-
CompoundTag bridge$getForgeCaps();
10-
11-
void bridge$setForgeCaps(CompoundTag nbt);
12-
13-
void bridge$offerUnhandledTags(CompoundTag nbt);
14-
15-
Map<String, Tag> bridge$getUnhandledTags();
16-
17-
void bridge$setUnhandledTags(Map<String, Tag> tags);
185
}

arclight-common/src/main/java/io/izzel/arclight/common/bridge/bukkit/MaterialBridge.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
package io.izzel.arclight.common.bridge.bukkit;
22

33
import io.izzel.arclight.i18n.conf.MaterialPropertySpec;
4+
import net.minecraft.core.component.DataComponents;
5+
import net.minecraft.resources.ResourceLocation;
6+
import net.minecraft.world.item.Item;
7+
import net.minecraft.world.level.block.Block;
48
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
59
import org.bukkit.block.BlockState;
610
import org.bukkit.craftbukkit.v.block.CraftBlock;
711
import org.bukkit.craftbukkit.v.inventory.CraftMetaItem;
812
import org.bukkit.inventory.meta.ItemMeta;
913

1014
import javax.annotation.Nullable;
11-
import net.minecraft.resources.ResourceLocation;
12-
import net.minecraft.world.item.Item;
13-
import net.minecraft.world.level.block.Block;
1415
import java.util.function.Function;
1516

1617
public interface MaterialBridge {
@@ -40,19 +41,19 @@ public interface MaterialBridge {
4041

4142
boolean bridge$shouldApplyStateFactory();
4243

43-
default Item bridge$getCraftRemainingItem(Item item) {
44+
default Item bridge$getCraftRemainingItem(Item item) {
4445
return item.getCraftingRemainingItem();
4546
}
4647

4748
default int bridge$forge$getMaxStackSize(Item item) {
48-
return item.getMaxStackSize();
49+
return item.getDefaultMaxStackSize();
4950
}
5051

5152
default int bridge$forge$getDurability(Item item) {
52-
return item.getMaxDamage();
53+
return item.components().getOrDefault(DataComponents.MAX_DAMAGE, 0);
5354
}
5455

55-
default int bridge$forge$getBurnTime(Item item) {
56+
default int bridge$forge$getBurnTime(Item item) {
5657
var result = AbstractFurnaceBlockEntity.getFuel().get(item);
5758
return result != null ? result : 0;
5859
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
package io.izzel.arclight.common.bridge.core.entity;
22

33
public interface AreaEffectCloudEntityBridge {
4-
5-
void bridge$refreshEffects();
64
}

arclight-common/src/main/java/io/izzel/arclight/common/bridge/core/entity/EntityBridge.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@
55
import io.izzel.tools.product.Product;
66
import io.izzel.tools.product.Product4;
77
import net.minecraft.core.BlockPos;
8-
import net.minecraft.server.level.ServerLevel;
98
import net.minecraft.world.entity.Entity;
109
import net.minecraft.world.entity.boss.EnderDragonPart;
1110
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
12-
import net.minecraft.world.phys.Vec3;
11+
import org.bukkit.Location;
1312
import org.bukkit.craftbukkit.v.entity.CraftEntity;
13+
import org.bukkit.craftbukkit.v.event.CraftPortalEvent;
1414
import org.bukkit.event.entity.EntityRemoveEvent;
15+
import org.bukkit.event.player.PlayerTeleportEvent;
1516
import org.bukkit.projectiles.ProjectileSource;
1617

1718
import java.util.List;
1819

1920
public interface EntityBridge extends ICommandSourceBridge, InjectEntityBridge {
2021

21-
Entity bridge$teleportTo(ServerLevel world, Vec3 blockPos);
22-
23-
void bridge$setOnFire(int tick, boolean callEvent);
22+
void bridge$setOnFire(float seconds, boolean callEvent);
2423

2524
CraftEntity bridge$getBukkitEntity();
2625

@@ -52,10 +51,6 @@ public interface EntityBridge extends ICommandSourceBridge, InjectEntityBridge {
5251

5352
void bridge$postTick();
5453

55-
boolean bridge$removePassenger(Entity passenger);
56-
57-
boolean bridge$addPassenger(Entity entity);
58-
5954
List<Entity> bridge$getPassengers();
6055

6156
void bridge$setRideCooldown(int rideCooldown);
@@ -66,12 +61,18 @@ public interface EntityBridge extends ICommandSourceBridge, InjectEntityBridge {
6661

6762
void bridge$setLastLavaContact(BlockPos pos);
6863

69-
Vec3 bridge$getLastTpPos();
70-
7164
void bridge$revive();
7265

7366
void bridge$pushEntityRemoveCause(EntityRemoveEvent.Cause cause);
7467

68+
CraftPortalEvent bridge$callPortalEvent(Entity entity, Location exit, PlayerTeleportEvent.TeleportCause cause, int searchRadius, int creationRadius);
69+
70+
boolean bridge$pluginRemoved();
71+
72+
boolean bridge$isForceDrops();
73+
74+
void bridge$setForceDrops(boolean b);
75+
7576
default boolean bridge$forge$isPartEntity() {
7677
return this instanceof EnderDragonPart;
7778
}
Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package io.izzel.arclight.common.bridge.core.entity;
22

3-
import io.izzel.tools.product.Product;
4-
import io.izzel.tools.product.Product3;
53
import net.minecraft.core.BlockPos;
4+
import net.minecraft.core.Holder;
65
import net.minecraft.world.InteractionHand;
76
import net.minecraft.world.damagesource.DamageSource;
87
import net.minecraft.world.effect.MobEffect;
@@ -14,13 +13,11 @@
1413
import net.minecraft.world.entity.player.Player;
1514
import net.minecraft.world.item.ItemStack;
1615
import net.minecraft.world.level.Level;
17-
import net.minecraft.world.level.block.state.BlockState;
1816
import org.bukkit.craftbukkit.v.entity.CraftLivingEntity;
1917
import org.bukkit.event.entity.EntityKnockbackEvent;
2018
import org.bukkit.event.entity.EntityPotionEffectEvent;
2119
import org.bukkit.event.entity.EntityRegainHealthEvent;
2220

23-
import javax.annotation.Nullable;
2421
import java.util.Collection;
2522
import java.util.Optional;
2623

@@ -32,9 +29,7 @@ public interface LivingEntityBridge extends EntityBridge {
3229

3330
boolean bridge$canPickUpLoot();
3431

35-
boolean bridge$isForceDrops();
36-
37-
int bridge$getExpReward();
32+
int bridge$getExpReward(Entity entity);
3833

3934
void bridge$setExpToDrop(int amount);
4035

@@ -48,7 +43,7 @@ public interface LivingEntityBridge extends EntityBridge {
4843

4944
boolean bridge$addEffect(MobEffectInstance effect, EntityPotionEffectEvent.Cause cause);
5045

51-
boolean bridge$removeEffect(MobEffect effect, EntityPotionEffectEvent.Cause cause);
46+
boolean bridge$removeEffect(Holder<MobEffect> effect, EntityPotionEffectEvent.Cause cause);
5247

5348
boolean bridge$removeAllEffects(EntityPotionEffectEvent.Cause cause);
5449

@@ -63,27 +58,6 @@ public interface LivingEntityBridge extends EntityBridge {
6358
return originalExperience;
6459
}
6560

66-
default boolean bridge$forge$mobEffectExpired(MobEffectInstance effect) {
67-
return false;
68-
}
69-
70-
default boolean bridge$forge$mobEffectAdded(MobEffectInstance old, MobEffectInstance effect, Entity entity) {
71-
return false;
72-
}
73-
74-
default float bridge$forge$onLivingHurt(LivingEntity entity, DamageSource src, float amount) {
75-
return amount;
76-
}
77-
78-
default Product3<Boolean /*cancelled*/, Float /*block damage*/, Boolean /*shield take damage*/> bridge$forge$onShieldBlock(
79-
LivingEntity blocker, DamageSource source, float blocked) {
80-
return Product.of(false, blocked, true);
81-
}
82-
83-
default float bridge$forge$onLivingDamage(LivingEntity entity, DamageSource src, float amount) {
84-
return amount;
85-
}
86-
8761
default boolean bridge$forge$onLivingUseTotem(LivingEntity entity, DamageSource damageSource, ItemStack totem, InteractionHand hand) {
8862
return true;
8963
}
@@ -93,24 +67,12 @@ enum LivingTargetType {
9367
MOB_TARGET
9468
}
9569

96-
default @Nullable LivingEntity bridge$forge$onLivingChangeTarget(LivingEntity entity, LivingEntity originalTarget, LivingTargetType targetType) {
97-
return originalTarget;
98-
}
99-
100-
default BlockPos bridge$forge$onEnderTeleport(LivingEntity entity, double targetX, double targetY, double targetZ) {
101-
return BlockPos.containing(targetX, targetY, targetZ);
102-
}
103-
10470
default void bridge$forge$onLivingConvert(LivingEntity entity, LivingEntity outcome) {}
10571

10672
default boolean bridge$forge$canEntityDestroy(Level level, BlockPos pos, LivingEntity entity) {
10773
return true;
10874
}
10975

110-
default boolean bridge$forge$onEntityDestroyBlock(LivingEntity entity, BlockPos pos, BlockState state) {
111-
return true;
112-
}
113-
11476
void bridge$common$startCaptureDrops();
11577

11678
boolean bridge$common$isCapturingDrops();
@@ -119,5 +81,5 @@ enum LivingTargetType {
11981

12082
Collection<ItemEntity> bridge$common$getCapturedDrops();
12183

122-
void bridge$common$finishCaptureAndFireEvent();
84+
void bridge$common$finishCaptureAndFireEvent(DamageSource damageSource);
12385
}

arclight-common/src/main/java/io/izzel/arclight/common/bridge/core/entity/MobEntityBridge.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.izzel.arclight.common.bridge.core.entity;
22

3-
import net.minecraft.resources.ResourceLocation;
43
import net.minecraft.world.entity.AgeableMob;
54
import net.minecraft.world.entity.LivingEntity;
65
import net.minecraft.world.entity.Mob;
@@ -20,8 +19,6 @@ public interface MobEntityBridge extends LivingEntityBridge {
2019

2120
boolean bridge$lastGoalTargetResult();
2221

23-
ResourceLocation bridge$getLootTable();
24-
2522
boolean bridge$isPersistenceRequired();
2623

2724
void bridge$setPersistenceRequired(boolean value);

0 commit comments

Comments
 (0)