Skip to content

Commit

Permalink
Update to 1.2.0
Browse files Browse the repository at this point in the history
Rename project
Add more localized text
  • Loading branch information
mouse0w0 committed Aug 3, 2020
1 parent 0f87927 commit 2201052
Show file tree
Hide file tree
Showing 26 changed files with 51 additions and 52 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
# MinecraftContentExporter - 我的世界内容导出工具
针对Peach模组制作器设计的我的世界内容导出工具
# PeachContentPackExporter - Peach内容包导出工具
针对Peach模组制作器设计的内容包导出工具

## 使用图片
![Usage](docs/usage_1.png)
4 changes: 2 additions & 2 deletions build.gradle
Expand Up @@ -11,9 +11,9 @@ apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "1.1.1"
version = "1.2.0"
group = "com.github.mouse0w0" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "mce"
archivesBaseName = "pcpe"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/com/github/mouse0w0/mce/MCE.java

This file was deleted.

@@ -1,9 +1,9 @@
package com.github.mouse0w0.mce;
package com.github.mouse0w0.pcpe;

import com.github.mouse0w0.mce.data.*;
import com.github.mouse0w0.mce.renderer.FrameBuffer;
import com.github.mouse0w0.mce.renderer.Renderer;
import com.github.mouse0w0.mce.util.*;
import com.github.mouse0w0.pcpe.data.*;
import com.github.mouse0w0.pcpe.renderer.FrameBuffer;
import com.github.mouse0w0.pcpe.renderer.Renderer;
import com.github.mouse0w0.pcpe.util.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemModelMesher;
import net.minecraft.client.renderer.block.model.IBakedModel;
Expand Down Expand Up @@ -122,7 +122,7 @@ private void exportCreativeTabs() throws IOException {
if (!namespace.equals(icon.getItem().getRegistryName().getResourceDomain())) continue;
creativeTabDataList.add(new CreativeTabData(creativeTabs.getTabLabel(),
getTranslationKey(creativeTabs),
com.github.mouse0w0.mce.data.Item.createItem(icon.getItem().getRegistryName().toString(), icon.getMetadata())));
com.github.mouse0w0.pcpe.data.Item.createItem(icon.getItem().getRegistryName().toString(), icon.getMetadata())));
}
JsonUtils.writeJson(getOutput().resolve("content/" + namespace + "/creativeTabs.json"), creativeTabDataList);
}
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/github/mouse0w0/pcpe/PCPE.java
@@ -0,0 +1,8 @@
package com.github.mouse0w0.pcpe;

import net.minecraftforge.fml.common.Mod;

@Mod(modid = PCPE.MOD_ID)
public class PCPE {
public static final String MOD_ID = "pcpe";
}
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

import java.util.List;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

