Skip to content

Commit

Permalink
Merge pull request #62 from BTW-Community/v3.0.7
Browse files Browse the repository at this point in the history
V3.0.7
  • Loading branch information
ammoore00 committed Aug 22, 2022
2 parents fe8f16f + fdb6c51 commit 240e59f
Show file tree
Hide file tree
Showing 14 changed files with 132 additions and 7,044 deletions.
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Version 3.0.7
[list]
[*]Updated to BTW CE 1.4.1.
[*]Fixed an issue where stone was dropping twice as many stone and gravel pile items.
[*]Fixed an issue where wood subblocks still had their pick block functionality broken due to overrides which did not carry over the CE functionality.
[*]Fixed an issue where cherry and acacia slabs in the upper half of the block would not saw into mouldings properly.
[*]Removed base class edits to EntityPlayer.
[/list]

Version 3.0.6
[list]
[*]Updated to BTW CE 1.3.4.
Expand Down
34 changes: 16 additions & 18 deletions minecraft/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
59 changes: 0 additions & 59 deletions minecraft/net/minecraft/src/DecoBlockStoneBrick.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,31 @@ 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();

if (IsDecorativeFromMetadata(var1))
{
byte var3;

if (var1 == 12)
{
var3 = 0;
}
else
{
var3 = 1;
}

return FCItemBlockWoodSidingDecorativeStub.GetItemDamageForType(var2, var3);
}
else
{
return var2;
}

@Override
public int damageDropped(int metadata) {
return this.damageDropped(this.blockID, metadata);
}

private int damageDropped(int blockID, int metadata) {
int woodType = GetWoodTypeFromBlockID(blockID);

if (IsDecorativeFromMetadata(metadata)) {
int blockType;

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 Expand Up @@ -158,4 +155,13 @@ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
super.getSubBlocks(var1, var2, var3);
}
}

@Override
public int getDamageValue(World world, int x, int y, int z) {
int blockID = world.getBlockId(x, y, z);
int metadata = world.getBlockMetadata(x, y, z);
int damageDropped = this.damageDropped(blockID, metadata);

return damageDropped;
}
}
4 changes: 2 additions & 2 deletions minecraft/net/minecraft/src/DecoManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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 @@ -112,7 +112,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/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 240e59f

Please sign in to comment.