This commit is contained in:
HoosierTransfer 2024-06-16 12:59:45 -04:00
parent 506e07dd61
commit 7ddf8b8882
40 changed files with 46237 additions and 1369900 deletions

View File

@ -23,7 +23,7 @@ dependencies {
}
teavm.js {
obfuscated = false
obfuscated = true
sourceMap = false
targetFileName = "../classes.js"
optimization = org.teavm.gradle.api.OptimizationLevel.AGGRESSIVE

File diff suppressed because one or more lines are too long

BIN
javascript/v0.5.0-web.zip Normal file

Binary file not shown.

View File

@ -0,0 +1,8 @@
{
"variants": {
"age=0": { "model": "frosted_ice_0" },
"age=1": { "model": "frosted_ice_1" },
"age=2": { "model": "frosted_ice_2" },
"age=3": { "model": "frosted_ice_3" }
}
}

View File

@ -1205,6 +1205,7 @@ tile.woolCarpet.magenta.name=Magenta Carpet
tile.woolCarpet.orange.name=Orange Carpet
tile.woolCarpet.white.name=Carpet
tile.ice.name=Ice
tile.frostedIce.name=Frosted Ice
tile.icePacked.name=Packed Ice
tile.cactus.name=Cactus
tile.clay.name=Clay
@ -1544,6 +1545,7 @@ item.skull.zombie.name=Zombie Head
item.skull.char.name=Head
item.skull.player.name=%s's Head
item.skull.creeper.name=Creeper Head
item.skull.dragon.name=Dragon Head
item.carrotOnAStick.name=Carrot on a Stick
item.netherStar.name=Nether Star
item.pumpkinPie.name=Pumpkin Pie
@ -1771,6 +1773,10 @@ potion.wither=Wither
potion.healthBoost=Health Boost
potion.absorption=Absorption
potion.saturation=Saturation
potion.glowing=Glowing
potion.luck=Luck
potion.unluck=Bad Luck
potion.levitation=Levitation
potion.moveSpeed.postfix=Potion of Swiftness
potion.moveSlowdown.postfix=Potion of Slowness
@ -1848,6 +1854,7 @@ enchantment.protect.projectile=Projectile Protection
enchantment.oxygen=Respiration
enchantment.waterWorker=Aqua Affinity
enchantment.waterWalker=Depth Strider
enchantment.frostWalker=Frost Walker
enchantment.digging=Efficiency
enchantment.untouching=Silk Touch
enchantment.durability=Unbreaking
@ -1860,6 +1867,7 @@ enchantment.arrowFire=Flame
enchantment.arrowKnockback=Punch
enchantment.arrowInfinite=Infinity
enchantment.thorns=Thorns
enchantment.mending=Mending
enchantment.level.1=I
enchantment.level.2=II
@ -3166,6 +3174,8 @@ tile.purpurSlab.name=Purpur Slab
tile.purpurSlab.default.name=Purpur Slab
tile.purpurStairs.name=Purpur Stairs
tile.endRod.name=End Rod
tile.chorusPlant.name=Chorus Plant
tile.chorusFlower.name=Chorus Flower
tile.grassPath.name=Grass Path
tile.endBricks.name=End Stone Bricks

View File

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "blocks/frosted_ice_0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "blocks/frosted_ice_1"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "blocks/frosted_ice_2"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "blocks/frosted_ice_3"
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/entity",
"display": {
"thirdperson": {
"rotation": [ 180, -45, 0 ],
"translation": [ 0, 1, -2.5 ],
"scale": [ 0.25, 0.25, 0.25 ]
},
"firstperson": {
"rotation": [ 0, -180, 0 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"gui": {
"rotation": [ 0, 180, 0 ],
"scale": [ 0.4, 0.4, 0.4 ]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

View File

@ -16,14 +16,21 @@ import javax.swing.UIManager;
/**
* Copyright (c) 2024 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
@ -38,7 +45,7 @@ public class FilesystemConvertingDialog extends JFrame {
setIconImage(Toolkit.getDefaultToolkit().getImage("icon32.png"));
setResizable(false);
setAlwaysOnTop(true);
setTitle("EaglercraftX 1.8");
setTitle("EaglercraftL 1.9");
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
setBounds(100, 100, 420, 100);
contentPane = new JPanel();

View File

@ -24,14 +24,21 @@ import javax.swing.JSeparator;
/**
* Copyright (c) 2022 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
@ -60,7 +67,7 @@ public class LaunchRenderDocDialog extends JDialog {
System.exit(0);
}
});
setTitle("EaglercraftX: " + ManagementFactory.getRuntimeMXBean().getName());
setTitle("EaglercraftL: " + ManagementFactory.getRuntimeMXBean().getName());
setResizable(false);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBackground(Color.WHITE);

View File

@ -13,14 +13,21 @@ import javax.swing.ScrollPaneConstants;
/**
* Copyright (c) 2024 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
@ -36,7 +43,7 @@ public class MainMenuCreditsDialog extends JFrame {
*/
public MainMenuCreditsDialog() {
setIconImage(Toolkit.getDefaultToolkit().getImage("icon32.png"));
setTitle("EaglercraftX 1.8 Credits");
setTitle("EaglercraftL 1.9 Credits");
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
setBounds(100, 100, 850, 700);
setLocationByPlatform(true);
@ -56,13 +63,13 @@ public class MainMenuCreditsDialog extends JFrame {
textArea.setWrapStyleWord(true);
String[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
Font daFont = null;
for(int i = 0; i < fonts.length; ++i) {
if(fonts[i].equalsIgnoreCase("consolas")) {
for (int i = 0; i < fonts.length; ++i) {
if (fonts[i].equalsIgnoreCase("consolas")) {
daFont = new Font(fonts[i], Font.PLAIN, 15);
break;
}
}
if(daFont == null) {
if (daFont == null) {
daFont = new Font(Font.MONOSPACED, Font.PLAIN, 15);
}
textArea.setFont(daFont);

View File

@ -13,14 +13,21 @@ import java.awt.Color;
/**
* Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
@ -40,7 +47,7 @@ public class CrashScreenPopup extends JFrame {
setIconImage(Toolkit.getDefaultToolkit().getImage("icon32.png"));
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
setAlwaysOnTop(true);
setTitle("EaglercraftX Integrated Server");
setTitle("EaglercraftL Integrated Server");
setBounds(100, 100, 900, 600);
setLocationByPlatform(true);
contentPane = new JPanel();

View File

@ -34,7 +34,7 @@ public class EaglercraftVersion {
// public key modulus for official 1.8 updates
public static final BigInteger updateSignatureModulus = new BigInteger(
"12088549851624177860210943411753655526838509034327995616720692424931008612895944876178950804800321958658462759341402746623561871401936016063273640247854365676101972751135312958392926810145663068155970896641899900239550667101300685784386254169669408095656719430822905698686750635336744968457512771731599692858855652595492376493019401900777022004925137632047976612790150686906616724035637000868200868976467177296602193750297858734359875260209443581507599782350356643360703727081218369273052261747935073314281655275443613909971524354128310805834911244411349268175047406262508184956239724493043763824375071966003574715449");
"9934844152704206425984038360710846195785255499658630347555679233517037320419089417353684680137701223265944443284321705629368787894053054988233896240570752560271396448764359123258518818693879688207544671033079915029195517675413202427147319375331350380376604266826560830299822638274516845927247015696509586216934495843289602444650044805651410710164106192952455213102521880119736500301420208590760465989706511018182601545217390196438291842825959549203290633490664834390313090964927686415922400638755956780717898579080985306487440294133874610155281675147758926351882699414541707391045631732309999601681661304360813629331");
// Miscellaneous variables:

View File

@ -1686,6 +1686,9 @@ public class Block implements ILitBlock {
.setUnlocalizedName("grassPath").disableStats();
registerEaglerBlock(208, "grass_path", grassPath);
registerEaglerBlock(212, "frosted_ice", (new BlockFrostedIce()).setHardness(0.5F).setLightOpacity(3)
.setStepSound(soundTypeGlass).setUnlocalizedName("frostedIce"), false);
blockRegistry.validateKey();
for (Block block13 : blockRegistry) {

View File

@ -0,0 +1,104 @@
package net.minecraft.block;
import javax.annotation.Nullable;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class BlockFrostedIce extends BlockIce {
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 3);
public BlockFrostedIce() {
this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0)));
}
/**
* Convert the BlockState into the correct metadata value
*/
public int getMetaFromState(IBlockState state) {
return ((Integer) state.getValue(AGE)).intValue();
}
/**
* Convert the given metadata into a BlockState for this Block
*/
public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(AGE, Integer.valueOf(MathHelper.clamp_int(meta, 0, 3)));
}
public void updateTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand) {
if ((rand.nextInt(3) == 0 || this.countNeighbors(worldIn, pos) < 4) && worldIn.getLightFromNeighbors(pos) > 11
- ((Integer) state.getValue(AGE)).intValue() - state.getBlock().getLightOpacity()) {
this.slightlyMelt(worldIn, pos, state, rand, true);
} else {
worldIn.scheduleUpdate(pos, this, MathHelper.getRandomIntegerInRange(rand, 20, 40));
}
}
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_) {
if (p_189540_4_ == this) {
int i = this.countNeighbors(p_189540_2_, p_189540_3_);
if (i < 2) {
this.turnIntoWater(p_189540_2_, p_189540_3_);
}
}
}
private int countNeighbors(World p_185680_1_, BlockPos p_185680_2_) {
int i = 0;
for (EnumFacing enumfacing : EnumFacing.values()) {
if (p_185680_1_.getBlockState(p_185680_2_.offset(enumfacing)).getBlock() == this) {
++i;
if (i >= 4) {
return i;
}
}
}
return i;
}
protected void slightlyMelt(World p_185681_1_, BlockPos p_185681_2_, IBlockState p_185681_3_,
EaglercraftRandom p_185681_4_,
boolean p_185681_5_) {
int i = ((Integer) p_185681_3_.getValue(AGE)).intValue();
if (i < 3) {
p_185681_1_.setBlockState(p_185681_2_, p_185681_3_.withProperty(AGE, Integer.valueOf(i + 1)), 2);
p_185681_1_.scheduleUpdate(p_185681_2_, this, MathHelper.getRandomIntegerInRange(p_185681_4_, 20, 40));
} else {
this.turnIntoWater(p_185681_1_, p_185681_2_);
if (p_185681_5_) {
for (EnumFacing enumfacing : EnumFacing.values()) {
BlockPos blockpos = p_185681_2_.offset(enumfacing);
IBlockState iblockstate = p_185681_1_.getBlockState(blockpos);
if (iblockstate.getBlock() == this) {
this.slightlyMelt(p_185681_1_, blockpos, iblockstate, p_185681_4_, false);
}
}
}
}
}
protected BlockState createBlockState() {
return new BlockState(this, new IProperty[] { AGE });
}
@Nullable
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) {
return null;
}
}

View File

@ -90,15 +90,20 @@ public class BlockIce extends BlockBreakable {
return 0;
}
public void updateTick(World world, BlockPos blockpos, IBlockState var3, EaglercraftRandom var4) {
if (world.getLightFor(EnumSkyBlock.BLOCK, blockpos) > 11 - this.getLightOpacity()) {
if (world.provider.doesWaterVaporize()) {
world.setBlockToAir(blockpos);
} else {
this.dropBlockAsItem(world, blockpos, world.getBlockState(blockpos), 0);
world.setBlockState(blockpos, Blocks.water.getDefaultState());
public void updateTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand) {
if (worldIn.getLightFor(EnumSkyBlock.BLOCK, pos) > 11 - this.getDefaultState().getBlock().getLightOpacity()) {
this.turnIntoWater(worldIn, pos);
}
}
protected void turnIntoWater(World worldIn, BlockPos pos) {
if (worldIn.provider.doesWaterVaporize()) {
worldIn.setBlockToAir(pos);
} else {
this.dropBlockAsItem(worldIn, pos, worldIn.getBlockState(pos), 0);
worldIn.setBlockState(pos, Blocks.water.getDefaultState());
worldIn.notifyBlockOfStateChange(pos, Blocks.water);
}
}
public int getMobilityFlag() {

View File

@ -1,5 +1,6 @@
package net.minecraft.block;
import net.hoosiertransfer.EaglerItems;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.minecraft.block.material.Material;
@ -95,7 +96,8 @@ public class BlockReed extends Block {
EnumFacing enumfacing = facings[i];
down = blockpos.offsetEvenFaster(enumfacing, down);
--down.y;
if (world.getBlockState(down).getBlock().getMaterial() == Material.water) {
if (world.getBlockState(down).getBlock().getMaterial() == Material.water
|| world.getBlockState(down).getBlock() == EaglerItems.getEaglerBlock("frosted_ice")) {
return true;
}
}

View File

@ -544,7 +544,7 @@ public class Minecraft implements IThreadListener {
private void createDisplay() {
Display.create();
Display.setTitle("Eaglercraft 1.8.8");
Display.setTitle("Eaglercraft 1.9.4");
}
private static boolean isJvm64bit() {

View File

@ -0,0 +1,60 @@
package net.minecraft.client.model;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.entity.Entity;
public class ModelDragonHead extends ModelBase {
private ModelRenderer head;
private ModelRenderer jaw;
public ModelDragonHead(float p_i46588_1_) {
this.textureWidth = 256;
this.textureHeight = 256;
this.setTextureOffset("body.body", 0, 0);
this.setTextureOffset("wing.skin", -56, 88);
this.setTextureOffset("wingtip.skin", -56, 144);
this.setTextureOffset("rearleg.main", 0, 0);
this.setTextureOffset("rearfoot.main", 112, 0);
this.setTextureOffset("rearlegtip.main", 196, 0);
this.setTextureOffset("head.upperhead", 112, 30);
this.setTextureOffset("wing.bone", 112, 88);
this.setTextureOffset("head.upperlip", 176, 44);
this.setTextureOffset("jaw.jaw", 176, 65);
this.setTextureOffset("frontleg.main", 112, 104);
this.setTextureOffset("wingtip.bone", 112, 136);
this.setTextureOffset("frontfoot.main", 144, 104);
this.setTextureOffset("neck.box", 192, 104);
this.setTextureOffset("frontlegtip.main", 226, 138);
this.setTextureOffset("body.scale", 220, 53);
this.setTextureOffset("head.scale", 0, 0);
this.setTextureOffset("neck.scale", 48, 0);
this.setTextureOffset("head.nostril", 112, 0);
float f = -16.0F;
this.head = new ModelRenderer(this, "head");
this.head.addBox("upperlip", -6.0F, -1.0F, -8.0F + f, 12, 5, 16);
this.head.addBox("upperhead", -8.0F, -8.0F, 6.0F + f, 16, 16, 16);
this.head.mirror = true;
this.head.addBox("scale", -5.0F, -12.0F, 12.0F + f, 2, 4, 6);
this.head.addBox("nostril", -5.0F, -3.0F, -6.0F + f, 2, 2, 4);
this.head.mirror = false;
this.head.addBox("scale", 3.0F, -12.0F, 12.0F + f, 2, 4, 6);
this.head.addBox("nostril", 3.0F, -3.0F, -6.0F + f, 2, 2, 4);
this.jaw = new ModelRenderer(this, "jaw");
this.jaw.setRotationPoint(0.0F, 4.0F, 8.0F + f);
this.jaw.addBox("jaw", -6.0F, 0.0F, -16.0F, 12, 4, 16);
this.head.addChild(this.jaw);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
float headPitch, float scale) {
this.jaw.rotateAngleX = (float) (Math.sin((double) (limbSwing * (float) Math.PI * 0.2F)) + 1.0D) * 0.2F;
this.head.rotateAngleY = netHeadYaw * 0.017453292F;
this.head.rotateAngleX = headPitch * 0.017453292F;
GlStateManager.translate(0.0F, -0.374375F, 0.0F);
GlStateManager.scale(0.75F, 0.75F, 0.75F);
this.head.render(scale);
}
}

View File

@ -1051,6 +1051,7 @@ public class RenderItem implements IResourceManagerReloadListener {
this.registerItem(Items.skull, 2, "skull_zombie");
this.registerItem(Items.skull, 3, "skull_char");
this.registerItem(Items.skull, 4, "skull_creeper");
this.registerItem(Items.skull, 5, "skull_dragon");
this.registerItem(Items.carrot_on_a_stick, "carrot_on_a_stick");
this.registerItem(Items.nether_star, "nether_star");
this.registerItem(Items.pumpkin_pie, "pumpkin_pie");

View File

@ -113,7 +113,7 @@ public class LayerCustomHead implements LayerRenderer<EntityLivingBase> {
}
TileEntitySkullRenderer.instance.renderSkull(-0.5F, 0.0F, -0.5F, EnumFacing.UP, 180.0F,
itemstack.getMetadata(), gameprofile, -1);
itemstack.getMetadata(), gameprofile, -1, var2);
}
GlStateManager.popMatrix();

View File

@ -78,7 +78,7 @@ public class TileEntityItemStackRenderer {
GlStateManager.scale(2.0F, 2.0F, 2.0F);
GlStateManager.disableCull();
TileEntitySkullRenderer.instance.renderSkull(0.0F, 0.0F, 0.0F, EnumFacing.UP, 0.0F,
itemStackIn.getMetadata(), gameprofile, -1);
itemStackIn.getMetadata(), gameprofile, -1, 0.0F);
GlStateManager.enableCull();
GlStateManager.popMatrix();
}

View File

@ -5,6 +5,8 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelDragonHead;
import net.minecraft.client.model.ModelHumanoidHead;
import net.minecraft.client.model.ModelSkeletonHead;
import net.minecraft.client.network.NetHandlerPlayClient;
@ -51,6 +53,9 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
private static final ResourceLocation ZOMBIE_TEXTURES = new ResourceLocation("textures/entity/zombie/zombie.png");
private static final ResourceLocation CREEPER_TEXTURES = new ResourceLocation(
"textures/entity/creeper/creeper.png");
private static final ResourceLocation DRAGON_TEXTURES = new ResourceLocation(
"textures/entity/enderdragon/dragon.png");
private final ModelDragonHead dragonHead = new ModelDragonHead(0.0F);
public static TileEntitySkullRenderer instance;
private final ModelSkeletonHead skeletonHead = new ModelSkeletonHead(0, 0, 64, 32);
private final ModelSkeletonHead humanoidHead = new ModelHumanoidHead();
@ -58,9 +63,10 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
public void renderTileEntityAt(TileEntitySkull tileentityskull, double d0, double d1, double d2, float var8,
int i) {
EnumFacing enumfacing = EnumFacing.getFront(tileentityskull.getBlockMetadata() & 7);
float f = tileentityskull.getAnimationProgress(var8);
this.renderSkull((float) d0, (float) d1, (float) d2, enumfacing,
(float) (tileentityskull.getSkullRotation() * 360) / 16.0F, tileentityskull.getSkullType(),
tileentityskull.getPlayerProfile(), i);
tileentityskull.getPlayerProfile(), i, f);
}
public void setRendererDispatcher(TileEntityRendererDispatcher tileentityrendererdispatcher) {
@ -69,8 +75,8 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
}
public void renderSkull(float parFloat1, float parFloat2, float parFloat3, EnumFacing parEnumFacing,
float parFloat4, int parInt1, GameProfile parGameProfile, int parInt2) {
ModelSkeletonHead modelskeletonhead = this.skeletonHead;
float parFloat4, int parInt1, GameProfile parGameProfile, int parInt2, float animateTicks) {
ModelBase modelskeletonhead = this.skeletonHead;
if (parInt2 >= 0) {
this.bindTexture(DESTROY_STAGES[parInt2]);
GlStateManager.matrixMode(GL_TEXTURE);
@ -104,6 +110,10 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
break;
case 4:
this.bindTexture(CREEPER_TEXTURES);
break;
case 5:
this.bindTexture(DRAGON_TEXTURES);
modelskeletonhead = this.dragonHead;
}
}
@ -135,7 +145,11 @@ public class TileEntitySkullRenderer extends TileEntitySpecialRenderer<TileEntit
GlStateManager.enableRescaleNormal();
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
GlStateManager.enableAlpha();
if (parInt1 == 5) {
modelskeletonhead.render((Entity) null, animateTicks, 0.0F, 0.0F, parFloat4, 0.0F, f);
} else {
modelskeletonhead.render((Entity) null, 0.0F, 0.0F, 0.0F, parFloat4, 0.0F, f);
}
GlStateManager.popMatrix();
if (parInt2 >= 0) {
GlStateManager.matrixMode(GL_TEXTURE);

View File

@ -399,7 +399,8 @@ public class ModelBakery {
this.variantNames.put(Items.potionitem,
Lists.newArrayList(new String[] { "bottle_drinkable", "bottle_splash" }));
this.variantNames.put(Items.skull, Lists.newArrayList(
new String[] { "skull_skeleton", "skull_wither", "skull_zombie", "skull_char", "skull_creeper" }));
new String[] { "skull_skeleton", "skull_wither", "skull_zombie", "skull_char", "skull_creeper",
"skull_dragon" }));
this.variantNames.put(Item.getItemFromBlock(Blocks.oak_fence_gate),
Lists.newArrayList(new String[] { "oak_fence_gate" }));
this.variantNames.put(Item.getItemFromBlock(Blocks.oak_fence),

View File

@ -3,6 +3,9 @@ package net.minecraft.enchantment;
import java.util.ArrayList;
import java.util.Map;
import java.util.Set;
import java.util.List;
import javax.annotation.Nullable;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
@ -76,6 +79,10 @@ public abstract class Enchantment {
public static final Enchantment thorns = new EnchantmentThorns(7, new ResourceLocation("thorns"), 1);
public static final Enchantment depthStrider = new EnchantmentWaterWalker(8, new ResourceLocation("depth_strider"),
2);
public static final Enchantment frostWalker = new EnchantmentFrostWalker(9, new ResourceLocation("frost_walker"),
2);
public static final Enchantment sharpness = new EnchantmentDamage(16, new ResourceLocation("sharpness"), 10, 0);
public static final Enchantment smite = new EnchantmentDamage(17, new ResourceLocation("smite"), 5, 1);
public static final Enchantment baneOfArthropods = new EnchantmentDamage(18,
@ -144,6 +151,7 @@ public abstract class Enchantment {
public static final Enchantment lure = new EnchantmentFishingSpeed(62, new ResourceLocation("lure"), 2,
EnumEnchantmentType.FISHING_ROD);
public static final Enchantment mending = new EnchantmentMending(70, new ResourceLocation("mending"), 2);
public final int effectId;
private final int weight;
public EnumEnchantmentType type;
@ -181,6 +189,20 @@ public abstract class Enchantment {
return locationEnchantments.keySet();
}
@Nullable
public Iterable<ItemStack> getEntityEquipment(EntityLivingBase entityIn) {
List<ItemStack> list = Lists.<ItemStack>newArrayList();
for (int i = 0; i < 5; ++i) {
ItemStack itemstack = entityIn.getEquipmentInSlot(i);
if (itemstack != null && this.type.canEnchantItem(itemstack.getItem())) {
list.add(itemstack);
}
}
return list.size() > 0 ? list : null;
}
/**
* +
* Retrieves the weight value of an Enchantment. This weight

View File

@ -0,0 +1,80 @@
package net.minecraft.enchantment;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class EnchantmentFrostWalker extends Enchantment {
protected EnchantmentFrostWalker(int parInt1, ResourceLocation parResourceLocation, int parInt2) {
super(parInt1, parResourceLocation, parInt2, EnumEnchantmentType.ARMOR_FEET);
this.setName("frostWalker");
}
public int getMinEnchantability(int enchantmentLevel) {
return enchantmentLevel * 10;
}
public int getMaxEnchantability(int enchantmentLevel) {
return this.getMinEnchantability(enchantmentLevel) + 15;
}
public boolean isTreasureEnchantment() {
return true;
}
public int getMaxLevel() {
return 2;
}
public static void freezeNearby(EntityLivingBase living, World worldIn, BlockPos pos, int level) {
if (living.onGround) {
float f = (float) Math.min(16, 2 + level);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(0, 0, 0);
for (BlockPos.MutableBlockPos blockpos$mutableblockpos1 : BlockPos.getAllInBoxMutable(
pos.add((double) (-f), -1.0D, (double) (-f)), pos.add((double) f, -1.0D, (double) f))) {
if (blockpos$mutableblockpos1.distanceSqToCenter(living.posX, living.posY,
living.posZ) <= (double) (f * f)) {
blockpos$mutableblockpos.setPos(blockpos$mutableblockpos1.getX(),
blockpos$mutableblockpos1.getY() + 1,
blockpos$mutableblockpos1.getZ());
IBlockState iblockstate = worldIn.getBlockState(blockpos$mutableblockpos);
if (iblockstate.getBlock() == Blocks.air) {
IBlockState iblockstate1 = worldIn.getBlockState(blockpos$mutableblockpos1);
if (iblockstate1.getBlock().getMaterial() == Material.water
&& ((Integer) iblockstate1.getValue(BlockLiquid.LEVEL)).intValue() == 0
&& worldIn.canBlockBePlaced(EaglerItems.getEaglerBlock("frosted_ice"),
blockpos$mutableblockpos1, false,
EnumFacing.DOWN, (Entity) null, (ItemStack) null)) {
worldIn.setBlockState(blockpos$mutableblockpos1,
EaglerItems.getEaglerBlock("frosted_ice").getDefaultState());
worldIn.scheduleUpdate(blockpos$mutableblockpos1.toImmutable(),
EaglerItems.getEaglerBlock("frosted_ice"),
MathHelper.getRandomIntegerInRange(living.getRNG(), 60, 120));
}
}
}
}
}
}
/**
* Determines if the enchantment passed can be applyied together with this
* enchantment.
*/
public boolean canApplyTogether(Enchantment ench) {
return super.canApplyTogether(ench) && ench != Enchantment.depthStrider;
}
}

View File

@ -6,6 +6,9 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import com.google.common.collect.Lists;
@ -168,6 +171,26 @@ public class EnchantmentHelper {
}
}
public static int getMaxEnchantmentLevel(Enchantment p_185284_0_, EntityLivingBase p_185284_1_) {
Iterable<ItemStack> iterable = p_185284_0_.getEntityEquipment(p_185284_1_);
if (iterable == null) {
return 0;
} else {
int i = 0;
for (ItemStack itemstack : iterable) {
int j = getEnchantmentLevel(p_185284_0_.effectId, itemstack);
if (j > i) {
i = j;
}
}
return i;
}
}
/**
* +
* Executes the enchantment modifier on the ItemStack passed.
@ -395,16 +418,37 @@ public class EnchantmentHelper {
return getMaxEnchantmentLevel(Enchantment.aquaAffinity.effectId, player.getInventory()) > 0;
}
public static ItemStack getEnchantedItem(Enchantment parEnchantment, EntityLivingBase parEntityLivingBase) {
ItemStack[] stacks = parEntityLivingBase.getInventory();
for (int k = 0; k < stacks.length; ++k) {
ItemStack itemstack = stacks[k];
if (itemstack != null && getEnchantmentLevel(parEnchantment.effectId, itemstack) > 0) {
return itemstack;
// public static ItemStack getEnchantedItem(Enchantment parEnchantment,
// EntityLivingBase parEntityLivingBase) {
// ItemStack[] stacks = parEntityLivingBase.getInventory();
// for (int k = 0; k < stacks.length; ++k) {
// ItemStack itemstack = stacks[k];
// if (itemstack != null && getEnchantmentLevel(parEnchantment.effectId,
// itemstack) > 0) {
// return itemstack;
// }
// }
// return null;
// }
@Nullable
public static ItemStack getEnchantedItem(Enchantment p_92099_0_, EntityLivingBase p_92099_1_) {
Iterable<ItemStack> iterable = p_92099_0_.getEntityEquipment(p_92099_1_);
if (iterable == null) {
return null;
} else {
List<ItemStack> list = Lists.<ItemStack>newArrayList();
for (ItemStack itemstack : iterable) {
if (itemstack != null && getEnchantmentLevel(p_92099_0_.effectId, itemstack) > 0) {
list.add(itemstack);
}
}
return null;
return list.isEmpty() ? null : (ItemStack) list.get(p_92099_1_.getRNG().nextInt(list.size()));
}
}
/**

View File

@ -1,5 +1,6 @@
package net.minecraft.entity;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Maps;
@ -17,6 +18,8 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentFrostWalker;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
@ -166,6 +169,9 @@ public abstract class EntityLivingBase extends Entity {
private int jumpTicks;
private float absorptionAmount;
/** The BlockPos the entity had during the previous tick. */
private BlockPos prevBlockpos;
/**
* +
* Called by the /kill command.
@ -282,6 +288,15 @@ public abstract class EntityLivingBase extends Entity {
} else {
this.setAir(300);
}
if (!this.worldObj.isRemote) {
BlockPos blockpos = new BlockPos(this);
if (!Objects.equal(this.prevBlockpos, blockpos)) {
this.prevBlockpos = blockpos;
this.frostWalk(blockpos);
}
}
}
if (this.isEntityAlive() && this.isWet()) {
@ -328,6 +343,14 @@ public abstract class EntityLivingBase extends Entity {
this.worldObj.theProfiler.endSection();
}
protected void frostWalk(BlockPos pos) {
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.frostWalker, this);
if (i > 0) {
EnchantmentFrostWalker.freezeNearby(this, this.worldObj, pos, i);
}
}
/**
* +
* If Animal, checks if the age timer is negative

View File

@ -672,6 +672,12 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting {
protected void updateFallState(double y, boolean onGroundIn, Block blockIn, BlockPos pos) {
}
protected void frostWalk(BlockPos pos) {
if (!this.isSpectator()) {
super.frostWalk(pos);
}
}
/**
* +
* process player falling based on movement packet

View File

@ -49,7 +49,8 @@ import net.minecraft.world.World;
*
*/
public class ItemSkull extends Item {
private static final String[] skullTypes = new String[] { "skeleton", "wither", "zombie", "char", "creeper" };
private static final String[] skullTypes = new String[] { "skeleton", "wither", "zombie", "char", "creeper",
"dragon" };
public ItemSkull() {
this.setCreativeTab(CreativeTabs.tabDecorations);

View File

@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.util.ITickable;
import net.minecraft.util.StringUtils;
/**
@ -38,10 +39,12 @@ import net.minecraft.util.StringUtils;
* POSSIBILITY OF SUCH DAMAGE.
*
*/
public class TileEntitySkull extends TileEntity {
public class TileEntitySkull extends TileEntity implements ITickable {
private int skullType;
private int skullRotation;
private GameProfile playerProfile = null;
private int dragonAnimatedTicks;
private boolean dragonAnimated;
public void writeToNBT(NBTTagCompound nbttagcompound) {
super.writeToNBT(nbttagcompound);
@ -90,6 +93,24 @@ public class TileEntitySkull extends TileEntity {
return new S35PacketUpdateTileEntity(this.pos, 4, nbttagcompound);
}
/**
* Like the old updateEntity(), except more generic.
*/
public void update() {
if (this.skullType == 5) {
if (this.worldObj.isBlockPowered(this.pos)) {
this.dragonAnimated = true;
++this.dragonAnimatedTicks;
} else {
this.dragonAnimated = false;
}
}
}
public float getAnimationProgress(float p_184295_1_) {
return this.dragonAnimated ? (float) this.dragonAnimatedTicks + p_184295_1_ : (float) this.dragonAnimatedTicks;
}
public void setType(int type) {
this.skullType = type;
this.playerProfile = null;