public class CreativeTabData {

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

import org.apache.commons.lang3.Validate;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

import java.util.Objects;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

import java.util.List;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.data;
package com.github.mouse0w0.pcpe.data;

public class OreDictEntry {

Expand Down
@@ -1,7 +1,8 @@
package com.github.mouse0w0.mce.gui;
package com.github.mouse0w0.pcpe.gui;

import com.github.mouse0w0.mce.Exporter;
import com.github.mouse0w0.pcpe.Exporter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.common.Loader;

import javax.swing.*;
Expand All @@ -13,7 +14,7 @@
public class GuiExport extends JFrame {

public GuiExport() {
setTitle("Export");
setTitle(I18n.format("pcpe.gui.exporter.title"));
setSize(400, 130);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
Expand All @@ -24,14 +25,14 @@ public GuiExport() {
JPanel properties = new JPanel(new GridLayout(2, 2));
root.add(BorderLayout.CENTER, properties);

JLabel namespaceLabel = new JLabel("Namespace:");
JLabel namespaceLabel = new JLabel(I18n.format("pcpe.gui.namespace"));
properties.add(namespaceLabel);
JComboBox<String> namespace = new JComboBox<>();
Loader.instance().getActiveModList().forEach(modContainer -> namespace.addItem(modContainer.getModId()));
namespace.setSelectedItem("minecraft");
properties.add(namespace);

JLabel exportPathLabel = new JLabel("ExportPath:");
JLabel exportPathLabel = new JLabel(I18n.format("pcpe.gui.exportPath"));
properties.add(exportPathLabel);
JPanel exportPathPanel = new JPanel(new BorderLayout());
properties.add(exportPathPanel);
Expand All @@ -40,7 +41,7 @@ public GuiExport() {
JButton chooseExportPath = new JButton("...");
chooseExportPath.addActionListener(e -> {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle("Save File");
fileChooser.setDialogTitle(I18n.format("pcpe.gui.exportPath.title"));
fileChooser.setSelectedFile(Paths.get(namespace.getSelectedItem().toString() + ".zip").toFile());
fileChooser.setFileFilter(new FileFilter() {
@Override
Expand All @@ -61,7 +62,7 @@ public String getDescription() {

JPanel buttonBar = new JPanel(new FlowLayout(FlowLayout.RIGHT));
root.add(BorderLayout.SOUTH, buttonBar);
JButton export = new JButton("Export");
JButton export = new JButton(I18n.format("pcpe.gui.export"));
export.addActionListener(e -> {
Minecraft.getMinecraft().addScheduledTask(
new Exporter((String) namespace.getSelectedItem(), Paths.get(exportPath.getText())));
Expand Down
@@ -1,6 +1,6 @@
package com.github.mouse0w0.mce.gui;
package com.github.mouse0w0.pcpe.gui;

import com.github.mouse0w0.mce.MCE;
import com.github.mouse0w0.pcpe.PCPE;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiIngameMenu;
import net.minecraft.client.gui.GuiMainMenu;
Expand All @@ -10,7 +10,7 @@
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Mod.EventBusSubscriber(modid = MCE.MOD_ID)
@Mod.EventBusSubscriber(modid = PCPE.MOD_ID)
public class GuiListener {

private static final int EXPORT_BUTTON_ID = 0xE0202;
Expand All @@ -19,7 +19,7 @@ public class GuiListener {
public static void postInitGui(GuiScreenEvent.InitGuiEvent.Post event) {
GuiScreen gui = event.getGui();
if (GuiMainMenu.class.equals(gui.getClass()) || GuiIngameMenu.class.equals(gui.getClass())) {
event.getButtonList().add(new GuiButton(EXPORT_BUTTON_ID, 0, 0, 60, 20, I18n.format("mce.gui.export")));
event.getButtonList().add(new GuiButton(EXPORT_BUTTON_ID, 0, 0, 60, 20, I18n.format("pcpe.gui.export")));
}
}

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.renderer;
package com.github.mouse0w0.pcpe.renderer;

import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
Expand Down
@@ -1,11 +1,11 @@
package com.github.mouse0w0.mce.renderer;
package com.github.mouse0w0.pcpe.renderer;

import com.github.mouse0w0.mce.MCE;
import com.github.mouse0w0.pcpe.PCPE;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

@Mod.EventBusSubscriber(modid = MCE.MOD_ID)
@Mod.EventBusSubscriber(modid = PCPE.MOD_ID)
public class RenderListener {

@SubscribeEvent
Expand Down
@@ -1,6 +1,6 @@
package com.github.mouse0w0.mce.renderer;
package com.github.mouse0w0.pcpe.renderer;

import com.github.mouse0w0.mce.util.ImageUtils;
import com.github.mouse0w0.pcpe.util.ImageUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.renderer;
package com.github.mouse0w0.pcpe.renderer;

import org.lwjgl.opengl.GL11;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import java.io.IOException;
import java.nio.file.Files;
Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelManager;
Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import java.lang.reflect.Field;

Expand Down
@@ -1,4 +1,4 @@
package com.github.mouse0w0.mce.util;
package com.github.mouse0w0.pcpe.util;

import org.apache.commons.io.IOUtils;

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/mce/lang/en_us.lang

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/assets/mce/lang/zh_cn.lang

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/resources/mcmod.info
@@ -1,7 +1,7 @@
[
{
"modid": "mce",
"name": "Minecraft Content Exporter",
"modid": "pcpe",
"name": "Peach Content Pack Exporter",
"description": "",
"version": "${version}",
"mcversion": "${mcversion}",
Expand Down

0 comments on commit 2201052

Please sign in to comment.