Skip to content

Commit

Permalink
Server port
Browse files Browse the repository at this point in the history
  • Loading branch information
ammoore00 committed Aug 22, 2022
1 parent 765875e commit fdb6c51
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 3,404 deletions.
38 changes: 18 additions & 20 deletions minecraft_server/net/minecraft/src/DecoBlockStone.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ public int idDropped(int metadata, Random random, int fortuneModifier) {

@Override
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int metadata, float chance, int fortuneModifier) {
super.dropBlockAsItemWithChance(world, x, y, z, metadata, chance, fortuneModifier);

if (!world.isRemote) {
if (isSlate(metadata)) {
dropBlockAsItem_do(world, x, y, z, new ItemStack(DecoDefs.slateStone));
dropBlockAsItem_do(world, x, y, z, new ItemStack(DecoDefs.slateCobbleLoose));

if (!GetIsCracked(metadata)) {
dropBlockAsItem_do(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemPileGravel));
}
}
else {
dropBlockAsItem_do(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStone));
}

if (!GetIsCracked(metadata)) {
dropBlockAsItem_do(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemPileGravel));
super.dropBlockAsItemWithChance(world, x, y, z, metadata, chance, fortuneModifier);
}
}
}
Expand Down Expand Up @@ -68,16 +67,15 @@ public void harvestBlock(World world, EntityPlayer player, int x, int y, int z,
public boolean DropComponentItemsOnBadBreak(World world, int x, int y, int z, int metadata, float chanceOfDrop) {
if (isSlate(metadata) || isCrackedSlate(metadata)) {
DropItemsIndividualy(world, x, y, z, DecoDefs.slateStone.itemID, 5, 0, chanceOfDrop);

int numGravel = GetIsCracked(metadata) ? 2 : 3;
DropItemsIndividualy(world, x, y, z, FCBetterThanWolves.fcItemPileGravel.itemID, numGravel, 0, chanceOfDrop);

return true;
}
else {
DropItemsIndividualy(world, x, y, z, FCBetterThanWolves.fcItemStone.itemID, 5, 0, chanceOfDrop);
return super.DropComponentItemsOnBadBreak(world, x, y, z, metadata, chanceOfDrop);
}

int numGravel = GetIsCracked(metadata) ? 2 : 3;

DropItemsIndividualy(world, x, y, z, FCBetterThanWolves.fcItemPileGravel.itemID, numGravel, 0, chanceOfDrop);

return true;
}

@Override
Expand All @@ -97,7 +95,7 @@ public boolean ConvertBlock(ItemStack stack, World world, int x, int y, int z, i
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(DecoDefs.slateStone, 1), fromSide);
}
else {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStone, 1), fromSide);
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStone, 1, strata), fromSide);
}
}
}
Expand All @@ -114,7 +112,7 @@ public boolean ConvertBlock(ItemStack stack, World world, int x, int y, int z, i
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(DecoDefs.slateStone, 3), fromSide);
}
else {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStone, 3), fromSide);
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStone, 3, strata), fromSide);
}

FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemPileGravel, 1), fromSide);
Expand All @@ -132,7 +130,7 @@ else if (toolLevel == 3) {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(DecoDefs.slateBrickItem, 1), fromSide);
}
else {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStoneBrick, 1), fromSide);
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStoneBrick, 1, strata), fromSide);
}

FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemPileGravel, 1), fromSide);
Expand Down Expand Up @@ -160,7 +158,7 @@ else if (toolLevel == 4) {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(DecoDefs.slateBrickItem, 1), fromSide);
}
else {
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStoneBrick, 1), fromSide);
FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemStoneBrick, 1, strata), fromSide);
}

