1.14.3 pre 4, added back profiling and removed double dispensing for blocks.
This commit is contained in:
1 parent
e4e4188dfc
commit
224468964b
6 files changed
+9
-32
No files matched your search
@@ -1,21 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.settings.CarpetSettings;
|
||||
import net.minecraft.block.dispenser.BlockPlacementDispenserBehavior;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(BlockPlacementDispenserBehavior.class)
|
||||
public class BlockPlacementDispenserBehaviourMixin
|
||||
{
|
||||
@Redirect(method = "dispenseSilently", at = @At(value="INVOKE", target="Lnet/minecraft/item/ItemStack;decrement(I)V"))
|
||||
private void cancleDoubleDecrement(ItemStack stack, int amount)
|
||||
{
|
||||
if (!CarpetSettings.stackableShulkerBoxes)
|
||||
{
|
||||
stack.decrement(amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public abstract class LivingEntity_maxCollisionsMixin extends Entity
|
||||
{
|
||||
List<Entity> list_1 = this.world.getEntities((Entity)this, this.getBoundingBox(), EntityPredicates.canBePushedBy(this));
|
||||
if (!list_1.isEmpty()) {
|
||||
int int_1 = this.world.getGameRules().getInteger(GameRules.MAX_ENTITY_CRAMMING);
|
||||
int int_1 = this.world.getGameRules().getInt(GameRules.MAX_ENTITY_CRAMMING);
|
||||
int int_2;
|
||||
if (int_1 > 0 && list_1.size() > int_1 - 1 && this.random.nextInt(4) == 0) {
|
||||
int_2 = 0;
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.function.BooleanSupplier;
|
||||
@Mixin(ServerChunkManager.class)
|
||||
public abstract class ServerChunkManager_tickMixin
|
||||
{
|
||||
/*
|
||||
|
||||
@Shadow @Final private ServerWorld world;
|
||||
|
||||
CarpetProfiler.ProfilerToken currentSection;
|
||||
@@ -66,7 +66,7 @@ public abstract class ServerChunkManager_tickMixin
|
||||
{
|
||||
CarpetProfiler.end_current_section(currentSection);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//// Tick freeze
|
||||
@Redirect(method = "tickChunks", at = @At(
|
||||
|
||||
@@ -174,8 +174,8 @@ public class EntityValue extends Value
|
||||
|
||||
put("invulnerable", (e, a) -> new NumericValue(e.isInvulnerable()));
|
||||
put("dimension", (e, a) -> new StringValue(e.dimension.toString().replaceFirst("minecraft:","")));
|
||||
put("height", (e, a) -> new NumericValue(e.getSize(EntityPose.STANDING).height));
|
||||
put("width", (e, a) -> new NumericValue(e.getSize(EntityPose.STANDING).width));
|
||||
put("height", (e, a) -> new NumericValue(e.getDimensions(EntityPose.STANDING).height));
|
||||
put("width", (e, a) -> new NumericValue(e.getDimensions(EntityPose.STANDING).width));
|
||||
put("eye_height", (e, a) -> new NumericValue(e.getEyeHeight(EntityPose.STANDING)));
|
||||
put("age", (e, a) -> new NumericValue(e.age));
|
||||
put("item", (e, a) -> (e instanceof ItemEntity)?new StringValue(((ItemEntity) e).getStack().getName().getString()):Value.NULL);
|
||||
|
||||
Reference in new issue
Block a user