mappings
This commit is contained in:
1 parent
583e023eb1
commit
1fcd8ceffa
11 files changed
+24
-25
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
# check these on https://fabricmc.net/use
|
||||
# or better: https://modmuss50.me/fabric.html
|
||||
minecraft_version=20w11a
|
||||
yarn_mappings=20w11a+build.6
|
||||
yarn_mappings=20w11a+build.17
|
||||
loader_version=0.7.8+build.187
|
||||
|
||||
# Mod Properties
|
||||
|
||||
@@ -10,7 +10,7 @@ public abstract class DummyEnchantments
|
||||
{
|
||||
protected Dummies()
|
||||
{
|
||||
super(Weight.COMMON, EnchantmentTarget.ALL, new EquipmentSlot[]{EquipmentSlot.MAINHAND});
|
||||
super(Rarity.COMMON, EnchantmentTarget.ALL, new EquipmentSlot[]{EquipmentSlot.MAINHAND});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ public class EntityPlayerActionPack
|
||||
{
|
||||
if (action.limit == 1)
|
||||
{
|
||||
if (player.method_24828()) player.jump(); // onGround
|
||||
if (player.isOnGround()) player.jump(); // onGround
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package carpet.mixins;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
import net.minecraft.server.world.ChunkTicket;
|
||||
import net.minecraft.server.world.ChunkTicketManager;
|
||||
import net.minecraft.util.SortedArraySet;
|
||||
import net.minecraft.util.collection.SortedArraySet;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
|
||||
@@ -30,14 +30,14 @@ public abstract class MinecraftServer_scarpetMixin extends ReentrantThreadExecut
|
||||
|
||||
@Shadow private long timeReference;
|
||||
|
||||
@Shadow private long field_4557;
|
||||
@Shadow private long lastTimeReference;
|
||||
|
||||
@Shadow public abstract boolean runTask();
|
||||
|
||||
@Override
|
||||
public void forceTick(BooleanSupplier isAhead)
|
||||
{
|
||||
timeReference = field_4557 = Util.getMeasuringTimeMs();
|
||||
timeReference = lastTimeReference = Util.getMeasuringTimeMs();
|
||||
tick(isAhead);
|
||||
runTask();
|
||||
}
|
||||
|
||||
@@ -26,12 +26,8 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow private long timeReference;
|
||||
|
||||
@Shadow private long field_4557;
|
||||
|
||||
@Shadow @Final private static Logger LOGGER;
|
||||
|
||||
//@Shadow private boolean profilerStartQueued;
|
||||
|
||||
@Shadow @Final private Profiler profiler;
|
||||
|
||||
public MinecraftServer_tickspeedMixin(String name)
|
||||
@@ -43,8 +39,6 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow protected abstract boolean shouldKeepTicking();
|
||||
|
||||
@Shadow private boolean field_19249;
|
||||
|
||||
@Shadow private long field_19248;
|
||||
|
||||
@Shadow protected abstract void method_16208();
|
||||
@@ -53,6 +47,10 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
|
||||
@Shadow protected abstract void startMonitor(TickDurationMonitor monitor);
|
||||
|
||||
@Shadow private long lastTimeReference;
|
||||
|
||||
@Shadow private boolean waitingForNextTick;
|
||||
|
||||
CarpetProfiler.ProfilerToken currentSection;
|
||||
|
||||
private float carpetMsptAccum = 0.0f;
|
||||
@@ -88,7 +86,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
if (TickSpeed.time_warp_start_time != 0 && TickSpeed.continueWarp())
|
||||
{
|
||||
//making sure server won't flop after the warp or if the warp is interrupted
|
||||
this.timeReference = this.field_4557 = Util.getMeasuringTimeMs();
|
||||
this.timeReference = this.lastTimeReference = Util.getMeasuringTimeMs();
|
||||
carpetMsptAccum = TickSpeed.mspt;
|
||||
}
|
||||
else
|
||||
@@ -106,12 +104,12 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
}
|
||||
//end tick deciding
|
||||
//smoothed out delay to include mcpt component. With 50L gives defaults.
|
||||
if (long_1 > /*2000L*/1000L+20*TickSpeed.mspt && this.timeReference - this.field_4557 >= /*15000L*/10000L+100*TickSpeed.mspt)
|
||||
if (long_1 > /*2000L*/1000L+20*TickSpeed.mspt && this.timeReference - this.lastTimeReference >= /*15000L*/10000L+100*TickSpeed.mspt)
|
||||
{
|
||||
long long_2 = (long)(long_1 / TickSpeed.mspt);//50L;
|
||||
LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", long_1, long_2);
|
||||
this.timeReference += (long)(long_2 * TickSpeed.mspt);//50L;
|
||||
this.field_4557 = this.timeReference;
|
||||
this.lastTimeReference = this.timeReference;
|
||||
}
|
||||
|
||||
this.timeReference += msThisTick;//50L;
|
||||
@@ -121,7 +119,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
this.profiler.push("tick");
|
||||
this.tick(TickSpeed.time_warp_start_time != 0 ? ()->true : this::shouldKeepTicking);
|
||||
this.profiler.swap("nextTickWait");
|
||||
this.field_19249 = true;
|
||||
this.waitingForNextTick = true;
|
||||
this.field_19248 = Math.max(Util.getMeasuringTimeMs() + /*50L*/ msThisTick, this.timeReference);
|
||||
if (TickSpeed.time_warp_start_time != 0)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.GlobalPos;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Timestamp;
|
||||
import net.minecraft.util.dynamic.Timestamp;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.poi.PointOfInterest;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import net.minecraft.util.WeightedPicker;
|
||||
import net.minecraft.util.collection.WeightedPicker;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
import net.minecraft.block.BarrierBlock;
|
||||
import net.minecraft.block.BedrockBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPlacementEnvironment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.CommandBlock;
|
||||
import net.minecraft.block.JigsawBlock;
|
||||
@@ -46,6 +45,7 @@ import net.minecraft.block.StructureBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.FallingBlockEntity;
|
||||
import net.minecraft.entity.ai.pathing.NavigationType;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -91,7 +91,7 @@ import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.Clearable;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.InvalidIdentifierException;
|
||||
import net.minecraft.util.SortedArraySet;
|
||||
import net.minecraft.util.collection.SortedArraySet;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
@@ -1003,7 +1003,7 @@ public class CarpetExpression
|
||||
|
||||
this.expr.addLazyFunction("blocks_movement", -1, (c, t, lv) ->
|
||||
booleanStateTest(c, "blocks_movement", lv, (s, p) ->
|
||||
!s.canPlaceAtSide(((CarpetContext) c).s.getWorld(), p, BlockPlacementEnvironment.LAND)));
|
||||
!s.canPathfindThrough (((CarpetContext) c).s.getWorld(), p, NavigationType.LAND)));
|
||||
|
||||
this.expr.addLazyFunction("block_sound", -1, (c, t, lv) ->
|
||||
stateStringQuery(c, "block_sound", lv, (s, p) ->
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.SpawnType;
|
||||
import net.minecraft.entity.ai.TargetFinder;
|
||||
import net.minecraft.entity.ai.goal.WanderAroundGoal;
|
||||
import net.minecraft.entity.ai.pathing.NavigationType;
|
||||
import net.minecraft.entity.mob.MobEntityWithAi;
|
||||
import net.minecraft.entity.mob.ZombifiedPiglinEntity;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
@@ -198,9 +199,9 @@ public class BlockInfo
|
||||
//lst.add(Messenger.s(String.format(" - Picks neighbour light value: %s", state.useNeighborBrightness(world, pos))));
|
||||
lst.add(Messenger.s(""));
|
||||
lst.add(Messenger.s(String.format(" - Causes suffocation: %s", state.canSuffocate(world, pos))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement on land: %s", !state.canPlaceAtSide(world,pos, BlockPlacementEnvironment.LAND))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement in air: %s", !state.canPlaceAtSide(world,pos, BlockPlacementEnvironment.AIR))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement in liquids: %s", !state.canPlaceAtSide(world,pos, BlockPlacementEnvironment.WATER))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement on land: %s", !state.canPathfindThrough(world,pos, NavigationType.LAND))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement in air: %s", !state.canPathfindThrough(world,pos, NavigationType.AIR))));
|
||||
lst.add(Messenger.s(String.format(" - Blocks movement in liquids: %s", !state.canPathfindThrough(world,pos, NavigationType.WATER))));
|
||||
lst.add(Messenger.s(String.format(" - Can burn: %s", material.isBurnable())));
|
||||
lst.add(Messenger.s(String.format(" - Requires a tool: %s", !material.isReplaceable()))); //?maybe
|
||||
lst.add(Messenger.s(String.format(" - Hardness: %.2f", state.getHardness(world, pos))));
|
||||
|
||||
@@ -47,7 +47,7 @@ public class EntityInfo
|
||||
if (item.hasEnchantments())
|
||||
{
|
||||
stackname += " ( ";
|
||||
Map<Enchantment, Integer> enchants = EnchantmentHelper.getEnchantments(item);
|
||||
Map<Enchantment, Integer> enchants = EnchantmentHelper.get(item);
|
||||
for (Enchantment e: enchants.keySet())
|
||||
{
|
||||
int level = enchants.get(e);
|
||||
|
||||
Reference in new issue
Block a user