mapping
This commit is contained in:
1 parent
af5aae24cb
commit
695d66da50
5 files changed
+34
-34
No files matched your search
@@ -1,12 +1,12 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.BiomeArrayInterface;
|
||||
import net.minecraft.class_5742;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeArray;
|
||||
import net.minecraft.world.biome.source.BiomeCoords;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
@@ -30,9 +30,9 @@ public class BiomeArray_getBiomeArrayMixin implements BiomeArrayInterface
|
||||
@Override
|
||||
public void setBiomeAtIndex(BlockPos pos, World world, Biome what)
|
||||
{
|
||||
int int_4 = class_5742.method_33100(pos.getX()) & HORIZONTAL_BIT_MASK;
|
||||
int int_5 = MathHelper.clamp(class_5742.method_33100(pos.getY())-field_28126, 0, field_28127);
|
||||
int int_6 = class_5742.method_33100(pos.getZ()) & HORIZONTAL_BIT_MASK;
|
||||
int int_4 = BiomeCoords.fromBlock(pos.getX()) & HORIZONTAL_BIT_MASK;
|
||||
int int_5 = MathHelper.clamp(BiomeCoords.fromBlock(pos.getY())-field_28126, 0, field_28127);
|
||||
int int_6 = BiomeCoords.fromBlock(pos.getZ()) & HORIZONTAL_BIT_MASK;
|
||||
data[(int_5 << (HORIZONTAL_SECTION_COUNT + HORIZONTAL_SECTION_COUNT)) | (int_6 << HORIZONTAL_SECTION_COUNT) | int_4] = what;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import carpet.CarpetSettings;
|
||||
import carpet.fakes.ServerWorldInterface;
|
||||
import carpet.script.CarpetEventServer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLike;
|
||||
import net.minecraft.world.entity.EntityLike;
|
||||
import net.minecraft.entity.LightningEntity;
|
||||
import net.minecraft.server.world.ServerEntityManager;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
@@ -43,7 +43,7 @@ public class ServerWorld_scarpetMixin implements ServerWorldInterface
|
||||
|
||||
@Redirect(method = "addEntity", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/entity/EntityLike;)Z"
|
||||
target = "Lnet/minecraft/server/world/ServerEntityManager;addEntity(Lnet/minecraft/world/entity/EntityLike;)Z"
|
||||
))
|
||||
private boolean onEntityAddedToWorld(ServerEntityManager serverEntityManager, EntityLike entityLike)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user