Update to forge 47.2.0
This commit is contained in:
parent
62ac3c1331
commit
f347f85986
|
@ -6,7 +6,7 @@ A Bukkit server implementation utilizing Mixin.
|
||||||
|
|
||||||
| Release | Forge | Status | Build |
|
| Release | Forge | Status | Build |
|
||||||
|:--------------------:|:-------:|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|:--------------------:|:-------:|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
| Trials (1.20-1.20.1) | 47.1.0 | ACTIVE | [![1.19.4 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) |
|
| Trials (1.20-1.20.1) | 47.2.0 | ACTIVE | [![1.19.4 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) |
|
||||||
| Executions (1.19.4) | 45.1.0 | LTS | [![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) |
|
| Executions (1.19.4) | 45.1.0 | LTS | [![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) |
|
||||||
| 1.18.x | 40.1.80 | LTS | [![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) |
|
| 1.18.x | 40.1.80 | LTS | [![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) |
|
||||||
| 1.16.x | 36.2.39 | LTS | [![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) |
|
| 1.16.x | 36.2.39 | LTS | [![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) |
|
||||||
|
|
|
@ -759,16 +759,20 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB
|
||||||
switch (packetplayinblockdig_enumplayerdigtype) {
|
switch (packetplayinblockdig_enumplayerdigtype) {
|
||||||
case SWAP_ITEM_WITH_OFFHAND: {
|
case SWAP_ITEM_WITH_OFFHAND: {
|
||||||
if (!this.player.isSpectator()) {
|
if (!this.player.isSpectator()) {
|
||||||
ItemStack itemstack = this.player.getItemInHand(InteractionHand.OFF_HAND);
|
// ItemStack itemstack = this.player.getItemInHand(InteractionHand.OFF_HAND);
|
||||||
|
var event = net.minecraftforge.common.ForgeHooks.onLivingSwapHandItems(this.player);
|
||||||
|
if (event.isCanceled()) return;
|
||||||
|
ItemStack itemstack = event.getItemSwappedToMainHand();
|
||||||
|
ItemStack originMainHand = event.getItemSwappedToOffHand();
|
||||||
CraftItemStack mainHand = CraftItemStack.asCraftMirror(itemstack);
|
CraftItemStack mainHand = CraftItemStack.asCraftMirror(itemstack);
|
||||||
CraftItemStack offHand = CraftItemStack.asCraftMirror(this.player.getItemInHand(InteractionHand.MAIN_HAND));
|
CraftItemStack offHand = CraftItemStack.asCraftMirror(originMainHand);
|
||||||
PlayerSwapHandItemsEvent swapItemsEvent = new PlayerSwapHandItemsEvent(this.getCraftPlayer(), mainHand.clone(), offHand.clone());
|
PlayerSwapHandItemsEvent swapItemsEvent = new PlayerSwapHandItemsEvent(this.getCraftPlayer(), mainHand.clone(), offHand.clone());
|
||||||
this.cserver.getPluginManager().callEvent(swapItemsEvent);
|
this.cserver.getPluginManager().callEvent(swapItemsEvent);
|
||||||
if (swapItemsEvent.isCancelled()) {
|
if (swapItemsEvent.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (swapItemsEvent.getOffHandItem().equals(offHand)) {
|
if (swapItemsEvent.getOffHandItem().equals(offHand)) {
|
||||||
this.player.setItemInHand(InteractionHand.OFF_HAND, this.player.getItemInHand(InteractionHand.MAIN_HAND));
|
this.player.setItemInHand(InteractionHand.OFF_HAND, originMainHand);
|
||||||
} else {
|
} else {
|
||||||
this.player.setItemInHand(InteractionHand.OFF_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getOffHandItem()));
|
this.player.setItemInHand(InteractionHand.OFF_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getOffHandItem()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public abstract class ServerPlayerGameModeMixin implements PlayerInteractionMana
|
||||||
if (!this.level.hasChunkAt(blockPos)) {
|
if (!this.level.hasChunkAt(blockPos)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock forgeEvent = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(player, blockPos, direction);
|
net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock forgeEvent = net.minecraftforge.common.ForgeHooks.onLeftClickBlock(player, blockPos, direction, action);
|
||||||
if (forgeEvent.isCanceled() || (!this.isCreative() && forgeEvent.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY)) { // Restore block and te data
|
if (forgeEvent.isCanceled() || (!this.isCreative() && forgeEvent.getUseItem() == net.minecraftforge.eventbus.api.Event.Result.DENY)) { // Restore block and te data
|
||||||
level.sendBlockUpdated(blockPos, level.getBlockState(blockPos), level.getBlockState(blockPos), 3);
|
level.sendBlockUpdated(blockPos, level.getBlockState(blockPos), level.getBlockState(blockPos), 3);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -414,7 +414,7 @@ public abstract class EntityMixin implements InternalEntityBridge, EntityBridge,
|
||||||
if ((Object) this instanceof ServerPlayer) this.handleNetherPortal();// CraftBukkit - // Moved up to postTick
|
if ((Object) this instanceof ServerPlayer) this.handleNetherPortal();// CraftBukkit - // Moved up to postTick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(method = "updateFluidHeightAndDoFluidPushing()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/material/FluidState;getFlow(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/phys/Vec3;"))
|
@Redirect(method = "updateFluidHeightAndDoFluidPushing(Ljava/util/function/Predicate;)V", remap = false, at = @At(value = "INVOKE", remap = true, target = "Lnet/minecraft/world/level/material/FluidState;getFlow(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/phys/Vec3;"))
|
||||||
private Vec3 arclight$setLava(FluidState instance, BlockGetter level, BlockPos pos) {
|
private Vec3 arclight$setLava(FluidState instance, BlockGetter level, BlockPos pos) {
|
||||||
if (instance.getType().is(FluidTags.LAVA)) {
|
if (instance.getType().is(FluidTags.LAVA)) {
|
||||||
lastLavaContact = pos.immutable();
|
lastLavaContact = pos.immutable();
|
||||||
|
|
|
@ -14,7 +14,7 @@ allprojects {
|
||||||
ext {
|
ext {
|
||||||
agpVersion = '1.23'
|
agpVersion = '1.23'
|
||||||
minecraftVersion = '1.20.1'
|
minecraftVersion = '1.20.1'
|
||||||
forgeVersion = '47.1.1'
|
forgeVersion = '47.2.0'
|
||||||
apiVersion = '1.5.4'
|
apiVersion = '1.5.4'
|
||||||
toolsVersion = '1.3.0'
|
toolsVersion = '1.3.0'
|
||||||
mixinVersion = '0.8.5'
|
mixinVersion = '0.8.5'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user