mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 17:43:40 +01:00
Finalization
- Make new config fields final - Do not add item cooldown if cooldown is less than or equal to 0 - Tweak rotation math for depots and billboard potato projectiles
This commit is contained in:
parent
63f3946309
commit
728fb256b7
4 changed files with 10 additions and 8 deletions
|
@ -33,9 +33,8 @@ public interface PotatoProjectileRenderMode {
|
||||||
.subtract(p1);
|
.subtract(p1);
|
||||||
|
|
||||||
MatrixTransformStack.of(ms)
|
MatrixTransformStack.of(ms)
|
||||||
.rotateY(AngleHelper.deg(MathHelper.atan2(diff.x, diff.z)))
|
.rotateY(AngleHelper.deg(MathHelper.atan2(diff.x, diff.z)) + 180)
|
||||||
.rotateX(180
|
.rotateX(AngleHelper.deg(MathHelper.atan2(diff.y, MathHelper.sqrt(diff.x * diff.x + diff.z * diff.z))));
|
||||||
+ AngleHelper.deg(MathHelper.atan2(diff.y, -MathHelper.sqrt(diff.x * diff.x + diff.z * diff.z))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@ public class ShootableGadgetItemMethods {
|
||||||
|
|
||||||
public static void applyCooldown(PlayerEntity player, ItemStack item, Hand hand, Predicate<ItemStack> predicate,
|
public static void applyCooldown(PlayerEntity player, ItemStack item, Hand hand, Predicate<ItemStack> predicate,
|
||||||
int cooldown) {
|
int cooldown) {
|
||||||
|
if (cooldown <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
boolean gunInOtherHand =
|
boolean gunInOtherHand =
|
||||||
predicate.test(player.getItemInHand(hand == Hand.MAIN_HAND ? Hand.OFF_HAND : Hand.MAIN_HAND));
|
predicate.test(player.getItemInHand(hand == Hand.MAIN_HAND ? Hand.OFF_HAND : Hand.MAIN_HAND));
|
||||||
player.getCooldowns()
|
player.getCooldowns()
|
||||||
|
|
|
@ -117,8 +117,8 @@ public class DepotRenderer extends SafeTileEntityRenderer<DepotTileEntity> {
|
||||||
Vector3d positionVec = renderViewEntity.position();
|
Vector3d positionVec = renderViewEntity.position();
|
||||||
Vector3d vectorForOffset = itemPosition;
|
Vector3d vectorForOffset = itemPosition;
|
||||||
Vector3d diff = vectorForOffset.subtract(positionVec);
|
Vector3d diff = vectorForOffset.subtract(positionVec);
|
||||||
float yRot = (float) -MathHelper.atan2(diff.z, diff.x);
|
float yRot = (float) (MathHelper.atan2(diff.x, diff.z) + Math.PI);
|
||||||
ms.mulPose(Vector3f.YP.rotation((float) (yRot - Math.PI / 2)));
|
ms.mulPose(Vector3f.YP.rotation(yRot));
|
||||||
}
|
}
|
||||||
ms.translate(0, 3 / 32d, -1 / 16f);
|
ms.translate(0, 3 / 32d, -1 / 16f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ public class CKinetics extends ConfigBase {
|
||||||
e(ContraptionMovementSetting.NO_PICKUP, "movableSpawners", Comments.spawnerMovement);
|
e(ContraptionMovementSetting.NO_PICKUP, "movableSpawners", Comments.spawnerMovement);
|
||||||
public final ConfigEnum<ContraptionMovementSetting> obsidianMovement =
|
public final ConfigEnum<ContraptionMovementSetting> obsidianMovement =
|
||||||
e(ContraptionMovementSetting.UNMOVABLE, "movableObsidian", Comments.obsidianMovement);
|
e(ContraptionMovementSetting.UNMOVABLE, "movableObsidian", Comments.obsidianMovement);
|
||||||
public ConfigBool moveItemsToStorage = b(true, "moveItemsToStorage", Comments.moveItemsToStorage);
|
public final ConfigBool moveItemsToStorage = b(true, "moveItemsToStorage", Comments.moveItemsToStorage);
|
||||||
public ConfigBool harvestPartiallyGrown = b(false, "harvestPartiallyGrown", Comments.harvestPartiallyGrown);
|
public final ConfigBool harvestPartiallyGrown = b(false, "harvestPartiallyGrown", Comments.harvestPartiallyGrown);
|
||||||
public ConfigBool harvesterReplants = b(true, "harvesterReplants", Comments.harvesterReplants);
|
public final ConfigBool harvesterReplants = b(true, "harvesterReplants", Comments.harvesterReplants);
|
||||||
|
|
||||||
public final CStress stressValues = nested(1, CStress::new, Comments.stress);
|
public final CStress stressValues = nested(1, CStress::new, Comments.stress);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue