added a nuke
This commit is contained in:
75
.idea/workspace.xml
generated
75
.idea/workspace.xml
generated
@@ -1,11 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="21afa9bb-6936-4dba-b025-44007f88dd40" name="Changes" comment="">
|
<list default="true" id="21afa9bb-6936-4dba-b025-44007f88dd40" name="Changes" comment="add a BlockRegister class to let rev not shoot himself trying to register blocks">
|
||||||
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/lang/en_US_Mod.lang" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/net/minecraft/src/mml/BlockLoader.java" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/src/lang/languages.txt" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/net/minecraft/src/CreativeTabTest.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/net/minecraft/src/mml/Blocks/BlockNuke.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/net/minecraft/src/mml/CreativeTabs/CreativeTabDebug.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/net/minecraft/src/mml/Entities/EntityNukePrimed.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/Block.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/Block.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/Block.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/Block.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/CreativeTabs.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/CreativeTabs.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/GuiContainerCreative.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/GuiContainerCreative.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/Item.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/Item.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/StringTranslate.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/StringTranslate.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/World.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/World.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/net/minecraft/src/mml/BlockLoader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/minecraft/src/mml/BlockLoader.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -22,33 +32,33 @@
|
|||||||
<component name="Git.Settings">
|
<component name="Git.Settings">
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectColorInfo"><![CDATA[{
|
<component name="ProjectColorInfo">{
|
||||||
"associatedIndex": 0,
|
"associatedIndex": 0,
|
||||||
"fromUser": false
|
"fromUser": false
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="ProjectId" id="3FGqJZOP14ZXSxLwGOGtfFJIcz0" />
|
<component name="ProjectId" id="3FGqJZOP14ZXSxLwGOGtfFJIcz0" />
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Application.Minecraft Client.executor": "Run",
|
"Application.Minecraft Client.executor": "Run",
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "C:/idea/MML",
|
"last_opened_file_path": "C:/idea/MML",
|
||||||
"project.structure.last.edited": "Libraries",
|
"project.structure.last.edited": "Libraries",
|
||||||
"project.structure.proportion": "0.0",
|
"project.structure.proportion": "0.0",
|
||||||
"project.structure.side.proportion": "0.0",
|
"project.structure.side.proportion": "0.0",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RunManager">
|
<component name="RunManager">
|
||||||
<configuration name="Minecraft Client" type="Application" factoryName="Application">
|
<configuration name="Minecraft Client" type="Application" factoryName="Application">
|
||||||
<option name="MAIN_CLASS_NAME" value="org.mcphackers.launchwrapper.Launch" />
|
<option name="MAIN_CLASS_NAME" value="org.mcphackers.launchwrapper.Launch" />
|
||||||
@@ -75,11 +85,26 @@
|
|||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1781711682567</updated>
|
<updated>1781711682567</updated>
|
||||||
<workItem from="1781711683576" duration="1113000" />
|
<workItem from="1781711683576" duration="10131000" />
|
||||||
|
<workItem from="1781724230644" duration="29000" />
|
||||||
|
<workItem from="1781839713575" duration="1832000" />
|
||||||
</task>
|
</task>
|
||||||
|
<task id="LOCAL-00001" summary="add a BlockRegister class to let rev not shoot himself trying to register blocks">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1781712814228</created>
|
||||||
|
<option name="number" value="00001" />
|
||||||
|
<option name="presentableId" value="LOCAL-00001" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1781712814228</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="2" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
<option name="version" value="3" />
|
<option name="version" value="3" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="VcsManagerConfiguration">
|
||||||
|
<MESSAGE value="add a BlockRegister class to let rev not shoot himself trying to register blocks" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="add a BlockRegister class to let rev not shoot himself trying to register blocks" />
|
||||||
|
</component>
|
||||||
</project>
|
</project>
|
||||||
1320
src/lang/en_US_Mod.lang
Normal file
1320
src/lang/en_US_Mod.lang
Normal file
File diff suppressed because it is too large
Load Diff
63
src/lang/languages.txt
Normal file
63
src/lang/languages.txt
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
af_ZA=Afrikaans (ZA)
|
||||||
|
ar_SA=العربية (العالم العربي)
|
||||||
|
bg_BG=Български (BG)
|
||||||
|
ca_ES=Català (CAT)
|
||||||
|
cs_CZ=Čeština (CZ)
|
||||||
|
cy_GB=Cymraeg (Cymru)
|
||||||
|
da_DK=Dansk (DK)
|
||||||
|
de_DE=Deutsch (Deutschland)
|
||||||
|
el_GR=Ελληνικά (El)
|
||||||
|
en_AU=Australian English (Australia)
|
||||||
|
en_CA=Canadian English (CA)
|
||||||
|
en_GB=English (UK)
|
||||||
|
en_PT=Pirate Speak (PIRATE)
|
||||||
|
eo_UY=Esperanto (Mondo)
|
||||||
|
es_AR=Español (Argentina)
|
||||||
|
es_ES=Español (España)
|
||||||
|
es_MX=Español (México)
|
||||||
|
es_UY=Español (Uruguay)
|
||||||
|
es_VE=Español (Venezuela)
|
||||||
|
et_EE=Eesti (ET)
|
||||||
|
eu_ES=Euskara (EH)
|
||||||
|
fi_FI=suomi (FI)
|
||||||
|
fr_FR=Français (France)
|
||||||
|
fr_CA=Français (CA)
|
||||||
|
ga_IE=Gaeilge (Éire)
|
||||||
|
gl_ES=Galego (Galicia)
|
||||||
|
he_IL=אנגלית (IL)
|
||||||
|
hi_IN=अंग्रेज़ी (भारत)
|
||||||
|
hr_HR=Hrvatski (HR)
|
||||||
|
hu_HU=Magyar (HU)
|
||||||
|
id_ID=Bahasa Indonesia (ID)
|
||||||
|
is_IS=Íslenska (IS)
|
||||||
|
it_IT=Italiano (Italia)
|
||||||
|
ja_JP=日本語 (日本)
|
||||||
|
ka_GE=ქართული (საქართველო)
|
||||||
|
ko_KR=한국어 (KR)
|
||||||
|
kw_GB=Kernowek (Cornwall)
|
||||||
|
lt_LT=Lietuvių (Lietuva)
|
||||||
|
lv_LV=Latviešu (Latvija)
|
||||||
|
ms_MY=Bahasa Melayu (MS)
|
||||||
|
mt_MT=Malti (MT)
|
||||||
|
nl_NL=Nederlands (Nederland)
|
||||||
|
nn_NO=Norsk nynorsk (Noreg)
|
||||||
|
no_NO=Norsk (NO)
|
||||||
|
pl_PL=Polski (Polska)
|
||||||
|
pt_BR=Português (BR)
|
||||||
|
pt_PT=Português (Portugal)
|
||||||
|
qya_AA=Quenya (Arda)
|
||||||
|
ro_RO=Română (RO)
|
||||||
|
ru_RU=Русский (Россия)
|
||||||
|
sk_SK=Slovenčina (SK)
|
||||||
|
sl_SI=Slovenščina (SLO)
|
||||||
|
sr_SP=Српски (Србија)
|
||||||
|
sv_SE=Svenska (Sverige)
|
||||||
|
th_TH=ภาษาไทย (TH)
|
||||||
|
tlh_AA=tlhIngan Hol (US)
|
||||||
|
tr_TR=Türkçe (TR)
|
||||||
|
uk_UA=Українська (Україна)
|
||||||
|
vi_VN=Tiếng Việt (VN)
|
||||||
|
zh_CN=简体中文 (中国)
|
||||||
|
zh_TW=繁體中文 (台灣)
|
||||||
|
|
||||||
|
en_US_Mod=English (US) (MML Modded LangFile)
|
||||||
@@ -3,6 +3,7 @@ package net.minecraft.src;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.src.mml.BlockLoader;
|
import net.minecraft.src.mml.BlockLoader;
|
||||||
|
import net.minecraft.src.mml.Blocks.BlockNuke;
|
||||||
|
|
||||||
public class Block {
|
public class Block {
|
||||||
private CreativeTabs displayOnCreativeTab;
|
private CreativeTabs displayOnCreativeTab;
|
||||||
@@ -185,6 +186,9 @@ public class Block {
|
|||||||
|
|
||||||
public static BlockLoader Loader = new BlockLoader();
|
public static BlockLoader Loader = new BlockLoader();
|
||||||
|
|
||||||
|
public static final Block test = Loader.registerBlock(159, Material.ground, "test", CreativeTabs.tabDebug);
|
||||||
|
|
||||||
|
public static final Block nuke = (new BlockNuke(160)).setHardness(0.0F).setStepSound(soundGrassFootstep).setUnlocalizedName("nuke");
|
||||||
|
|
||||||
public final int blockID;
|
public final int blockID;
|
||||||
protected float blockHardness;
|
protected float blockHardness;
|
||||||
|
|||||||
11
src/net/minecraft/src/CreativeTabTest.java
Normal file
11
src/net/minecraft/src/CreativeTabTest.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
final class CreativeTabTest extends CreativeTabs {
|
||||||
|
CreativeTabTest(int var1, String var2) {
|
||||||
|
super(var1, var2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTabIconItemIndex() {
|
||||||
|
return Block.brick.blockID;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.src.mml.CreativeTabs.CreativeTabDebug;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class CreativeTabs {
|
public class CreativeTabs {
|
||||||
public static final CreativeTabs[] creativeTabArray = new CreativeTabs[12];
|
public static final CreativeTabs[] creativeTabArray = new CreativeTabs[13];
|
||||||
public static final CreativeTabs tabBlock = new CreativeTabBlock(0, "buildingBlocks");
|
public static final CreativeTabs tabBlock = new CreativeTabBlock(0, "buildingBlocks");
|
||||||
public static final CreativeTabs tabDecorations = new CreativeTabDeco(1, "decorations");
|
public static final CreativeTabs tabDecorations = new CreativeTabDeco(1, "decorations");
|
||||||
public static final CreativeTabs tabRedstone = new CreativeTabRedstone(2, "redstone");
|
public static final CreativeTabs tabRedstone = new CreativeTabRedstone(2, "redstone");
|
||||||
@@ -16,6 +19,8 @@ public class CreativeTabs {
|
|||||||
public static final CreativeTabs tabBrewing = new CreativeTabBrewing(9, "brewing");
|
public static final CreativeTabs tabBrewing = new CreativeTabBrewing(9, "brewing");
|
||||||
public static final CreativeTabs tabMaterials = new CreativeTabMaterial(10, "materials");
|
public static final CreativeTabs tabMaterials = new CreativeTabMaterial(10, "materials");
|
||||||
public static final CreativeTabs tabInventory = (new CreativeTabInventory(11, "inventory")).setBackgroundImageName("survival_inv.png").setNoScrollbar().setNoTitle();
|
public static final CreativeTabs tabInventory = (new CreativeTabInventory(11, "inventory")).setBackgroundImageName("survival_inv.png").setNoScrollbar().setNoTitle();
|
||||||
|
public static final CreativeTabs tabDebug = new CreativeTabDebug(12, "debug");
|
||||||
|
|
||||||
private final int tabIndex;
|
private final int tabIndex;
|
||||||
private final String tabLabel;
|
private final String tabLabel;
|
||||||
private String backgroundImageName = "list_items.png";
|
private String backgroundImageName = "list_items.png";
|
||||||
@@ -76,23 +81,37 @@ public class CreativeTabs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getTabColumn() {
|
public int getTabColumn() {
|
||||||
|
if (tabIndex > 11) {
|
||||||
|
return((tabIndex -12) % 10) % 5;
|
||||||
|
}
|
||||||
return this.tabIndex % 6;
|
return this.tabIndex % 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTabInFirstRow() {
|
public boolean isTabInFirstRow() {
|
||||||
|
if (tabIndex > 11) {
|
||||||
|
return((tabIndex -12) % 10) < 5;
|
||||||
|
}
|
||||||
return this.tabIndex < 6;
|
return this.tabIndex < 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void displayAllReleventItems(List var1) {
|
public void displayAllReleventItems(List var1) {
|
||||||
Item[] var2 = Item.itemsList;
|
Item[] var2 = Item.itemsList;
|
||||||
int var3 = var2.length;
|
int var3 = var2.length;
|
||||||
|
|
||||||
for(int var4 = 0; var4 < var3; ++var4) {
|
for (int var4 = 0; var4 < var3; ++var4) {
|
||||||
Item var5 = var2[var4];
|
Item var5 = var2[var4];
|
||||||
if(var5 != null && var5.getCreativeTab() == this) {
|
|
||||||
|
if (var5 == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (CreativeTabs tab : var5.getCreativeTabs()) {
|
||||||
|
if (tab == this) {
|
||||||
var5.getSubItems(var5.itemID, this, var1);
|
var5.getSubItems(var5.itemID, this, var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,4 +137,19 @@ public class CreativeTabs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTabPage() {
|
||||||
|
if (tabIndex > 11) {
|
||||||
|
return ((tabIndex - 12) / 10 ) + 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getNextID(){
|
||||||
|
return creativeTabArray.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getIconItemStack() {
|
||||||
|
return new ItemStack(getTabIconItem());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
private boolean field_74234_w = false;
|
private boolean field_74234_w = false;
|
||||||
private CreativeCrafting field_82324_x;
|
private CreativeCrafting field_82324_x;
|
||||||
|
|
||||||
|
private static int currentPage = 0;
|
||||||
|
private int maxPages = ((CreativeTabs.creativeTabArray.length - 12) / 10) + 1;
|
||||||
|
|
||||||
public GuiContainerCreative(EntityPlayer var1) {
|
public GuiContainerCreative(EntityPlayer var1) {
|
||||||
super(new ContainerCreative(var1));
|
super(new ContainerCreative(var1));
|
||||||
var1.openContainer = this.inventorySlots;
|
var1.openContainer = this.inventorySlots;
|
||||||
@@ -172,6 +175,13 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[var1]);
|
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[var1]);
|
||||||
this.field_82324_x = new CreativeCrafting(this.mc);
|
this.field_82324_x = new CreativeCrafting(this.mc);
|
||||||
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
|
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
|
||||||
|
|
||||||
|
if (maxPages > 0) {
|
||||||
|
// Button ID 101 for Previous, Button ID 102 for Next
|
||||||
|
this.buttonList.add(new GuiButton(101, this.guiLeft, this.guiTop - 50, 20, 20, "<"));
|
||||||
|
this.buttonList.add(new GuiButton(102, this.guiLeft + this.xSize - 20, this.guiTop - 50, 20, 20, ">"));
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
|
this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
|
||||||
}
|
}
|
||||||
@@ -278,6 +288,13 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
|
|
||||||
for(int var8 = 0; var8 < var7; ++var8) {
|
for(int var8 = 0; var8 < var7; ++var8) {
|
||||||
CreativeTabs var9 = var6[var8];
|
CreativeTabs var9 = var6[var8];
|
||||||
|
if (var9 == null) continue; // Safety check
|
||||||
|
|
||||||
|
// FILTER: Ignore clicks on tabs that aren't on the current page
|
||||||
|
if (var9.getTabPage() != currentPage) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.func_74232_a(var9, var4, var5)) {
|
if(this.func_74232_a(var9, var4, var5)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -441,12 +458,20 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
|
|
||||||
for(int var13 = 0; var13 < var12; ++var13) {
|
for(int var13 = 0; var13 < var12; ++var13) {
|
||||||
CreativeTabs var14 = var11[var13];
|
CreativeTabs var14 = var11[var13];
|
||||||
|
if (var14 == null) continue; // Safety check
|
||||||
|
|
||||||
|
// FILTER: Skip checking hover text if the tab isn't on the active page
|
||||||
|
if (var14.getTabPage() != currentPage) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.renderCreativeInventoryHoveringText(var14, var1, var2)) {
|
if(this.renderCreativeInventoryHoveringText(var14, var1, var2)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, var1, var2)) {
|
// FILTER: Only show the survival inventory bin slot tooltip if the survival tab is on the active page
|
||||||
|
if(this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.tabInventory.getTabPage() == currentPage && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, var1, var2)) {
|
||||||
this.drawCreativeTabHoveringText(StringTranslate.getInstance().translateKey("inventory.binSlot"), var1, var2);
|
this.drawCreativeTabHoveringText(StringTranslate.getInstance().translateKey("inventory.binSlot"), var1, var2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -464,12 +489,20 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
int var7;
|
int var7;
|
||||||
for(var7 = 0; var7 < var6; ++var7) {
|
for(var7 = 0; var7 < var6; ++var7) {
|
||||||
CreativeTabs var8 = var5[var7];
|
CreativeTabs var8 = var5[var7];
|
||||||
|
if (var8 == null) continue; // Safety check for null tabs
|
||||||
|
|
||||||
|
// FILTER: Only draw the background tab if it's on the current page
|
||||||
|
if (var8.getTabPage() != currentPage) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
this.mc.renderEngine.bindTexture("/gui/allitems.png");
|
this.mc.renderEngine.bindTexture("/gui/allitems.png");
|
||||||
if(var8.getTabIndex() != selectedTabIndex) {
|
if(var8.getTabIndex() != selectedTabIndex) {
|
||||||
this.renderCreativeTab(var8);
|
this.renderCreativeTab(var8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw the main large inventory background texture
|
||||||
this.mc.renderEngine.bindTexture("/gui/creative_inv/" + var4.getBackgroundImageName());
|
this.mc.renderEngine.bindTexture("/gui/creative_inv/" + var4.getBackgroundImageName());
|
||||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||||
this.searchField.drawTextBox();
|
this.searchField.drawTextBox();
|
||||||
@@ -482,14 +515,24 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
this.drawTexturedModalRect(var9, var6 + (int)((float)(var7 - var6 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
|
this.drawTexturedModalRect(var9, var6 + (int)((float)(var7 - var6 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FILTER: Only draw the foreground/selected tab if it's on the current page
|
||||||
|
if (var4.getTabPage() == currentPage) {
|
||||||
this.renderCreativeTab(var4);
|
this.renderCreativeTab(var4);
|
||||||
if(var4 == CreativeTabs.tabInventory) {
|
|
||||||
GuiInventory.drawPlayerOnGui(this.mc, this.guiLeft + 43, this.guiTop + 45, 20, (float)(this.guiLeft + 43 - var2), (float)(this.guiTop + 45 - 30 - var3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(var4 == CreativeTabs.tabInventory && var4.getTabPage() == currentPage) {
|
||||||
|
GuiInventory.drawPlayerOnGui(this.mc, this.guiLeft + 43, this.guiTop + 45, 20, (float)(this.guiLeft + 43 - var2), (float)(this.guiTop + 45 - 30 - var3));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean func_74232_a(CreativeTabs var1, int var2, int var3) {
|
protected boolean func_74232_a(CreativeTabs var1, int var2, int var3) {
|
||||||
|
if (var1 == null) return false;
|
||||||
|
|
||||||
|
// FILTER: If the tab isn't on the active page, its bounding box shouldn't exist
|
||||||
|
if (var1.getTabPage() != currentPage) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int var4 = var1.getTabColumn();
|
int var4 = var1.getTabColumn();
|
||||||
int var5 = 28 * var4;
|
int var5 = 28 * var4;
|
||||||
byte var6 = 0;
|
byte var6 = 0;
|
||||||
@@ -585,6 +628,17 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||||||
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
|
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (var1.id == 101) { // Previous Page
|
||||||
|
if (currentPage > 0) {
|
||||||
|
currentPage--;
|
||||||
|
}
|
||||||
|
} else if (var1.id == 102) { // Next Page
|
||||||
|
if (currentPage < maxPages) {
|
||||||
|
currentPage++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.actionPerformed(var1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int func_74230_h() {
|
public int func_74230_h() {
|
||||||
|
|||||||
@@ -292,6 +292,10 @@ public class Item {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CreativeTabs[] getCreativeTabs() {
|
||||||
|
return new CreativeTabs[]{getCreativeTab()};
|
||||||
|
}
|
||||||
|
|
||||||
public String getLocalizedName(ItemStack var1) {
|
public String getLocalizedName(ItemStack var1) {
|
||||||
String var2 = this.getUnlocalizedName(var1);
|
String var2 = this.getUnlocalizedName(var1);
|
||||||
return var2 == null ? "" : StatCollector.translateToLocal(var2);
|
return var2 == null ? "" : StatCollector.translateToLocal(var2);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class StringTranslate {
|
|||||||
private static StringTranslate instance = new StringTranslate("en_US");
|
private static StringTranslate instance = new StringTranslate("en_US");
|
||||||
private Properties translateTable = new Properties();
|
private Properties translateTable = new Properties();
|
||||||
private TreeMap languageList;
|
private TreeMap languageList;
|
||||||
private TreeMap field_94521_d = new TreeMap();
|
private TreeMap VarTreeMap = new TreeMap();
|
||||||
private String currentLanguage;
|
private String currentLanguage;
|
||||||
private boolean isUnicode;
|
private boolean isUnicode;
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ public class StringTranslate {
|
|||||||
|
|
||||||
private void loadLanguage(Properties var1, String var2) throws IOException {
|
private void loadLanguage(Properties var1, String var2) throws IOException {
|
||||||
BufferedReader var3 = null;
|
BufferedReader var3 = null;
|
||||||
if(this.field_94521_d.containsKey(var2)) {
|
if(this.VarTreeMap.containsKey(var2)) {
|
||||||
var3 = new BufferedReader(new FileReader((File)this.field_94521_d.get(var2)));
|
var3 = new BufferedReader(new FileReader((File)this.VarTreeMap.get(var2)));
|
||||||
} else {
|
} else {
|
||||||
var3 = new BufferedReader(new InputStreamReader(StringTranslate.class.getResourceAsStream("/lang/" + var2 + ".lang"), "UTF-8"));
|
var3 = new BufferedReader(new InputStreamReader(StringTranslate.class.getResourceAsStream("/lang/" + var2 + ".lang"), "UTF-8"));
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ public class StringTranslate {
|
|||||||
var1 = var1.substring(0, var3);
|
var1 = var1.substring(0, var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.field_94521_d.put(var1, var2);
|
this.VarTreeMap.put(var1, var2);
|
||||||
if(var1.contains(this.currentLanguage)) {
|
if(var1.contains(this.currentLanguage)) {
|
||||||
this.setLanguage(this.currentLanguage, true);
|
this.setLanguage(this.currentLanguage, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1650,8 +1650,8 @@ public abstract class World implements IBlockAccess {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Explosion createExplosion(Entity var1, double var2, double var4, double var6, float var8, boolean var9) {
|
public Explosion createExplosion(Entity entity, double X, double Y, double Z, float Power, boolean explode) {
|
||||||
return this.newExplosion(var1, var2, var4, var6, var8, false, var9);
|
return this.newExplosion(entity, X, Y, Z, Power, false, explode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Explosion newExplosion(Entity var1, double var2, double var4, double var6, float var8, boolean var9, boolean var10) {
|
public Explosion newExplosion(Entity var1, double var2, double var4, double var6, float var8, boolean var9, boolean var10) {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import net.minecraft.src.CreativeTabs;
|
|||||||
import net.minecraft.src.Material;
|
import net.minecraft.src.Material;
|
||||||
|
|
||||||
public class BlockLoader {
|
public class BlockLoader {
|
||||||
public Block registerBlock(int BlockID, Material material, String unlocalizedName) {
|
public Block registerBlock(int BlockID, Material material, String unlocalizedName, CreativeTabs creativeTab) {
|
||||||
Block InternalBlock = (new Block(BlockID, material));
|
Block InternalBlock = (new Block(BlockID, material));
|
||||||
InternalBlock.setCreativeTab(CreativeTabs.tabBlock);
|
InternalBlock.setCreativeTab(creativeTab);
|
||||||
InternalBlock.setUnlocalizedName(unlocalizedName);
|
InternalBlock.setUnlocalizedName(unlocalizedName);
|
||||||
return InternalBlock;
|
return InternalBlock;
|
||||||
}
|
}
|
||||||
|
|||||||
97
src/net/minecraft/src/mml/Blocks/BlockNuke.java
Normal file
97
src/net/minecraft/src/mml/Blocks/BlockNuke.java
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
package net.minecraft.src.mml.Blocks;
|
||||||
|
|
||||||
|
import net.minecraft.src.*;
|
||||||
|
import net.minecraft.src.mml.Entities.EntityNukePrimed;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class BlockNuke extends Block {
|
||||||
|
private Icon TextureTop;
|
||||||
|
private Icon TextureBottom;
|
||||||
|
|
||||||
|
public BlockNuke(int BlockID) {
|
||||||
|
super(BlockID, Material.tnt);
|
||||||
|
this.setCreativeTab(CreativeTabs.tabDebug);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Icon getIcon(int side, int var2) {
|
||||||
|
return side == 0 ? this.TextureBottom : (side == 1 ? this.TextureTop : this.blockIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBlockAdded(World var1, int var2, int var3, int var4) {
|
||||||
|
super.onBlockAdded(var1, var2, var3, var4);
|
||||||
|
if(var1.isBlockIndirectlyGettingPowered(var2, var3, var4)) {
|
||||||
|
this.onBlockDestroyedByPlayer(var1, var2, var3, var4, 1);
|
||||||
|
var1.setBlockToAir(var2, var3, var4);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.BlowupNuke(var1, var2, var3, var4, 1, (EntityLiving) null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5) {
|
||||||
|
if(var1.isBlockIndirectlyGettingPowered(var2, var3, var4)) {
|
||||||
|
this.onBlockDestroyedByPlayer(var1, var2, var3, var4, 1);
|
||||||
|
var1.setBlockToAir(var2, var3, var4);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int quantityDropped(Random var1) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBlockDestroyedByExplosion(World var1, int var2, int var3, int var4, Explosion var5) {
|
||||||
|
if(!var1.isRemote) {
|
||||||
|
EntityNukePrimed NukeEntity = new EntityNukePrimed(var1, (double)((float)var2 + 0.5F), (double)((float)var3 + 0.5F), (double)((float)var4 + 0.5F), var5.func_94613_c());
|
||||||
|
NukeEntity.fuse = 0;
|
||||||
|
var1.spawnEntityInWorld(NukeEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onBlockDestroyedByPlayer(World var1, int var2, int var3, int var4, int var5) {
|
||||||
|
this.BlowupNuke(var1, var2, var3, var4, var5, (EntityLiving)null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BlowupNuke(World var1, int var2, int var3, int var4, int var5, EntityLiving var6) {
|
||||||
|
if(!var1.isRemote) {
|
||||||
|
if((var5 & 1) == 1) {
|
||||||
|
EntityNukePrimed var7 = new EntityNukePrimed(var1, (double)((float)var2 + 0.5F), (double)((float)var3 + 0.5F), (double)((float)var4 + 0.5F), var6);
|
||||||
|
var1.spawnEntityInWorld(var7);
|
||||||
|
var1.playSoundAtEntity(var7, "random.fuse", 1.0F, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9) {
|
||||||
|
if(var5.getCurrentEquippedItem() != null && var5.getCurrentEquippedItem().itemID == Item.flintAndSteel.itemID) {
|
||||||
|
this.BlowupNuke(var1, var2, var3, var4, 1, var5);
|
||||||
|
var1.setBlockToAir(var2, var3, var4);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return super.onBlockActivated(var1, var2, var3, var4, var5, var6, var7, var8, var9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onEntityCollidedWithBlock(World var1, int var2, int var3, int var4, Entity var5) {
|
||||||
|
if(var5 instanceof EntityArrow && !var1.isRemote) {
|
||||||
|
EntityArrow var6 = (EntityArrow)var5;
|
||||||
|
if(var6.isBurning()) {
|
||||||
|
this.BlowupNuke(var1, var2, var3, var4, 1, var6.shootingEntity instanceof EntityLiving ? (EntityLiving)var6.shootingEntity : null);
|
||||||
|
var1.setBlockToAir(var2, var3, var4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canDropFromExplosion(Explosion var1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerIcons(IconRegister var1) {
|
||||||
|
this.blockIcon = var1.registerIcon("tnt_side");
|
||||||
|
this.TextureTop = var1.registerIcon("tnt_top");
|
||||||
|
this.TextureBottom = var1.registerIcon("tnt_bottom");
|
||||||
|
}
|
||||||
|
}
|
||||||
14
src/net/minecraft/src/mml/CreativeTabs/CreativeTabDebug.java
Normal file
14
src/net/minecraft/src/mml/CreativeTabs/CreativeTabDebug.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package net.minecraft.src.mml.CreativeTabs;
|
||||||
|
|
||||||
|
import net.minecraft.src.Block;
|
||||||
|
import net.minecraft.src.CreativeTabs;
|
||||||
|
|
||||||
|
public final class CreativeTabDebug extends CreativeTabs {
|
||||||
|
public CreativeTabDebug(int var1, String var2) {
|
||||||
|
super(var1, var2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTabIconItemIndex() {
|
||||||
|
return Block.test.blockID;
|
||||||
|
}
|
||||||
|
}
|
||||||
93
src/net/minecraft/src/mml/Entities/EntityNukePrimed.java
Normal file
93
src/net/minecraft/src/mml/Entities/EntityNukePrimed.java
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
package net.minecraft.src.mml.Entities;
|
||||||
|
|
||||||
|
import net.minecraft.src.Entity;
|
||||||
|
import net.minecraft.src.EntityLiving;
|
||||||
|
import net.minecraft.src.NBTTagCompound;
|
||||||
|
import net.minecraft.src.World;
|
||||||
|
|
||||||
|
public class EntityNukePrimed extends Entity {
|
||||||
|
private EntityLiving tntPlacedBy;
|
||||||
|
public int fuse;
|
||||||
|
|
||||||
|
public EntityNukePrimed(World gameWorld) {
|
||||||
|
super(gameWorld);
|
||||||
|
this.preventEntitySpawning = true;
|
||||||
|
this.setSize(0.98F, 0.98F);
|
||||||
|
this.yOffset = this.height / 2.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityNukePrimed(World gameWorld, double X, double Y, double Z, EntityLiving entityLiving) {
|
||||||
|
this(gameWorld);
|
||||||
|
this.setPosition(X, Y, Z);
|
||||||
|
float var9 = (float)(Math.random() * (double)((float)Math.PI) * 2.0D);
|
||||||
|
this.motionX = (double)(-((float)Math.sin((double)var9)) * 0.02F);
|
||||||
|
this.motionY = (double)0.2F;
|
||||||
|
this.motionZ = (double)(-((float)Math.cos((double)var9)) * 0.02F);
|
||||||
|
this.prevPosX = X;
|
||||||
|
this.prevPosY = Y;
|
||||||
|
this.prevPosZ = Z;
|
||||||
|
this.tntPlacedBy = entityLiving;
|
||||||
|
|
||||||
|
this.fuse = 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void entityInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean canTriggerWalking() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canBeCollidedWith() {
|
||||||
|
return !this.isDead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onUpdate() {
|
||||||
|
this.prevPosX = this.posX; // get the position and set it
|
||||||
|
this.prevPosY = this.posY;
|
||||||
|
this.prevPosZ = this.posZ;
|
||||||
|
|
||||||
|
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||||
|
|
||||||
|
this.motionX *= (double)0.98F;
|
||||||
|
this.motionY *= (double)0.98F;
|
||||||
|
this.motionZ *= (double)0.98F;
|
||||||
|
|
||||||
|
if (this.onGround) {
|
||||||
|
this.motionX *= (double)0.7F;
|
||||||
|
this.motionZ *= (double)0.7F;
|
||||||
|
|
||||||
|
this.motionY *= -0.5D;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.fuse-- <= 0) {
|
||||||
|
this.setDead();
|
||||||
|
|
||||||
|
if (!this.worldObj.isRemote) {
|
||||||
|
this.explode();
|
||||||
|
} else {
|
||||||
|
this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ , 0.0D, 0.0D, 0.0D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void explode() {
|
||||||
|
float explosionPower = 40.0F;
|
||||||
|
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, explosionPower, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void writeEntityToNBT(NBTTagCompound var1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void readEntityFromNBT(NBTTagCompound var1) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getShadowSize() {
|
||||||
|
return 0.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityLiving getTntPlacedBy() {
|
||||||
|
return this.tntPlacedBy;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user