1
0
Fork 0

pre 1.9 protocol

This commit is contained in:
HoosierTransfer 2024-05-02 15:08:36 -04:00
parent f921826413
commit 7b232a057e
46 changed files with 1402689 additions and 96763 deletions

View File

@ -0,0 +1,12 @@
{
"variants": {
"age=0": { "model": "beetroots_stage0" },
"age=1": { "model": "beetroots_stage0" },
"age=2": { "model": "beetroots_stage1" },
"age=3": { "model": "beetroots_stage1" },
"age=4": { "model": "beetroots_stage2" },
"age=5": { "model": "beetroots_stage2" },
"age=6": { "model": "beetroots_stage2" },
"age=7": { "model": "beetroots_stage3" }
}
}

View File

@ -1,5 +1,5 @@
{
"variants": {
"normal": { "model": "purpur_block" }
"variant=default": { "model": "purpur_block" }
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/crop",
"textures": {
"crop": "blocks/beetroots_stage_0"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/crop",
"textures": {
"crop": "blocks/beetroots_stage_1"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/crop",
"textures": {
"crop": "blocks/beetroots_stage_2"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "block/crop",
"textures": {
"crop": "blocks/beetroots_stage_3"
}
}

View File

@ -0,0 +1,5 @@
[LocalizedFileNames]
beetroots_stage1.json=@beetroots_stage1.json,0
beetroots_stage2.json=@beetroots_stage2.json,0
beetroots_stage3.json=@beetroots_stage3.json,0
beetroots_stage0.json=@beetroots_stage0.json,0

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/beetroot"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/beetroot_seeds"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/beetroot_soup"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -2.5 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/chorus_fruit"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/chorus_fruit_popped"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

View File

@ -3,3 +3,7 @@ purpur_pillar.png=@purpur_pillar.png,0
purpur_pillar_top.png=@purpur_pillar_top.png,0
purpur_block.png=@purpur_block.png,0
end_stone_bricks.png=@end_stone_bricks.png,0
beetroots_stage1.png=@beetroots_stage1.png,0
beetroots_stage2.png=@beetroots_stage2.png,0
beetroots_stage3.png=@beetroots_stage3.png,0
beetroots_stage0.png=@beetroots_stage0.png,0

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,2 @@
[LocalizedFileNames]
beetroot_soup.png=@beetroot_soup.png,0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
package net.hoosiertransfer;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
@ -7,17 +10,31 @@ public class EaglerCustomBlock {
private final Block block;
private final BlockSlab slabDouble;
private final boolean isSlab;
private final List<String> variants;
private final boolean hasItem;
public EaglerCustomBlock(Block block) {
this.block = block;
this.isSlab = false;
this.slabDouble = null;
this.variants = new ArrayList<>();
this.hasItem = true;
}
public EaglerCustomBlock(BlockSlab slabHalf, BlockSlab slabDouble) {
public EaglerCustomBlock(BlockSlab slabHalf, BlockSlab slabDouble, List<String> variants) {
this.block = (Block) slabHalf;
this.slabDouble = slabDouble;
this.isSlab = true;
this.variants = variants;
this.hasItem = true;
}
public EaglerCustomBlock(Block block, boolean hasItem) {
this.block = block;
this.isSlab = false;
this.slabDouble = null;
this.variants = new ArrayList<>();
this.hasItem = hasItem;
}
public Block getBlock() {
@ -31,4 +48,12 @@ public class EaglerCustomBlock {
public boolean isSlab() {
return isSlab;
}
public List<String> getVariants() {
return variants;
}
public boolean hasItem() {
return hasItem;
}
}

View File

@ -17,8 +17,12 @@ public class EaglerItems {
blockMap.put(id, new EaglerCustomBlock(block));
}
public static void registerEaglerSlab(String id, BlockSlab block, BlockSlab slabDouble) {
blockMap.put(id, new EaglerCustomBlock(block, slabDouble));
public static void registerEaglerBlock(String id, Block block, boolean hasItem) {
blockMap.put(id, new EaglerCustomBlock(block, hasItem));
}
public static void registerEaglerSlab(String id, BlockSlab block, BlockSlab slabDouble, List<String> variants) {
blockMap.put(id, new EaglerCustomBlock(block, slabDouble, variants));
}
public static void registerEaglerItem(String id, Item item) {
@ -26,12 +30,27 @@ public class EaglerItems {
}
public static EaglerCustomBlock getEaglerCustomBlock(String id) {
return blockMap.get(id);
EaglerCustomBlock customBlock = blockMap.get(id);
if (customBlock == null) {
throw new IllegalArgumentException("No such block: " + id);
}
return customBlock;
}
public static Block getEaglerBlock(String id) {
EaglerCustomBlock customBlock = blockMap.get(id);
return customBlock != null ? customBlock.getBlock() : null;
if (customBlock == null) {
throw new IllegalArgumentException("No such block: " + id);
}
return customBlock.getBlock();
}
public static Item getEaglerItem(String id) {
Item item = itemMap.get(id);
if (item == null) {
throw new IllegalArgumentException("No such item: " + id);
}
return item;
}
public static List<EaglerCustomBlock> getEaglerCustomBlocks() {

View File

@ -9,8 +9,8 @@ public class EaglercraftVersion {
/// Customize these to fit your fork:
public static final String projectForkName = "EaglerfastX";
public static final String projectForkVersion = "1.2.0";
public static final String projectForkName = "Eaglercraft Lambda";
public static final String projectForkVersion = "2.0.0";
public static final String projectForkVendor = "hoosiertransfer";
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";

View File

@ -1,5 +1,6 @@
package net.minecraft.block;
import java.util.Arrays;
import java.util.List;
import net.hoosiertransfer.EaglerItems;
@ -1648,17 +1649,16 @@ public class Block implements ILitBlock {
.setStepSound(soundTypeStone).setUnlocalizedName("purpurPillar"));
registerEaglerBlock(203, "purpur_stairs", (new BlockStairs(purpurBlock.getDefaultState()))
.setUnlocalizedName("stairsPurpur"));
// registerEaglerBlock(204, "purpur_double_slab", (new
// BlockPurpurSlab.Double()).setHardness(2.0F)
// .setResistance(10.0F).setStepSound(soundTypeStone).setUnlocalizedName("purpurSlab"));\
// registerEaglerBlock(205, "purpur_slab", (new
// BlockPurpurSlab.Half()).setHardness(2.0F).setResistance(10.0F)
// .setStepSound(soundTypeStone).setUnlocalizedName("purpurSlab"));
registerEaglerSlab(204, "purpur_double_slab", new BlockPurpurSlab.Double(),
registerEaglerSlab(204, "purpur_double_slab",
(BlockSlab) (new BlockPurpurSlab.Double()).setHardness(2.0F).setResistance(10.0F)
.setStepSound(soundTypeStone).setUnlocalizedName("purpurSlab"),
205, "purpur_slab",
new BlockPurpurSlab.Half());
(BlockSlab) (new BlockPurpurSlab.Half()).setHardness(2.0F).setResistance(10.0F)
.setStepSound(soundTypeStone).setUnlocalizedName("purpurSlab"),
"purpur_slab");
registerEaglerBlock(206, "end_bricks", (new Block(Material.rock)).setStepSound(soundTypeStone).setHardness(0.8F)
.setCreativeTab(CreativeTabs.tabBlock).setUnlocalizedName("endBricks"));
registerEaglerBlock(207, "beetroots", (new BlockBeetroot()).setUnlocalizedName("beetroots"), false);
blockRegistry.validateKey();
@ -1744,9 +1744,14 @@ public class Block implements ILitBlock {
registerBlock(id, textualID, block_);
}
private static void registerEaglerBlock(int id, String textualID, Block block_, boolean hasItem) {
EaglerItems.registerEaglerBlock(textualID, block_, hasItem);
registerBlock(id, textualID, block_);
}
private static void registerEaglerSlab(int id1, String textualID1, BlockSlab slabDouble, int id2, String textualID2,
BlockSlab slabHalf) {
EaglerItems.registerEaglerSlab(textualID1, slabHalf, slabDouble);
BlockSlab slabHalf, String... variants) {
EaglerItems.registerEaglerSlab(textualID2, slabHalf, slabDouble, Arrays.asList(variants));
registerBlock(id1, textualID1, slabDouble);
registerBlock(id2, textualID2, slabHalf);
}

View File

@ -0,0 +1,14 @@
package net.minecraft.block;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.item.Item;
public class BlockBeetroot extends BlockCrops {
protected Item getSeed() {
return EaglerItems.getEaglerItem("beetroot_seeds");
}
protected Item getCrop() {
return EaglerItems.getEaglerItem("beetroot");
}
}

View File

@ -50,19 +50,16 @@ import net.minecraft.world.World;
*
*/
public abstract class BlockPurpurSlab extends BlockSlab {
public static final PropertyBool SEAMLESS = PropertyBool.create("seamless");
public static PropertyEnum<BlockPurpurSlab.EnumType> VARIANT;
public BlockPurpurSlab() {
super(Material.rock);
IBlockState iblockstate = this.blockState.getBaseState();
if (this.isDouble()) {
iblockstate = iblockstate.withProperty(SEAMLESS, Boolean.valueOf(false));
} else {
if (!this.isDouble()) {
iblockstate = iblockstate.withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM);
}
this.setDefaultState(iblockstate.withProperty(VARIANT, BlockPurpurSlab.EnumType.STONE));
this.setDefaultState(iblockstate.withProperty(VARIANT, BlockPurpurSlab.EnumType.DEFAULT));
this.setCreativeTab(CreativeTabs.tabBlock);
}
@ -108,10 +105,8 @@ public abstract class BlockPurpurSlab extends BlockSlab {
BlockPurpurSlab.EnumType[] types = BlockPurpurSlab.EnumType.META_LOOKUP;
for (int i = 0; i < types.length; ++i) {
BlockPurpurSlab.EnumType BlockPurpurSlab$enumtype = types[i];
if (BlockPurpurSlab$enumtype != BlockPurpurSlab.EnumType.WOOD) {
list.add(new ItemStack(item, 1, BlockPurpurSlab$enumtype.getMetadata()));
}
}
}
}
@ -123,9 +118,7 @@ public abstract class BlockPurpurSlab extends BlockSlab {
public IBlockState getStateFromMeta(int i) {
IBlockState iblockstate = this.getDefaultState().withProperty(VARIANT,
BlockPurpurSlab.EnumType.byMetadata(i & 7));
if (this.isDouble()) {
iblockstate = iblockstate.withProperty(SEAMLESS, Boolean.valueOf((i & 8) != 0));
} else {
if (!this.isDouble()) {
iblockstate = iblockstate.withProperty(HALF,
(i & 8) == 0 ? BlockSlab.EnumBlockHalf.BOTTOM : BlockSlab.EnumBlockHalf.TOP);
}
@ -140,11 +133,7 @@ public abstract class BlockPurpurSlab extends BlockSlab {
public int getMetaFromState(IBlockState iblockstate) {
int i = 0;
i = i | ((BlockPurpurSlab.EnumType) iblockstate.getValue(VARIANT)).getMetadata();
if (this.isDouble()) {
if (((Boolean) iblockstate.getValue(SEAMLESS)).booleanValue()) {
i |= 8;
}
} else if (iblockstate.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP) {
if (!this.isDouble() && iblockstate.getValue(HALF) == BlockSlab.EnumBlockHalf.TOP) {
i |= 8;
}
@ -152,7 +141,7 @@ public abstract class BlockPurpurSlab extends BlockSlab {
}
protected BlockState createBlockState() {
return this.isDouble() ? new BlockState(this, new IProperty[] { SEAMLESS, VARIANT })
return this.isDouble() ? new BlockState(this, new IProperty[] { VARIANT })
: new BlockState(this, new IProperty[] { HALF, VARIANT });
}
@ -188,13 +177,9 @@ public abstract class BlockPurpurSlab extends BlockSlab {
}
public static enum EnumType implements IStringSerializable {
STONE(0, MapColor.stoneColor, "stone"), SAND(1, MapColor.sandColor, "sandstone", "sand"),
WOOD(2, MapColor.woodColor, "wood_old", "wood"), COBBLESTONE(3, MapColor.stoneColor, "cobblestone", "cobble"),
BRICK(4, MapColor.redColor, "brick"), SMOOTHBRICK(5, MapColor.stoneColor, "stone_brick", "smoothStoneBrick"),
NETHERBRICK(6, MapColor.netherrackColor, "nether_brick", "netherBrick"),
QUARTZ(7, MapColor.quartzColor, "quartz");
DEFAULT(0, MapColor.purpleColor, "default");
public static final BlockPurpurSlab.EnumType[] META_LOOKUP = new BlockPurpurSlab.EnumType[8];
public static final BlockPurpurSlab.EnumType[] META_LOOKUP = new BlockPurpurSlab.EnumType[values().length];
private final int meta;
private final MapColor field_181075_k;
private final String name;

View File

@ -21,6 +21,7 @@ import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockHugeMushroom;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockPrismarine;
import net.minecraft.block.BlockPurpurSlab;
import net.minecraft.block.BlockQuartz;
import net.minecraft.block.BlockRedSandstone;
import net.minecraft.block.BlockSand;
@ -1105,7 +1106,13 @@ public class RenderItem implements IResourceManagerReloadListener {
"red_mushroom_block");
this.registerBlock(Blocks.dragon_egg, "dragon_egg");
this.registerBlock(EaglerItems.getEaglerBlock("purpur_slab"), BlockPurpurSlab.EnumType.DEFAULT.getMetadata(),
"purpur_slab");
// TODO: Make custom slabs not have to be registered manually
for (Map.Entry<String, EaglerCustomBlock> entry : EaglerItems.getEaglerCustomBlockEntries()) {
if (entry.getValue().isSlab() || !entry.getValue().hasItem()) {
continue;
}
this.registerBlock(entry.getValue().getBlock(), entry.getKey());
}

View File

@ -48,22 +48,36 @@ import net.minecraft.util.IRegistry;
import net.minecraft.util.RegistrySimple;
import net.minecraft.util.ResourceLocation;
/**+
import net.minecraft.block.BlockSlab;
import net.hoosiertransfer.EaglerItems;
import net.hoosiertransfer.EaglerCustomBlock;
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -390,6 +404,13 @@ public class ModelBakery {
this.variantNames.put(Item.getItemFromBlock(Blocks.oak_fence),
Lists.newArrayList(new String[] { "oak_fence" }));
this.variantNames.put(Items.oak_door, Lists.newArrayList(new String[] { "oak_door" }));
for (EaglerCustomBlock block : EaglerItems.getEaglerCustomBlocks()) {
if (block.isSlab()) {
this.variantNames.put(Item.getItemFromBlock(block.getBlock()),
Lists.newArrayList(block.getVariants().toArray(new String[0])));
}
}
}
private List<String> getVariantNames(Item parItem) {

File diff suppressed because it is too large Load Diff

View File

@ -1993,4 +1993,66 @@ public abstract class EntityLivingBase extends Entity {
}
}
public boolean attemptTeleport(double x, double y, double z) {
double d0 = this.posX;
double d1 = this.posY;
double d2 = this.posZ;
this.posX = x;
this.posY = y;
this.posZ = z;
boolean flag = false;
BlockPos blockpos = new BlockPos(this);
World world = this.worldObj;
EaglercraftRandom random = this.rand;
if (world.isBlockLoaded(blockpos)) {
boolean flag1 = false;
while (!flag1 && blockpos.getY() > 0) {
BlockPos blockpos1 = blockpos.down();
IBlockState iblockstate = world.getBlockState(blockpos1);
if (iblockstate.getBlock().getMaterial().blocksMovement()) {
flag1 = true;
} else {
--this.posY;
blockpos = blockpos1;
}
}
if (flag1) {
this.setPositionAndUpdate(this.posX, this.posY, this.posZ);
if (world.getCollidingBoundingBoxes(this, this.getEntityBoundingBox()).isEmpty()
&& !world.containsAnyLiquid(this.getEntityBoundingBox())) {
flag = true;
}
}
}
if (!flag) {
this.setPositionAndUpdate(d0, d1, d2);
return false;
} else {
int i = 128;
for (int j = 0; j < i; ++j) {
double d6 = (double) j / ((double) i - 1.0D);
float f = (random.nextFloat() - 0.5F) * 0.2F;
float f1 = (random.nextFloat() - 0.5F) * 0.2F;
float f2 = (random.nextFloat() - 0.5F) * 0.2F;
double d3 = d0 + (this.posX - d0) * d6 + (random.nextDouble() - 0.5D) * (double) this.width * 2.0D;
double d4 = d1 + (this.posY - d1) * d6 + random.nextDouble() * (double) this.height;
double d5 = d2 + (this.posZ - d2) * d6 + (random.nextDouble() - 0.5D) * (double) this.width * 2.0D;
world.spawnParticle(EnumParticleTypes.PORTAL, d3, d4, d5, (double) f, (double) f1, (double) f2,
new int[0]);
}
if (this instanceof EntityCreature) {
((EntityCreature) this).getNavigator().clearPathEntity();
}
return true;
}
}
}

View File

@ -1,5 +1,6 @@
package net.minecraft.entity.ai;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.state.IBlockState;
@ -11,22 +12,31 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -42,7 +52,8 @@ public class EntityAIHarvestFarmland extends EntityAIMoveToBlock {
this.theVillager = theVillagerIn;
}
/**+
/**
* +
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute() {
@ -59,7 +70,8 @@ public class EntityAIHarvestFarmland extends EntityAIMoveToBlock {
return super.shouldExecute();
}
/**+
/**
* +
* Returns whether an in-progress EntityAIBase should continue
* executing
*/
@ -67,21 +79,24 @@ public class EntityAIHarvestFarmland extends EntityAIMoveToBlock {
return this.field_179501_f >= 0 && super.continueExecuting();
}
/**+
/**
* +
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting() {
super.startExecuting();
}
/**+
/**
* +
* Resets the task
*/
public void resetTask() {
super.resetTask();
}
/**+
/**
* +
* Updates the task
*/
public void updateTask() {
@ -113,6 +128,9 @@ public class EntityAIHarvestFarmland extends EntityAIMoveToBlock {
} else if (itemstack.getItem() == Items.carrot) {
world.setBlockState(blockpos, Blocks.carrots.getDefaultState(), 3);
flag = true;
} else if (itemstack.getItem() == EaglerItems.getEaglerItem("beetroot_seeds")) {
world.setBlockState(blockpos, EaglerItems.getEaglerBlock("beetroots").getDefaultState(), 3);
flag = true;
}
}
@ -132,7 +150,8 @@ public class EntityAIHarvestFarmland extends EntityAIMoveToBlock {
}
/**+
/**
* +
* Return true to set given position as destination
*/
protected boolean shouldMoveTo(World worldIn, BlockPos pos) {

View File

@ -1,5 +1,6 @@
package net.minecraft.entity.ai;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.init.Items;
@ -8,22 +9,31 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -37,7 +47,8 @@ public class EntityAIVillagerInteract extends EntityAIWatchClosest2 {
this.villager = villagerIn;
}
/**+
/**
* +
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting() {
@ -51,7 +62,8 @@ public class EntityAIVillagerInteract extends EntityAIWatchClosest2 {
}
/**+
/**
* +
* Updates the task
*/
public void updateTask() {
@ -66,7 +78,8 @@ public class EntityAIVillagerInteract extends EntityAIWatchClosest2 {
ItemStack itemstack1 = null;
if (itemstack != null) {
Item item = itemstack.getItem();
if ((item == Items.bread || item == Items.potato || item == Items.carrot)
if ((item == Items.bread || item == Items.potato || item == Items.carrot
|| item == EaglerItems.getEaglerItem("beetroot"))
&& itemstack.stackSize > 3) {
int l = itemstack.stackSize / 2;
itemstack.stackSize -= l;

View File

@ -1,5 +1,6 @@
package net.minecraft.entity.passive;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase;
@ -21,22 +22,31 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -74,7 +84,8 @@ public class EntityChicken extends EntityAnimal {
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
}
/**+
/**
* +
* Called frequently so the entity can update its state every
* tick as required. For example, zombies and skeletons use this
* to react to sunlight and start to burn.
@ -106,21 +117,24 @@ public class EntityChicken extends EntityAnimal {
public void fall(float var1, float var2) {
}
/**+
/**
* +
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound() {
return "mob.chicken.say";
}
/**+
/**
* +
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound() {
return "mob.chicken.hurt";
}
/**+
/**
* +
* Returns the sound this mob makes on death.
*/
protected String getDeathSound() {
@ -135,7 +149,8 @@ public class EntityChicken extends EntityAnimal {
return Items.feather;
}
/**+
/**
* +
* Drop 0-2 items of this living's type
*/
protected void dropFewItems(boolean var1, int i) {
@ -157,16 +172,21 @@ public class EntityChicken extends EntityAnimal {
return new EntityChicken(this.worldObj);
}
/**+
/**
* +
* Checks if the parameter is an item which this animal can be
* fed to breed it (wheat, carrots or seeds depending on the
* animal type)
*/
public boolean isBreedingItem(ItemStack itemstack) {
return itemstack != null && itemstack.getItem() == Items.wheat_seeds;
return itemstack != null && itemstack.getItem() == Items.wheat_seeds
|| itemstack.getItem() == Items.pumpkin_seeds
|| itemstack.getItem() == Items.melon_seeds
|| itemstack.getItem() == EaglerItems.getEaglerItem("beetroot_seeds");
}
/**+
/**
* +
* (abstract) Protected helper method to read subclass entity
* data from NBT.
*/
@ -179,14 +199,16 @@ public class EntityChicken extends EntityAnimal {
}
/**+
/**
* +
* Get the experience points the entity currently has.
*/
protected int getExperiencePoints(EntityPlayer entityplayer) {
return this.isChickenJockey() ? 10 : super.getExperiencePoints(entityplayer);
}
/**+
/**
* +
* (abstract) Protected helper method to write subclass entity
* data to NBT.
*/
@ -196,7 +218,8 @@ public class EntityChicken extends EntityAnimal {
nbttagcompound.setInteger("EggLayTime", this.timeUntilNextEgg);
}
/**+
/**
* +
* Determines if an entity can be despawned, used on idle far
* away entities
*/
@ -219,7 +242,8 @@ public class EntityChicken extends EntityAnimal {
}
/**+
/**
* +
* Determines if this chicken is a jokey with a zombie riding
* it.
*/
@ -227,7 +251,8 @@ public class EntityChicken extends EntityAnimal {
return this.chickenJockey;
}
/**+
/**
* +
* Sets whether this chicken is a jockey or not.
*/
public void setChickenJockey(boolean jockey) {

View File

@ -1,5 +1,6 @@
package net.minecraft.entity.passive;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.SharedMonsterAttributes;
@ -24,22 +25,31 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -69,7 +79,8 @@ public class EntityPig extends EntityAnimal {
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
}
/**+
/**
* +
* returns true if all the conditions for steering the entity
* are met. For pigs, this is true if it is being ridden by a
* player and the player is holding a carrot-on-a-stick
@ -84,7 +95,8 @@ public class EntityPig extends EntityAnimal {
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
}
/**+
/**
* +
* (abstract) Protected helper method to write subclass entity
* data to NBT.
*/
@ -93,7 +105,8 @@ public class EntityPig extends EntityAnimal {
nbttagcompound.setBoolean("Saddle", this.getSaddled());
}
/**+
/**
* +
* (abstract) Protected helper method to read subclass entity
* data from NBT.
*/
@ -102,21 +115,24 @@ public class EntityPig extends EntityAnimal {
this.setSaddled(nbttagcompound.getBoolean("Saddle"));
}
/**+
/**
* +
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound() {
return "mob.pig.say";
}
/**+
/**
* +
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound() {
return "mob.pig.say";
}
/**+
/**
* +
* Returns the sound this mob makes on death.
*/
protected String getDeathSound() {
@ -127,7 +143,8 @@ public class EntityPig extends EntityAnimal {
this.playSound("mob.pig.step", 0.15F, 1.0F);
}
/**+
/**
* +
* Called when a player interacts with a mob. e.g. gets milk
* from a cow, gets into the saddle on a pig.
*/
@ -147,7 +164,8 @@ public class EntityPig extends EntityAnimal {
return this.isBurning() ? Items.cooked_porkchop : Items.porkchop;
}
/**+
/**
* +
* Drop 0-2 items of this living's type
*/
protected void dropFewItems(boolean var1, int i) {
@ -167,14 +185,16 @@ public class EntityPig extends EntityAnimal {
}
/**+
/**
* +
* Returns true if the pig is saddled.
*/
public boolean getSaddled() {
return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
/**+
/**
* +
* Set or remove the saddle of the pig.
*/
public void setSaddled(boolean saddled) {
@ -186,7 +206,8 @@ public class EntityPig extends EntityAnimal {
}
/**+
/**
* +
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt var1) {
@ -217,16 +238,19 @@ public class EntityPig extends EntityAnimal {
return new EntityPig(this.worldObj);
}
/**+
/**
* +
* Checks if the parameter is an item which this animal can be
* fed to breed it (wheat, carrots or seeds depending on the
* animal type)
*/
public boolean isBreedingItem(ItemStack itemstack) {
return itemstack != null && itemstack.getItem() == Items.carrot;
return itemstack != null && itemstack.getItem() == Items.carrot || itemstack.getItem() == Items.potato
|| itemstack.getItem() == EaglerItems.getEaglerItem("beetroot_seeds");
}
/**+
/**
* +
* Return the AI task for player control.
*/
public EntityAIControlledByPlayer getAIControlledByPlayer() {

View File

@ -1086,28 +1086,29 @@ public class Item {
registerItem(2257, (String) "record_cat", (new ItemRecord("cat")).setUnlocalizedName("record"));
registerItem(2258, (String) "record_blocks", (new ItemRecord("blocks")).setUnlocalizedName("record"));
registerItem(2259, (String) "record_chirp", (new ItemRecord("chirp")).setUnlocalizedName("record"));
for (EaglerCustomBlock block : EaglerItems.getEaglerCustomBlocks()) {
if (!block.hasItem())
continue;
if (block.isSlab()) {
registerItemBlock(block.getBlock(),
(new ItemSlab(block.getBlock(), (BlockSlab) block.getBlock(), block.getSlabDouble()))
.setUnlocalizedName(block.getBlock().getUnlocalizedName()));
.setUnlocalizedName(block.getBlock().unlocalizedName));
} else {
registerItemBlock(block.getBlock());
}
}
// List<String> blockIds = EaglerItems.getEaglerBlockIds();
// for (int i = 0; i < blockIds.size(); i++) {
// String blockId = blockIds.get(i);
// EaglerCustomBlock block = EaglerItems.getEaglerCustomBlock(blockId);
// Block block1 = block.block;
// if (block.isSlab) {
// registerItemBlock(block.block,
// (new ItemSlab(block.block, (BlockSlab) block.block, block.slabDouble))
// .setUnlocalizedName(block1.getUnlocalizedName()));
// } else {
// registerItemBlock(block.block);
// }
// }
registerEaglerItem(432, "chorus_fruit",
(new ItemChorusFruit(4, 0.3F)).setAlwaysEdible().setUnlocalizedName("chorusFruit")
.setCreativeTab(CreativeTabs.tabMaterials));
registerEaglerItem(433, "chorus_fruit_popped",
(new Item()).setUnlocalizedName("chorusFruitPopped").setCreativeTab(CreativeTabs.tabMaterials));
registerEaglerItem(434, "beetroot", (new ItemFood(1, 0.6F, false)).setUnlocalizedName("beetroot"));
registerEaglerItem(435, "beetroot_seeds",
(new ItemSeeds(EaglerItems.getEaglerBlock("beetroots"), Blocks.farmland))
.setUnlocalizedName("beetroot_seeds"));
registerEaglerItem(436, "beetroot_soup", (new ItemSoup(6)).setUnlocalizedName("beetroot_soup"));
}
/**

View File

@ -0,0 +1,53 @@
package net.minecraft.item;
import javax.annotation.Nullable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class ItemChorusFruit extends ItemFood {
public ItemChorusFruit(int amount, float saturation) {
super(amount, saturation, false);
}
@Nullable
/**
* Called when the player finishes using this Item (E.g. finishes eating.). Not
* called when the player stops using
* the Item before the action is complete.
*/
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityPlayer entityLiving) {
// TODO: Sound and cooldown
ItemStack itemstack = super.onItemUseFinish(stack, worldIn, entityLiving);
if (!worldIn.isRemote) {
double d0 = entityLiving.posX;
double d1 = entityLiving.posY;
double d2 = entityLiving.posZ;
for (int i = 0; i < 16; ++i) {
double d3 = entityLiving.posX + (entityLiving.getRNG().nextDouble() - 0.5D) * 16.0D;
double d4 = MathHelper.clamp_double(
entityLiving.posY + (double) (entityLiving.getRNG().nextInt(16) - 8), 0.0D,
(double) (worldIn.getActualHeight() - 1));
double d5 = entityLiving.posZ + (entityLiving.getRNG().nextDouble() - 0.5D) * 16.0D;
entityLiving.setPosition(d3, d4, d5);
if (entityLiving.attemptTeleport(d3, d4, d5)) {
// worldIn.playSound((EntityPlayer) null, d0, d1, d2,
// SoundEvents.ITEM_CHORUS_FRUIT_TELEPORT,
// SoundCategory.PLAYERS, 1.0F, 1.0F);
// entityLiving.playSound(SoundEvents.ITEM_CHORUS_FRUIT_TELEPORT, 1.0F, 1.0F);
break;
}
}
// if (entityLiving instanceof EntityPlayer) {
// ((EntityPlayer) entityLiving).getCooldownTracker().setCooldown(this, 20);
// }
}
return itemstack;
}
}

View File

@ -5,6 +5,7 @@ import java.util.Map.Entry;
import com.google.common.collect.Maps;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStoneBrick;
import net.minecraft.init.Blocks;
@ -14,22 +15,31 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemFishFood;
import net.minecraft.item.ItemStack;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
@ -39,7 +49,8 @@ public class FurnaceRecipes {
private Map<ItemStack, ItemStack> smeltingList = Maps.newHashMap();
private Map<ItemStack, Float> experienceList = Maps.newHashMap();
/**+
/**
* +
* Returns an instance of FurnaceRecipes.
*/
public static FurnaceRecipes instance() {
@ -72,6 +83,8 @@ public class FurnaceRecipes {
this.addSmelting(Items.potato, new ItemStack(Items.baked_potato), 0.35F);
this.addSmeltingRecipeForBlock(Blocks.netherrack, new ItemStack(Items.netherbrick), 0.1F);
this.addSmeltingRecipe(new ItemStack(Blocks.sponge, 1, 1), new ItemStack(Blocks.sponge, 1, 0), 0.15F);
this.addSmelting(EaglerItems.getEaglerItem("chorus_fruit"),
new ItemStack(EaglerItems.getEaglerItem("chorus_fruit_popped")), 0.1F);
ItemFishFood.FishType[] types = ItemFishFood.FishType.values();
for (int i = 0; i < types.length; ++i) {
@ -89,7 +102,8 @@ public class FurnaceRecipes {
this.addSmeltingRecipeForBlock(Blocks.quartz_ore, new ItemStack(Items.quartz), 0.2F);
}
/**+
/**
* +
* Adds a smelting recipe, where the input item is an instance
* of Block.
*/
@ -97,14 +111,16 @@ public class FurnaceRecipes {
this.addSmelting(Item.getItemFromBlock(input), stack, experience);
}
/**+
/**
* +
* Adds a smelting recipe using an Item as the input item.
*/
public void addSmelting(Item input, ItemStack stack, float experience) {
this.addSmeltingRecipe(new ItemStack(input, 1, 32767), stack, experience);
}
/**+
/**
* +
* Adds a smelting recipe using an ItemStack as the input for
* the recipe.
*/
@ -113,7 +129,8 @@ public class FurnaceRecipes {
this.experienceList.put(stack, Float.valueOf(experience));
}
/**+
/**
* +
* Returns the smelting result of an item.
*/
public ItemStack getSmeltingResult(ItemStack stack) {
@ -126,7 +143,8 @@ public class FurnaceRecipes {
return null;
}
/**+
/**
* +
* Compares two itemstacks to ensure that they are the same.
* This checks both the item and the metadata of the item.
*/

View File

@ -1,5 +1,6 @@
package net.minecraft.item.crafting;
import net.hoosiertransfer.EaglerItems;
import net.minecraft.block.BlockDirt;
import net.minecraft.block.BlockPrismarine;
import net.minecraft.block.BlockQuartz;
@ -15,28 +16,38 @@ import net.minecraft.init.Items;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemStack;
/**+
/**
* +
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
*
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. 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.
*
*/
public class RecipesCrafting {
/**+
/**
* +
* Adds the crafting recipes to the CraftingManager.
*/
public void addRecipes(CraftingManager parCraftingManager) {
@ -126,5 +137,24 @@ public class RecipesCrafting {
Character.valueOf('I'), new ItemStack(Items.dye, 1, EnumDyeColor.BLACK.getDyeDamage()) });
parCraftingManager.addRecipe(new ItemStack(Blocks.sea_lantern, 1, 0), new Object[] { "SCS", "CCC", "SCS",
Character.valueOf('S'), Items.prismarine_shard, Character.valueOf('C'), Items.prismarine_crystals });
// Eaglercraft lambda recipes
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerBlock("purpur_block"), 1),
new Object[] { "FF", "FF", Character.valueOf('F'),
new ItemStack(EaglerItems.getEaglerItem("chorus_fruit_popped")) });
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerBlock("end_bricks"), 1),
new Object[] { "SS", "SS", Character.valueOf('S'), new ItemStack(Blocks.end_stone) });
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerBlock("purpur_stairs"), 1),
new Object[] { "P ", "PP ", "PPP", Character.valueOf('P'),
new ItemStack(EaglerItems.getEaglerBlock("purpur_block")) });
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerBlock("purpur_slab"), 1),
new Object[] { "PPP", Character.valueOf('P'),
new ItemStack(EaglerItems.getEaglerBlock("purpur_block")) });
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerBlock("purpur_pillar"), 1),
new Object[] { "P", "P", Character.valueOf('P'),
new ItemStack(EaglerItems.getEaglerBlock("purpur_slab")) });
parCraftingManager.addRecipe(new ItemStack(EaglerItems.getEaglerItem("beetroot_soup"), 1),
new Object[] { "FFF", "FFF", " B ", Character.valueOf('F'),
EaglerItems.getEaglerItem("beetroot"), Character.valueOf('B'), Items.bowl });
}
}

File diff suppressed because it is too large Load Diff