Another round of minor changes
This commit is contained in:
parent
32f9bf288e
commit
8555931932
6 changed files with 29 additions and 94 deletions
101
Convert.java
101
Convert.java
|
@ -12,7 +12,14 @@ class ModelPart {
|
|||
|
||||
boolean hadBox = false;
|
||||
ModelPart(Convert c, String name){
|
||||
this(c, 0, 0, name);
|
||||
|
||||
}
|
||||
|
||||
ModelPart(Convert c, int u, int v, String name){
|
||||
this.name = name;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
parts.add(this);
|
||||
}
|
||||
|
||||
|
@ -83,10 +90,18 @@ class ModelPart {
|
|||
}
|
||||
|
||||
public static void print(){
|
||||
System.out.println("public static LayerDefinition getTexturedModelData() {");
|
||||
System.out.println(" MeshDefinition modelData = new MeshDefinition();");
|
||||
System.out.println(" PartDefinition modelPartData = modelData.getRoot();");
|
||||
for(ModelPart p : parts){
|
||||
System.out.println(p);
|
||||
System.out.println();
|
||||
}
|
||||
System.out.println("return LayerDefinition.create(modelData, 48, 48);");
|
||||
System.out.println("}");
|
||||
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
|
||||
for(ModelPart p : parts){
|
||||
String pName = p.parent==null?"modelPart":p.parent.name;
|
||||
|
@ -104,86 +119,10 @@ public class Convert {
|
|||
p.setRotationAngle(x, y, z);
|
||||
}
|
||||
public void c (){
|
||||
ModelPart legsL = new ModelPart(this, "legsL");
|
||||
legsL.setPos(1.5F, 19.9F, -0.45F);
|
||||
setRotationAngle(legsL, 0.0F, 0.0F, 0.6981F);
|
||||
|
||||
ModelPart cube_r1 = new ModelPart(this, "cube_r1");
|
||||
cube_r1.setPos(0.0F, 0.0F, -1.0F);
|
||||
legsL.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 0.2182F, 0.3927F);
|
||||
cube_r1.texOffs(0, 13).addBox(0.0216F, 0.0F, -0.5976F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart cube_r2 = new ModelPart(this, "cube_r2");
|
||||
cube_r2.setPos(0.5F, 0.1F, -0.05F);
|
||||
legsL.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.0F, 0.3927F);
|
||||
cube_r2.texOffs(0, 15).addBox(0.0F, 0.0F, -0.6F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart cube_r3 = new ModelPart(this, "cube_r3");
|
||||
cube_r3.setPos(0.0F, 0.0F, 0.9F);
|
||||
legsL.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, -0.2182F, 0.3927F);
|
||||
cube_r3.texOffs(0, 14).addBox(0.0F, 0.0F, -0.5F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart legsR = new ModelPart(this,"legsR");
|
||||
legsR.setPos(-1.5F, 19.9F, -0.55F);
|
||||
setRotationAngle(legsR, 0.0F, 3.1416F, -0.6545F);
|
||||
|
||||
ModelPart cube_r4 = new ModelPart(this, "cube_r4");
|
||||
cube_r4.setPos(0.0F, 0.0F, -1.0F);
|
||||
legsR.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 0.2182F, 0.3927F);
|
||||
cube_r4.texOffs(0, 10).addBox(0.0F, 0.0F, -0.5F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart cube_r5 = new ModelPart(this, "cube_r5");
|
||||
cube_r5.setPos(0.5F, 0.1F, -0.05F);
|
||||
legsR.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, 0.0F, 0.0F, 0.3927F);
|
||||
cube_r5.texOffs(0, 11).addBox(0.0F, 0.0F, -0.4F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart cube_r6 = new ModelPart(this, "cube_r6");
|
||||
cube_r6.setPos(0.0F, 0.0F, 0.9F);
|
||||
legsR.addChild(cube_r6);
|
||||
setRotationAngle(cube_r6, 0.0F, -0.2182F, 0.3927F);
|
||||
cube_r6.texOffs(0, 12).addBox(0.0216F, 0.0F, -0.4024F, 3.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
ModelPart head_pivot = new ModelPart(this, "head_pivot");
|
||||
head_pivot.setPos(0.0F, 18.0F, -3.0F);
|
||||
head_pivot.texOffs(15, 10).addBox(-1.5F, -1.5F, -2.0F, 3.0F, 3.0F, 3.0F, 0.0F);
|
||||
|
||||
ModelPart tendril_r_r1 = new ModelPart(this, "tendril_r_r1");
|
||||
tendril_r_r1.setPos(1.0F, -1.15F, -1.0F);
|
||||
head_pivot.addChild(tendril_r_r1);
|
||||
setRotationAngle(tendril_r_r1, 0.0F, 0.0F, 0.3927F);
|
||||
tendril_r_r1.texOffs(23, 0).addBox(-1.5F, -5.0F, 0.0F, 3.0F, 5.0F, 0.0F, 0.0F, true);
|
||||
|
||||
ModelPart tendril_r_r2 = new ModelPart(this, "tendril_r_r2");
|
||||
tendril_r_r2.setPos(-1.0F, -1.15F, -1.0F);
|
||||
head_pivot.addChild(tendril_r_r2);
|
||||
setRotationAngle(tendril_r_r2, 0.0F, 0.0F, -0.3927F);
|
||||
tendril_r_r2.texOffs(23, 0).addBox(-1.5F, -5.0F, 0.0F, 3.0F, 5.0F, 0.0F, 0.0F);
|
||||
|
||||
ModelPart bb_main = new ModelPart(this, "bb_main");
|
||||
bb_main.setPos(0.0F, 24.0F, 0.0F);
|
||||
bb_main.texOffs(19, 19).addBox(-2.5F, -8.5F, -3.0F, 5.0F, 5.0F, 3.0F, 0.0F);
|
||||
|
||||
ModelPart wingR_r1 = new ModelPart(this, "wingR_r1");
|
||||
wingR_r1.setPos(-1.5F, -6.5F, 0.5F);
|
||||
bb_main.addChild(wingR_r1);
|
||||
setRotationAngle(wingR_r1, 0.0F, 0.0F, 0.3927F);
|
||||
wingR_r1.texOffs(0, 5).addBox(-7.0F, 0.0F, -3.0F, 9.0F, 0.0F, 5.0F, 0.0F, true);
|
||||
|
||||
ModelPart wingL_r1 = new ModelPart(this, "wingL_r1");
|
||||
wingL_r1.setPos(1.5F, -6.5F, 0.5F);
|
||||
bb_main.addChild(wingL_r1);
|
||||
setRotationAngle(wingL_r1, 0.0F, 0.0F, -0.3927F);
|
||||
wingL_r1.texOffs(0, 5).addBox(-2.0F, 0.0F, -3.0F, 9.0F, 0.0F, 5.0F, 0.0F);
|
||||
|
||||
ModelPart abdomen_r1 = new ModelPart(this, "abdomen_r1");
|
||||
abdomen_r1.setPos(1.0F, -3.9F, 0.0F);
|
||||
bb_main.addChild(abdomen_r1);
|
||||
setRotationAngle(abdomen_r1, -0.3927F, 0.0F, 0.0F);
|
||||
abdomen_r1.texOffs(0, 10).addBox(-3.0F, -4.0F, -1.0F, 4.0F, 4.0F, 7.0F, 0.0F);
|
||||
ModelPart leftWing = new ModelPart(this, 22, 0, "leftWing");
|
||||
leftWing.addBox(-10.0F, 0.0F, 0.0F, 10.0F, 20.0F, 2.0F, 1.0F);
|
||||
ModelPart rightWing = new ModelPart(this, 22, 0, "rightWing");
|
||||
rightWing.mirror = true;
|
||||
rightWing.addBox(0.0F, 0.0F, 0.0F, 10.0F, 20.0F, 2.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MengerSpongeBlock extends BaseBlockNotFull implements IRenderTyped
|
|||
FluidState fluidState = world.getFluidState(blockPos2);
|
||||
Material material = blockState.getMaterial();
|
||||
if (fluidState.is(FluidTags.WATER)) {
|
||||
if (blockState.getBlock() instanceof BucketPickup && ((BucketPickup) blockState.getBlock()).takeLiquid(world, blockPos2, blockState) != Fluids.EMPTY) {
|
||||
if (blockState.getBlock() instanceof BucketPickup && !((BucketPickup) blockState.getBlock()).pickupBlock(world, blockPos2, blockState).isEmpty()) {
|
||||
++i;
|
||||
if (j < 6) {
|
||||
queue.add(new Tuple<>(blockPos2, j + 1));
|
||||
|
@ -73,7 +73,7 @@ public class MengerSpongeBlock extends BaseBlockNotFull implements IRenderTyped
|
|||
queue.add(new Tuple<>(blockPos2, j + 1));
|
||||
}
|
||||
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
BlockEntity blockEntity = blockState.getBlock().isEntityBlock() ? world.getBlockEntity(blockPos2) : null;
|
||||
BlockEntity blockEntity = blockState.hasBlockEntity() ? world.getBlockEntity(blockPos2) : null;
|
||||
dropResources(blockState, world, blockPos2, blockEntity);
|
||||
world.setBlock(blockPos2, Blocks.AIR.defaultBlockState(), 3);
|
||||
++i;
|
||||
|
|
|
@ -28,10 +28,6 @@ public class PedestalBlockEntity extends BlockEntity implements Container, Block
|
|||
super(blockEntityType, blockPos, blockState);
|
||||
}
|
||||
|
||||
public PedestalBlockEntity(BlockEntityType<?> type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public abstract class AnvilMenuMixin extends ItemCombinerMenu implements AnvilSc
|
|||
slotsChanged(inputSlots);
|
||||
access.execute((world, blockPos) -> {
|
||||
BlockState anvilState = world.getBlockState(blockPos);
|
||||
if (!player.abilities.instabuild && anvilState.is(BlockTags.ANVIL) && player.getRandom().nextDouble() < 0.1) {
|
||||
if (!player.getAbilities().instabuild && anvilState.is(BlockTags.ANVIL) && player.getRandom().nextDouble() < 0.1) {
|
||||
BlockState landingState = EndAnvilBlock.applyDamage(anvilState);
|
||||
if (landingState == null) {
|
||||
world.removeBlock(blockPos, false);
|
||||
|
|
|
@ -69,7 +69,7 @@ public abstract class ServerPlayerMixin extends Player implements TeleportingEnt
|
|||
@Inject(method = "findDimensionEntryPoint", at = @At("HEAD"), cancellable = true)
|
||||
protected void be_getTeleportTarget(ServerLevel destination, CallbackInfoReturnable<PortalInfo> info) {
|
||||
if (be_canTeleport()) {
|
||||
info.setReturnValue(new PortalInfo(new Vec3(exitPos.getX() + 0.5, exitPos.getY(), exitPos.getZ() + 0.5), getDeltaMovement(), yRot, xRot));
|
||||
info.setReturnValue(new PortalInfo(new Vec3(exitPos.getX() + 0.5, exitPos.getY(), exitPos.getZ() + 0.5), getDeltaMovement(), getYRot(), getXRot()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,21 +85,21 @@ public abstract class ServerPlayerMixin extends Player implements TeleportingEnt
|
|||
connection.send(new ClientboundChangeDifficultyPacket(worldProperties.getDifficulty(), worldProperties.isDifficultyLocked()));
|
||||
PlayerList playerManager = server.getPlayerList();
|
||||
playerManager.sendPlayerPermissionLevel(player);
|
||||
serverWorld.removePlayerImmediately(player);
|
||||
removed = false;
|
||||
serverWorld.removePlayerImmediately(player, RemovalReason.CHANGED_DIMENSION);
|
||||
unsetRemoved();
|
||||
PortalInfo teleportTarget = findDimensionEntryPoint(destination);
|
||||
if (teleportTarget != null) {
|
||||
serverWorld.getProfiler().push("moving");
|
||||
serverWorld.getProfiler().pop();
|
||||
serverWorld.getProfiler().push("placing");
|
||||
setLevel(destination);
|
||||
this.level = destination;
|
||||
destination.addDuringPortalTeleport(player);
|
||||
setRot(teleportTarget.yRot, teleportTarget.xRot);
|
||||
moveTo(teleportTarget.pos.x, teleportTarget.pos.y, teleportTarget.pos.z);
|
||||
serverWorld.getProfiler().pop();
|
||||
triggerDimensionChangeTriggers(serverWorld);
|
||||
gameMode.setLevel(destination);
|
||||
connection.send(new ClientboundPlayerAbilitiesPacket(abilities));
|
||||
connection.send(new ClientboundPlayerAbilitiesPacket(getAbilities()));
|
||||
playerManager.sendLevelInfo(player, destination);
|
||||
playerManager.sendAllPlayerInfo(player);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ package ru.betterend.noise;
|
|||
* will be the same when ported to other languages.
|
||||
*/
|
||||
|
||||
public class OpenSimplexNoise {
|
||||
public final class OpenSimplexNoise {
|
||||
private static final double STRETCH_CONSTANT_2D = -0.211324865405187; // (1/Math.sqrt(2+1)-1)/2;
|
||||
private static final double SQUISH_CONSTANT_2D = 0.366025403784439; // (Math.sqrt(2+1)-1)/2;
|
||||
private static final double STRETCH_CONSTANT_3D = -1.0 / 6; // (1/Math.sqrt(3+1)-1)/3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue