猫史档案馆


萌新大佬

萌新大佬

Lv.1

一个普通的编程小白

获赞:784收藏:262浏览:65251作品收藏:773

签名:阿巴阿巴阿巴 这年头谁在社区混() 快来你岛

回复帖子评论
上一页7 页 / 共 19下一页

【民办活动】逻辑大冒险——第五期 中回复

这,确定不是bug?据我所知编程猫2015年才成立

2022-03-20T07:49:50 点赞:0

【教程】模板太单一?教你自己生成山水图! 中回复

顶顶顶顶顶

2022-04-08T17:04:16 点赞:1

【教程】模板太单一?教你自己生成山水图! 中回复

 没有注释版本,放控制台粘这个

for (let i = 0; i < 127; i++) {
    for (let j = 0; j < 127; j++) {
        voxels.setVoxel(i, 8, j, 'water');
    }
}
function mountain() {
    var x = Math.floor(Math.random() * 127);
    var z = Math.floor(Math.random() * 127);
    var vis = [];
    for (let i = 0; i < 127; i++) {
        var k = [];
        for (let j = 0; j < 127; j++) {
            k.push(false);
        }
        vis.push(k);
    }
    dfs(x, z, Math.floor(Math.random() * 10 + 45), vis);
}
function column(x, z, heigth) {
    for (let y = 8; y <= heigth + 6; y++) {
        voxels.setVoxel(x, y, z, 'dirt');
    }
    voxels.setVoxel(x, heigth + 7, z, 'grass');
}
function dfs(x, z, heigth, vis) {
    if (x < 0 || x >= 127 || z < 0 || z >= 127) return;
    if (heigth <= 0) return;
    if (vis[x][z]) return;
    vis[x][z] = true;
    column(x, z, heigth);
    if (Math.random() > 0.4)
        dfs(x + 1, z, heigth + Math.floor(Math.random() * 10 - 6), vis);
    if (Math.random() > 0.4)
        dfs(x - 1, z, heigth + Math.floor(Math.random() * 10 - 6), vis);
    if (Math.random() > 0.4)
        dfs(x, z - 1, heigth + Math.floor(Math.random() * 10 - 6), vis);
    if (Math.random() > 0.4)
        dfs(x, z + 1, heigth + Math.floor(Math.random() * 10 - 6), vis);
}
mountain();
mountain();
mountain();
mountain();
mountain();
mountain();
mountain();

2022-04-08T17:06:54 点赞:1

【教程】教你做一个假控制台 中回复

喵 排版被吃了

2022-04-28T19:46:51 点赞:0

【教程】教你做一个假控制台 中回复

大家凑合看吧,以下是完整代码

class Box3FakeConsole{
    constructor(consoleName,initial){
        this.name=consoleName;
        this.text=String(initial);
    }
    log(...args){
        for(const t of args){
            this.text+=String(t)+' ';
        }
        this.text+='\n';
    }
    error(...args){
        this.text+='<error\n'
        for(const t of args){
            this.text+=String(t)+' ';
        }
        this.text+='\nerror>\n'
    }
    clear(){
        this.text='';
    }
    async show(entity){
        if(!entity.isPlayer)return;
        while(true){
            const p=await entity.player.dialog({
                type:Box3DialogType.INPUT,
                title:this.name,
                content:this.text,
            })
            if(!p||p==null)break;
            this.log('~> '+p);
            try{
                this.log('<~ '+eval(p));
            }catch(e){
                this.error('<~ '+e);
            }
        }
    }
}

2022-04-28T19:47:27 点赞:0

【收徒学代码】 中回复

我ok嘛》》》》》

2022-04-28T19:55:32 点赞:0

【教程】好用而不常见的管喵代码1——禁足 中回复

ddddd

2022-05-10T10:39:14 点赞:0

【教程】好用而不常见的管喵代码1——禁足 中回复

关于现在没人喜欢教程贴了这事

2022-05-10T10:39:33 点赞:0

【重写背包】折叠背包无问题最终版 中回复

坐垫

2022-05-10T14:16:36 点赞:0

【教程】好用而不常见的管喵代码1——禁足 中回复

ddd

 

2022-05-10T21:26:07 点赞:0

简单的存档模板 中回复

喵d

2022-05-11T17:05:54 点赞:0

【神岛】那些代码很牛的大佬,见到这个人,看都别看一眼,赶紧跑! 中回复

不至于吧,现在我和做的图里面有大部分不知道我会代码,装就完了。首先,你需要有很好的建筑技能;其次,无论他的代码犯了多么蠢的错误都要忍住不要冲动去改;第三,不要说你不会代码,而是故意写出一些错(类似于const a=1;a++;这种),让他彻底放弃你的代码。

2022-05-16T15:01:19 点赞:0

【神岛】最近建了个图,招人中.... 中回复

此图此时已被毁

2022-05-17T07:56:18 点赞:0

闲的没事. 中回复

dddd

2022-05-17T10:46:39 点赞:0

闲的没事. 中回复

dddd

2022-05-17T14:22:11 点赞:0

真的建议把这些人清理出岛三 中回复

举报之后别跟他们说,要不然会被骂的很惨

2022-05-17T14:26:46 点赞:0

咒语试炼场拖更 中回复

能合作不(((闲的没事

2022-05-17T14:28:16 点赞:0

闲的没事. 中回复

所以就没有大佬喵嘛

2022-05-18T07:51:38 点赞:0

【神奇代码岛】诸位大屑在吉吉大殿的合照~ 中回复

话说build不是退岛了吗

2022-05-18T08:00:56 点赞:0

抄书怎么不行???????????????????? 中回复

因为岛三js是改造过的,有的接口接不上((比如alert就肯定不行

2022-05-18T08:02:19 点赞:1

【淡退通知】 中回复

开学为什么这么晚呢?每天5点放学顶多6点就到家了啊

2022-05-18T08:48:08 点赞:0

闲的没事. 中回复

喵喵

2022-05-18T08:48:44 点赞:0

破译模型编辑器 中回复

喵喵喵,求大佬们帮忙awa

2022-05-18T14:37:52 点赞:0

破译模型编辑器 中回复

喵喵喵喵喵

2022-05-18T14:49:38 点赞:0

破译模型编辑器 中回复

ddd

2022-05-18T15:08:21 点赞:0

一个屑建筑教程【第三期】 中回复

还没我代码师弄得好。。。。。。。

2022-05-18T16:08:06 点赞:1

关于退岛这事 中回复

ddddd

2022-05-19T09:15:42 点赞:0

求可以让玩家在弹窗自行选择BGM的代码 中回复

music

• musicBox3SoundEffect‹› = new Box3SoundEffect()

为指定的玩家播放背景音乐(循环播放),此声音仅该玩家能听见,其他玩家无法听到。 背景音乐的音量会根据用户在[设置-声音]更改。

// 将玩家背景音乐设置为电声
entity.player.music.sample = 'audio/electic.mp3';
entity.player.music.gain = 0.5; // 音量 50%

2022-05-19T16:21:32 点赞:1

【教程】物体移位 中回复

ddddd

2022-05-19T16:22:07 点赞:0

【神岛】我们的实名认证信息都去哪儿了? 中回复

姓名:玛卡巴卡

身份证号:000000000000000000

2022-05-20T09:35:27 点赞:1