FCUtilsItem.EjectStackFromBlockTowardsFacing(world, x, y, z, new ItemStack(FCBetterThanWolves.fcItemPileGravel, 1), fromSide);
Expand Down Expand Up @@ -287,8 +285,8 @@ public int SetIsCracked(int metadata, boolean cracked) {
public boolean GetIsCracked(int metadata) {
return (metadata & 4) != 0 && !isSlate(metadata);
}
@Override

@Override
public int getBlockIDOnInfest(EntityLiving entity, int metadata) {
if (isSlate(metadata)) {
return DecoDefs.infestedSlate.blockID;
Expand Down
34 changes: 0 additions & 34 deletions minecraft_server/net/minecraft/src/DecoBlockStoneBrick.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,30 @@ public int idDropped(int var1, Random var2, int var3)
return IsDecorativeFromMetadata(var1) ? FCBetterThanWolves.fcBlockWoodSidingDecorativeItemStubID : (this.GetIsCorner(var1) ? FCBetterThanWolves.fcBlockWoodCornerItemStubID : FCBetterThanWolves.fcBlockWoodSidingItemStubID);
}

/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int var1)
{
int var2 = this.GetWoodTypeFromBlockID();
@Override
public int damageDropped(int metadata) {
return this.damageDropped(this.blockID, metadata);
}

if (IsDecorativeFromMetadata(var1))
{
byte var3;
private int damageDropped(int blockID, int metadata) {
int woodType = GetWoodTypeFromBlockID(blockID);

if (var1 == 12)
{
var3 = 0;
}
else
{
var3 = 1;
}
if (IsDecorativeFromMetadata(metadata)) {
int blockType;

return FCItemBlockWoodSidingDecorativeStub.GetItemDamageForType(var2, var3);
}
else
{
return var2;
}
}
if (metadata == m_iSubtypeBench) {
blockType = FCItemBlockWoodSidingDecorativeStub.m_iTypeBench;
}
else { // fence
blockType = FCItemBlockWoodSidingDecorativeStub.m_iTypeFence;
}

return FCItemBlockWoodSidingDecorativeStub.GetItemDamageForType(woodType, blockType);
}
else {
return woodType;
}
}

public boolean DoesBenchHaveLeg(IBlockAccess var1, int var2, int var3, int var4)
{
Expand Down Expand Up @@ -101,31 +98,31 @@ public void onBlockDestroyedByExplosion(World var1, int var2, int var3, int var4
this.DropItemsIndividualy(var1, var2, var3, var4, FCBetterThanWolves.fcItemSawDust.itemID, var7, 0, var6);
}

protected int GetWoodTypeFromBlockID()
protected int GetWoodTypeFromBlockID(int blockID)
{
byte var1;

if (this.blockID == FCBetterThanWolves.fcBlockWoodOakSidingAndCorner.blockID)
if (blockID == FCBetterThanWolves.fcBlockWoodOakSidingAndCorner.blockID)
{
var1 = 0;
}
else if (this.blockID == FCBetterThanWolves.fcBlockWoodSpruceSidingAndCorner.blockID)
else if (blockID == FCBetterThanWolves.fcBlockWoodSpruceSidingAndCorner.blockID)
{
var1 = 1;
}
else if (this.blockID == FCBetterThanWolves.fcBlockWoodBirchSidingAndCorner.blockID)
else if (blockID == FCBetterThanWolves.fcBlockWoodBirchSidingAndCorner.blockID)
{
var1 = 2;
}
else if (this.blockID == FCBetterThanWolves.fcBlockWoodJungleSidingAndCorner.blockID)
else if (blockID == FCBetterThanWolves.fcBlockWoodJungleSidingAndCorner.blockID)
{
var1 = 3;
}
else if (this.blockID == FCBetterThanWolves.fcBlockWoodBloodSidingAndCorner.blockID)
else if (blockID == FCBetterThanWolves.fcBlockWoodBloodSidingAndCorner.blockID)
{
var1 = 4;
}
else if (this.blockID == DecoDefs.cherrySidingAndCorner.blockID)
else if (blockID == DecoDefs.cherrySidingAndCorner.blockID)
{
var1 = 5;
}
Expand Down
6 changes: 2 additions & 4 deletions minecraft_server/net/minecraft/src/DecoManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class DecoManager extends FCAddOn
private static ArrayList<Object> NameTargets = new ArrayList<Object>();

private static boolean newSoundsInstalled = true;

public static boolean disableHardcoreBouncing = true;

public static final int decoCustomBlockBreakAuxFXID = 3000;
public static final int decoCustomBlockConvertAuxFXID = 3001;
Expand Down Expand Up @@ -67,7 +65,7 @@ public class DecoManager extends FCAddOn
public static final String decoPacketChannelRender = "Deco|Render";

private DecoManager() {
super("Deco Addon", "3.0.5", "Deco");
super("Deco Addon", "3.0.7", "Deco");
}

public static DecoManager getInstance() {
Expand Down Expand Up @@ -103,7 +101,7 @@ public String GetLanguageFilePrefix() {

@Override
public void handleConfigProperties(Map<String, String> propertyValues) {
this.disableHardcoreBouncing = Boolean.parseBoolean(propertyValues.get("DisableHardcoreBouncing"));
FCBetterThanWolves.allowPlaceWhileJumping = Boolean.parseBoolean(propertyValues.get("DisableHardcoreBouncing"));
}

public static void register(Block target) {
Expand Down
8 changes: 8 additions & 0 deletions minecraft_server/net/minecraft/src/DecoRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,10 @@ private void addWoodRecipes() {
new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 2, 5),
},
Block.woodSingleSlab, 5);
FCRecipes.addSawRecipe(new ItemStack[] {
new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 2, 5),
},
Block.woodSingleSlab, 13);

FCRecipes.AddRecipe(new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingDecorativeItemStubID, 6, FCItemBlockWoodMouldingDecorativeStub.GetItemDamageForType(5, 1)), new Object[] {" S ", "###", "###", '#', new ItemStack(Block.planks, 1, 5), 'S', new ItemStack(FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, 5)});
FCRecipes.AddRecipe(new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingDecorativeItemStubID, 1, FCItemBlockWoodMouldingDecorativeStub.GetItemDamageForType(5, 0)), new Object[] {"M", "M", "M", 'M', new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 1, 5)});
Expand Down Expand Up @@ -1755,6 +1759,10 @@ private void addWoodRecipes() {
new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 2, 6),
},
Block.woodSingleSlab, 6);
FCRecipes.addSawRecipe(new ItemStack[] {
new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 2, 6),
},
Block.woodSingleSlab, 14);

FCRecipes.AddRecipe(new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingDecorativeItemStubID, 6, FCItemBlockWoodMouldingDecorativeStub.GetItemDamageForType(6, 1)), new Object[] {" S ", "###", "###", '#', new ItemStack(Block.planks, 1, 5), 'S', new ItemStack(FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, 6)});
FCRecipes.AddRecipe(new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingDecorativeItemStubID, 1, FCItemBlockWoodMouldingDecorativeStub.GetItemDamageForType(6, 0)), new Object[] {"M", "M", "M", 'M', new ItemStack(FCBetterThanWolves.fcBlockWoodMouldingItemStubID, 1, 6)});
Expand Down
Loading

0 comments on commit fdb6c51

Please sign in to comment.