mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-06 03:31:10 +00:00
Remove debugging, fix flying blocks
This commit is contained in:
parent
cc072e2464
commit
687b8b971f
2 changed files with 1 additions and 4 deletions
|
|
@ -91,9 +91,8 @@ function inject(serv,player)
|
||||||
var vec = Vec3(location.x, location.y, location.z);
|
var vec = Vec3(location.x, location.y, location.z);
|
||||||
var id = await player.world.getBlockType(vec);
|
var id = await player.world.getBlockType(vec);
|
||||||
var damage = await player.world.getBlockData(vec);
|
var damage = await player.world.getBlockData(vec);
|
||||||
console.log('meh',id,damage);
|
|
||||||
serv.spawnObject(2, player.world, vec.clone().add(Vec3(0.5, 0.5, 0.5)), {
|
serv.spawnObject(2, player.world, vec.clone().add(Vec3(0.5, 0.5, 0.5)), {
|
||||||
velocity: Vec3(Math.random()*4 - 2, Math.random()*2 + 2 + 20, Math.random()*4 - 2),
|
velocity: Vec3(Math.random()*4 - 2, Math.random()*2 + 2, Math.random()*4 - 2),
|
||||||
itemId: id,
|
itemId: id,
|
||||||
itemDamage: damage
|
itemDamage: damage
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ function inject(serv) {
|
||||||
serv.initEntity = (type, entityType, world, position) => {
|
serv.initEntity = (type, entityType, world, position) => {
|
||||||
serv.entityMaxId++;
|
serv.entityMaxId++;
|
||||||
var entity = new Entity(serv.entityMaxId);
|
var entity = new Entity(serv.entityMaxId);
|
||||||
console.log('Spawn entity',entity.id);
|
|
||||||
entity.type = type;
|
entity.type = type;
|
||||||
entity.entityType = entityType;
|
entity.entityType = entityType;
|
||||||
entity.world = world;
|
entity.world = world;
|
||||||
|
|
@ -121,7 +120,6 @@ function inject(serv) {
|
||||||
}, object);
|
}, object);
|
||||||
|
|
||||||
if (typeof itemId != 'undefined') {
|
if (typeof itemId != 'undefined') {
|
||||||
console.log(itemId, itemDamage);
|
|
||||||
object.setMetadata([{
|
object.setMetadata([{
|
||||||
"key": 10,
|
"key": 10,
|
||||||
"type": 5,
|
"type": 5,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue