Skip to content

Commit ac909f6

Browse files
authored
Merge pull request #18 from box3lab/dev_coolfish
Dev coolfish
2 parents c8bcf82 + 444bd8d commit ac909f6

4,591 files changed

Lines changed: 17578 additions & 15480 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434

3535
### 🏗 导入神奇代码岛建筑
3636

37-
- **地形文件导入**:支持从 `config/box3mod/` 目录中的压缩地形文件(`.gz`)导入方块地图。
37+
- **地形文件导入**:支持从 `config/box3/` 目录中的压缩地形文件(`.gz`)导入方块地图。
3838
- **建筑迁移**:可将神奇代码岛中的建筑结构迁移到 Minecraft 世界中,保持方块外观一致。
3939
- **获取建筑文件**:访问 https://box3lab.com/build2mc 获取神奇代码岛建筑的地形文件(`.gz`)。
4040
- **导入指令**
4141
- `/box3import`
42-
列出 `config/box3mod/` 目录下所有可导入的地形文件(`.gz`)。
42+
列出 `config/box3/` 目录下所有可导入的地形文件(`.gz`)。
4343
- `/box3import <fileName>`
44-
`config/box3mod/<fileName>.gz` 导入建筑(命令中不需要带后缀,会自动补 `.gz`)。
44+
`config/box3/<fileName>.gz` 导入建筑(命令中不需要带后缀,会自动补 `.gz`)。
4545
- `/box3import <fileName> <ignoreBarrier>`
4646
`ignoreBarrier = true` 时,跳过屏障方块(不会在世界中放置这些方块)。
4747
- `/box3import <fileName> <ignoreBarrier> <ignoreWater>`

README_en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ You can also migrate structures from Box3 directly into your Minecraft world, pr
3535

3636
### 🏗 Importing Box3 Structures
3737

38-
- **Terrain file import**: supports importing compressed terrain files (`.gz`) from the `config/box3mod/` directory into your world.
38+
- **Terrain file import**: supports importing compressed terrain files (`.gz`) from the `config/box3/` directory into your world.
3939
- **Structure migration**: migrate structures from Box3 into Minecraft while keeping the same block appearance.
4040
- **Get terrain files**: visit https://box3lab.com/build2mc to download Box3 building terrain files (`.gz`).
4141
- **Import commands**:
4242
- `/box3import`
43-
List all available terrain files (`.gz`) under `config/box3mod/`.
43+
List all available terrain files (`.gz`) under `config/box3/`.
4444
- `/box3import <fileName>`
45-
Import a structure from `config/box3mod/<fileName>.gz`.
45+
Import a structure from `config/box3/<fileName>.gz`.
4646
(You don’t need to type the `.gz` extension in the command.)
4747
- `/box3import <fileName> <ignoreBarrier>`
4848
When `ignoreBarrier = true`, barrier blocks will be skipped (they will not be placed in the world).

block_id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Box3Mod 提供方块参考手册
1+
# Box3 提供方块参考手册
22

33
| ID | 注册表键 | 中文名称 | 英文名称 | 类型 | 分类 |
44
| :-- | :------------------------ | :------------ | :---------------------- | :--- | :-------- |

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ loom {
2222
splitEnvironmentSourceSets()
2323

2424
mods {
25-
"box3mod" {
25+
"box3" {
2626
sourceSet sourceSets.main
2727
sourceSet sourceSets.client
2828
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ loom_version=1.15-SNAPSHOT
1414
# Mod Properties
1515
mod_version=1.4.0
1616
maven_group=com.box3lab
17-
archives_base_name=box3mod
17+
archives_base_name=box3
1818

1919
# Dependencies
2020
fabric_api_version=0.141.3+1.21.11
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.box3lab;
2+
3+
import com.box3lab.register.ModBlocks;
4+
import com.box3lab.util.BlockIndexUtil;
5+
6+
import net.fabricmc.api.ClientModInitializer;
7+
import net.fabricmc.fabric.api.client.rendering.v1.BlockRenderLayerMap;
8+
import net.minecraft.client.renderer.chunk.ChunkSectionLayer;
9+
import net.minecraft.world.level.block.Block;
10+
11+
public class Box3Client implements ClientModInitializer {
12+
@Override
13+
public void onInitializeClient() {
14+
15+
for (var entry : ModBlocks.BLOCKS.entrySet()) {
16+
String registryName = entry.getKey();
17+
Block block = entry.getValue();
18+
19+
Integer id = BlockIndexUtil.getIdByName(registryName);
20+
if (id != null && !BlockIndexUtil.isSolid(id)) {
21+
BlockRenderLayerMap.putBlock(block, ChunkSectionLayer.TRANSLUCENT);
22+
}
23+
}
24+
25+
}
26+
}

src/client/java/com/box3lab/Box3ModClient.java

Lines changed: 0 additions & 26 deletions
This file was deleted.
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.box3lab;
2+
3+
import com.box3lab.command.ModCommands;
4+
import com.box3lab.register.ModBlocks;
5+
import com.box3lab.register.ModItems;
6+
7+
import net.fabricmc.api.ModInitializer;
8+
9+
// import org.slf4j.Logger;
10+
// import org.slf4j.LoggerFactory;
11+
12+
public class Box3 implements ModInitializer {
13+
public static final String MOD_ID = "box3";
14+
15+
// This logger is used to write text to the console and the log file.
16+
// It is considered best practice to use your mod id as the logger's name.
17+
// That way, it's clear which mod wrote info, warnings, and errors.
18+
// public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
19+
20+
@Override
21+
public void onInitialize() {
22+
// This code runs as soon as Minecraft is in a mod-load-ready state.
23+
// However, some things (like resources) may still be uninitialized.
24+
// Proceed with mild caution.
25+
ModBlocks.initialize();
26+
ModItems.initialize();
27+
ModCommands.register();
28+
29+
// LOGGER.info("Hello Fabric world!");
30+
}
31+
}

src/main/java/com/box3lab/Box3Mod.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)