23w06a
This commit is contained in:
1 parent
277872b33c
commit
41e33503fb
9 files changed
+20
-20
No files matched your search
@@ -171,8 +171,8 @@ Available shapes:
|
|||||||
* `tilt`, `lean`, `turn` - additional rotations along all three axis. for `block`, it use its block center as the origin.
|
* `tilt`, `lean`, `turn` - additional rotations along all three axis. for `block`, it use its block center as the origin.
|
||||||
* `scale` - scale of it in 3 axis-direction. should be a number or a list of 3 numbers (x,y,z).
|
* `scale` - scale of it in 3 axis-direction. should be a number or a list of 3 numbers (x,y,z).
|
||||||
* `skylight`, `blocklight` - light level. omit it to use local light level. should between 0~15.
|
* `skylight`, `blocklight` - light level. omit it to use local light level. should between 0~15.
|
||||||
* `variant` - one of `'none'`, `'third_person_left_hand'`, `'third_person_right_hand'`, `'first_person_left_hand'`,
|
* `variant` - one of `'none'`, `'thirdperson_lefthand'`, `'thirdperson_righthand'`, `'firstperson_lefthand'`,
|
||||||
`'first_person_right_hand'`, `'head'`, `'gui'`, `'ground'`, `'fixed'`. In addition to the literal meaning,
|
`'firstperson_righthand'`, `'head'`, `'gui'`, `'ground'`, `'fixed'`. In addition to the literal meaning,
|
||||||
it can also be used to use special models of tridents and telescopes.
|
it can also be used to use special models of tridents and telescopes.
|
||||||
This attribute is experimental and use of it will change in the future.
|
This attribute is experimental and use of it will change in the future.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=23w05a
|
minecraft_version=23w06a
|
||||||
loader_version=0.14.13
|
loader_version=0.14.14
|
||||||
jsr305_version=3.0.2
|
jsr305_version=3.0.2
|
||||||
fabric_version=0.73.3+1.19.4
|
fabric_version=0.73.5+1.19.4
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.96
|
mod_version = 1.4.96
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EntitySelector;
|
import net.minecraft.world.entity.EntitySelector;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
@@ -62,7 +61,7 @@ public abstract class LivingEntity_maxCollisionsMixin extends Entity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (candidates > maxEntityCramming - 1) {
|
if (candidates > maxEntityCramming - 1) {
|
||||||
this.hurt(DamageSource.CRAMMING, 6.0F);
|
this.hurt(damageSources().cramming(), 6.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CarpetSettings.maxEntityCollisions > 0 && entities.size() > CarpetSettings.maxEntityCollisions)
|
if (CarpetSettings.maxEntityCollisions > 0 && entities.size() > CarpetSettings.maxEntityCollisions)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public abstract class LivingEntity_scarpetEventsMixin extends Entity implements
|
|||||||
@Inject(method = "die", at = @At("HEAD"))
|
@Inject(method = "die", at = @At("HEAD"))
|
||||||
private void onDeathCall(DamageSource damageSource_1, CallbackInfo ci)
|
private void onDeathCall(DamageSource damageSource_1, CallbackInfo ci)
|
||||||
{
|
{
|
||||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, damageSource_1.msgId);
|
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, damageSource_1.getMsgId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "actuallyHurt", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
@Inject(method = "actuallyHurt", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package carpet.mixins;
|
|||||||
import carpet.fakes.ServerWorldInterface;
|
import carpet.fakes.ServerWorldInterface;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.RegistryAccess;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.util.profiling.ProfilerFiller;
|
import net.minecraft.util.profiling.ProfilerFiller;
|
||||||
@@ -40,8 +41,9 @@ import static carpet.script.CarpetEventServer.Event.CHUNK_UNLOADED;
|
|||||||
@Mixin(ServerLevel.class)
|
@Mixin(ServerLevel.class)
|
||||||
public abstract class ServerLevel_scarpetMixin extends Level implements ServerWorldInterface
|
public abstract class ServerLevel_scarpetMixin extends Level implements ServerWorldInterface
|
||||||
{
|
{
|
||||||
protected ServerLevel_scarpetMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i) {
|
protected ServerLevel_scarpetMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, RegistryAccess registryAccess, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i)
|
||||||
super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i);
|
{
|
||||||
|
super(writableLevelData, resourceKey, registryAccess, holder, supplier, bl, bl2, l, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "tickChunk", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
@Inject(method = "tickChunk", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package carpet.mixins;
|
|||||||
import carpet.helpers.TickSpeed;
|
import carpet.helpers.TickSpeed;
|
||||||
import carpet.utils.CarpetProfiler;
|
import carpet.utils.CarpetProfiler;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.RegistryAccess;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -24,11 +25,9 @@ import net.minecraft.world.level.storage.WritableLevelData;
|
|||||||
@Mixin(ServerLevel.class)
|
@Mixin(ServerLevel.class)
|
||||||
public abstract class ServerLevel_tickMixin extends Level
|
public abstract class ServerLevel_tickMixin extends Level
|
||||||
{
|
{
|
||||||
|
protected ServerLevel_tickMixin(final WritableLevelData writableLevelData, final ResourceKey<Level> resourceKey, final RegistryAccess registryAccess, final Holder<DimensionType> holder, final Supplier<ProfilerFiller> supplier, final boolean bl, final boolean bl2, final long l, final int i)
|
||||||
|
|
||||||
protected ServerLevel_tickMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i)
|
|
||||||
{
|
{
|
||||||
super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i);
|
super(writableLevelData, resourceKey, registryAccess, holder, supplier, bl, bl2, l, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Shadow protected abstract void runBlockEvents();
|
@Shadow protected abstract void runBlockEvents();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S
|
|||||||
super(level, blockPos, f, gameProfile);
|
super(level, blockPos, f, gameProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Shadow protected abstract void completeUsingItem();
|
//@Shadow protected abstract void completeUsingItem();
|
||||||
|
|
||||||
@Shadow public boolean wonGame;
|
@Shadow public boolean wonGame;
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S
|
|||||||
@Inject(method = "die", at = @At("HEAD"))
|
@Inject(method = "die", at = @At("HEAD"))
|
||||||
private void onDeathEvent(DamageSource source, CallbackInfo ci)
|
private void onDeathEvent(DamageSource source, CallbackInfo ci)
|
||||||
{
|
{
|
||||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, source.msgId);
|
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, source.getMsgId());
|
||||||
if (PLAYER_DIES.isNeeded())
|
if (PLAYER_DIES.isNeeded())
|
||||||
{
|
{
|
||||||
PLAYER_DIES.onPlayerEvent((ServerPlayer) (Object)this);
|
PLAYER_DIES.onPlayerEvent((ServerPlayer) (Object)this);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||||||
@Mixin(SummonCommand.class)
|
@Mixin(SummonCommand.class)
|
||||||
public class SummonCommand_lightningMixin
|
public class SummonCommand_lightningMixin
|
||||||
{
|
{
|
||||||
@Redirect(method = "spawnEntity", at = @At(
|
@Redirect(method = "createEntity", at = @At(
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
target = "Lnet/minecraft/world/entity/Entity;blockPosition()Lnet/minecraft/core/BlockPos;"
|
target = "Lnet/minecraft/world/entity/Entity;blockPosition()Lnet/minecraft/core/BlockPos;"
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import net.minecraft.client.renderer.LightTexture;
|
|||||||
import net.minecraft.client.renderer.MultiBufferSource;
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.client.renderer.Sheets;
|
import net.minecraft.client.renderer.Sheets;
|
||||||
import net.minecraft.client.renderer.block.model.ItemTransforms;
|
|
||||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
import net.minecraft.client.resources.model.Material;
|
import net.minecraft.client.resources.model.Material;
|
||||||
@@ -44,6 +43,7 @@ import net.minecraft.nbt.ListTag;
|
|||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.item.DyeColor;
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.LightLayer;
|
import net.minecraft.world.level.LightLayer;
|
||||||
import net.minecraft.world.level.block.EntityBlock;
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
@@ -287,7 +287,7 @@ public class ShapesRenderer
|
|||||||
{
|
{
|
||||||
|
|
||||||
private final boolean isitem;
|
private final boolean isitem;
|
||||||
private ItemTransforms.TransformType transformType = ItemTransforms.TransformType.NONE;
|
private ItemDisplayContext transformType = ItemDisplayContext.NONE;
|
||||||
|
|
||||||
private BlockPos blockPos;
|
private BlockPos blockPos;
|
||||||
private BlockState blockState;
|
private BlockState blockState;
|
||||||
@@ -299,7 +299,7 @@ public class ShapesRenderer
|
|||||||
this.isitem = isitem;
|
this.isitem = isitem;
|
||||||
if (isitem)
|
if (isitem)
|
||||||
{
|
{
|
||||||
this.transformType = ItemTransforms.TransformType.valueOf(((ShapeDispatcher.DisplayedSprite) shape).itemTransformType.toUpperCase(Locale.ROOT));
|
this.transformType = ItemDisplayContext.valueOf(((ShapeDispatcher.DisplayedSprite) shape).itemTransformType.toUpperCase(Locale.ROOT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user