Skip to content

Commit

Permalink
1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ammoore00 authored and SimonMeskens committed Dec 14, 2021
1 parent 0b5b9ca commit 4b0f7cf
Show file tree
Hide file tree
Showing 55 changed files with 3,233 additions and 2,513 deletions.
30 changes: 30 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## Version 1.3.2 ##
Thanks to the following people who contributed to this release!
- Dawnraider
- Hiracho

/--Gameplay--/
- Added the ability to put a breeding harness on mooshrooms without them being converted into normal cows.
- Changed fire aspect to no longer be available on the vanilla enchanter given that it is now significantly stronger than before, especially when exploring. It may now only be obtained through the infernal enchanter.
- Changed mobs to no longer be able to spawn on wicker as a thematic extension of not being able to spawn on wood, and because hampers and baskets being spawnable was unintuitive.
- Changed campfires to startle animals when placed to fix an exploit with setting animals on fire in the early game.
- Fixed an issue where clay balls were still used to make bricks in an oven instead of wet bricks.
- Fixed an issue where the tops of blocks would not have biome coloring applied when smooth lighting was turned off.
- Fixed an issue where mooshrooms did not have textures for hungry or starving states, and changed them to only grow mushrooms on their backs when fully fed.
- Fixed an issue where slimes in swamps did not respect the new lighting requirements for spawning.
- Fixed an issue (again) where clients would disconnect from multiplayer when sneaking/pressing alt use/sprinting. Version control issues meant the code for this change did not actually make it into last release.

/---Creative Mode---/
- Fixed an issue where several blocks returned the block instead of item form when using pick block: iron and gold ore chunks, various pastries, unfired pottery.
- Fixed an issue where unfired pottery was not present in the creative menu.

/--Addon API--/
- Added hooks to define whether a material breaks the saw or not.
- Added the ability to define multiple valid input metadata values for a single saw or kiln recipe, instead of requiring a separate recipe for each metadata, and updated BTW recipes to use this system. This is primarily to help craftguide to display recipes properly.
- Added static arrays to FCRecipes holding the metadata values for siding, moulding, and corners, to assist in defining in-world recipes such as those on the saw.
- Added a warning when attempting to add a hopper filtering recipe with an input stack size greater than 1.
- Added hooks to set a block to define whether a block should startle animals when placed or removed.
- Added hooks to define log chopping recipes, and separated existing recipes into their own instances. The old FCRecipesLogChopping class has also been deprecated, and will be removed at a later date.
- Changed turntable recipes to be handled by a crafting manager.
- Fixed an issue where helper methods for adding subblock recipes to the saw were not public.

## Version 1.3.1 ##
Thanks to the following people who contributed to this release!
- Hiracho
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/minecraft/com/prupe/mcpatcher/mal/block/RenderBlocksUtils.java
@@ -0,0 +1,230 @@
@@ -0,0 +1,233 @@
+package com.prupe.mcpatcher.mal.block;
+
+import com.prupe.mcpatcher.Config;
Expand All @@ -20,10 +20,10 @@
+public class RenderBlocksUtils {
+ public static boolean enableBetterGrass = false;
+
+ private static final Block grassBlock = BlockAPI.getFixedBlock("minecraft:grass");
+ private static final Block snowBlock = BlockAPI.getFixedBlock("minecraft:snow_layer");
+ private static final Block craftedSnowBlock = BlockAPI.getFixedBlock("minecraft:snow");
+ private static final Block fcDirtSlab = FCBetterThanWolves.fcBlockDirtSlab;
+ public static Block grassBlock = BlockAPI.getFixedBlock("minecraft:grass");
+ public static Block snowBlock = BlockAPI.getFixedBlock("minecraft:snow_layer");
+ public static Block craftedSnowBlock = BlockAPI.getFixedBlock("minecraft:snow");
+ public static Block fcDirtSlab = FCBetterThanWolves.fcBlockDirtSlab;
+
+ private static final int COLOR = 0;
+ private static final int NONCOLOR = 1;
Expand All @@ -44,6 +44,7 @@
+ boolean haveOverrideTexture, float r, float g, float b) {
+ if (haveOverrideTexture || !RenderPassAPI.instance.useColorMultiplierThisPass(block)) {
+ colorMultiplierType[0] = COLOR;
+ colorMultiplierType[1] = COLOR;
+ colorMultiplierType[2] = COLOR;
+ colorMultiplierType[3] = COLOR;
+ colorMultiplierType[4] = COLOR;
Expand All @@ -64,13 +65,15 @@
+ colorMultiplierType[5] = NONCOLOR;
+ } else {
+ colorMultiplierType[0] = COLOR;
+ colorMultiplierType[1] = COLOR;
+ colorMultiplierType[2] = COLOR_AND_NONCOLOR;
+ colorMultiplierType[3] = COLOR_AND_NONCOLOR;
+ colorMultiplierType[4] = COLOR_AND_NONCOLOR;
+ colorMultiplierType[5] = COLOR_AND_NONCOLOR;
+ }
+ } else {
+ colorMultiplierType[0] = COLOR;
+ colorMultiplierType[1] = COLOR;
+ colorMultiplierType[2] = COLOR;
+ colorMultiplierType[3] = COLOR;
+ colorMultiplierType[4] = COLOR;
Expand Down
157 changes: 71 additions & 86 deletions patches/minecraft/net/minecraft/src/Block.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@
if (var0 > 0 && blocksList[var0].getRenderType() == 10)
{
var1 = true;
@@ -1364,10 +1429,2360 @@
@@ -1364,10 +1429,2345 @@
}

useNeighborBrightness[var0] = var1;
Expand Down Expand Up @@ -1595,25 +1595,9 @@
+
+ //------------- Saw related functionality ------------//
+
+ public boolean DoesBlockBreakSaw( World world, int i, int j, int k )
+ {
+ if ( blockMaterial.isSolid() )
+ {
+ if ( blockMaterial != Material.wood &&
+ blockMaterial != Material.cactus &&
+ blockMaterial != Material.pumpkin &&
+ blockMaterial != Material.leaves &&
+ blockMaterial != Material.plants &&
+ blockMaterial != Material.vine &&
+ blockMaterial != Material.snow &&
+ blockMaterial != Material.craftedSnow &&
+ blockMaterial != FCBetterThanWolves.fcMaterialLog &&
+ blockMaterial != FCBetterThanWolves.fcMaterialPlanks &&
+ blockMaterial != FCBetterThanWolves.fcMaterialAsh
+ )
+ {
+ return true;
+ }
+ public boolean DoesBlockBreakSaw(World world, int x, int y, int z) {
+ if (blockMaterial.isSolid() && blockMaterial.breaksSaw()) {
+ return true;
+ }
+
+ return false;
Expand Down Expand Up @@ -2383,89 +2367,77 @@
+ * Returns the new crafting counter after rotation. It is unmodified if no crafting has taken place,
+ * incremented or reset on completion if it has.
+ */
+ public int RotateOnTurntable( World world, int i, int j, int k, boolean bReverse, int iCraftingCounter )
+ {
+ OnRotatedOnTurntable( world, i, j, k );
+ public int RotateOnTurntable(World world, int x, int y, int z, boolean reverse, int craftingCounter) {
+ OnRotatedOnTurntable(world, x, y, z);
+
+ if ( !RotateAroundJAxis( world, i, j, k, bReverse ) )
+ {
+ if (!RotateAroundJAxis(world, x, y, z, reverse)) {
+ // notify the surrounding blocks of a change if no facing change actually takes place, so that buddy can pick up on it
+ // this is because solid blocks still "rotate" even if their facing doesn't change
+
+ world.notifyBlocksOfNeighborChange( i, j, k, blockID );
+ world.notifyBlocksOfNeighborChange( x, y, z, blockID );
+ }
+
+ int metadata = world.getBlockMetadata(x, y, z);
+
+ FCCraftingManagerTurntableRecipe recipe = FCCraftingManagerTurntable.instance.getRecipe(this, metadata);
+
+ if (recipe != null) {
+ craftingCounter = this.TurntableCraftingRotation(world, x, y, z, reverse, craftingCounter);
+ }
+
+ return iCraftingCounter;
+ return craftingCounter;
+ }
+
+ /*
+ * Intended to play block specific FX and such
+ */
+ protected void OnRotatedOnTurntable( World world, int i, int j, int k )
+ {
+ }
+ protected void OnRotatedOnTurntable(World world, int x, int y, int z) {}
+
+ protected int TurntableCraftingRotation( World world, int i, int j, int k, boolean bReverse, int iCraftingCounter )
+ {
+ iCraftingCounter++;
+
+ if ( iCraftingCounter >= GetRotationsToCraftOnTurntable( world, i, j, k ) )
+ {
+ OnCraftedOnTurntable( world, i, j, k );
+
+ int iNewBlockID = GetNewBlockIDCraftedOnTurntable( world, i, j, k );
+ int iNewBlockMetadata = GetNewMetadataCraftedOnTurntable( world, i, j, k );
+ int iItemIDDropped = GetItemIDCraftedOnTurntable( world, i, j, k );
+ int iItemCountDropped = GetItemCountCraftedOnTurntable( world, i, j, k );
+ int iItemDamageDropped = GetItemDamageCraftedOnTurntable( world, i, j, k );
+ protected int TurntableCraftingRotation(World world, int x, int y, int z, boolean reverse, int craftingCounter) {
+ craftingCounter++;
+
+ int metadata = world.getBlockMetadata(x, y, z);
+
+ FCCraftingManagerTurntableRecipe recipe = FCCraftingManagerTurntable.instance.getRecipe(this, metadata);
+
+ for ( int tempCount = 0; tempCount < iItemCountDropped; tempCount++ )
+ {
+ FCUtilsItem.EjectSingleItemWithRandomOffset( world, i, j + 1, k, iItemIDDropped, iItemDamageDropped );
+ if (recipe != null) {
+ if (craftingCounter >= recipe.getRotationsToCraft()) {
+ this.onCraftedOnTurntable(world, x, y, z);
+
+ Block output = recipe.getOutputBlock();
+ int outputBlockID;
+
+ if (output != null) {
+ outputBlockID = output.blockID;
+ }
+ else {
+ outputBlockID = 0;
+ }
+
+ world.setBlockAndMetadataWithNotify(x, y, z, outputBlockID, recipe.getOutputMetadata());
+
+ recipe.playCompletionEffect(world, x, y, z);
+
+ if (recipe.getItemsEjected() != null) {
+ for (ItemStack stack : recipe.getItemsEjected()) {
+ for (int i = 0; i < stack.stackSize; i++) {
+ FCUtilsItem.EjectSingleItemWithRandomOffset(world, x, y, z, stack.itemID, stack.getItemDamage());
+ }
+ }
+ }
+
+ craftingCounter = 0;
+ }
+ else {
+ recipe.playEffect(world, x, y, z);
+ }
+
+ world.setBlockAndMetadataWithNotify( i, j, k, iNewBlockID, iNewBlockMetadata );
+
+ iCraftingCounter = 0;
+ }
+
+ return iCraftingCounter;
+ return craftingCounter;
+ }
+
+ public int GetRotationsToCraftOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return 1;
+ }
+
+ public void OnCraftedOnTurntable( World world, int i, int j, int k )
+ {
+ world.playAuxSFX( FCBetterThanWolves.m_iBlockDestroyRespectParticleSettingsAuxFXID,
+ i, j, k, world.getBlockId( i, j, k ) + ( world.getBlockMetadata( i, j, k ) << 12 ) );
+ }
+
+ public int GetNewBlockIDCraftedOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return 0;
+ }
+
+ public int GetNewMetadataCraftedOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return 0;
+ }
+
+ public int GetItemIDCraftedOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return Item.clay.itemID;
+ }
+
+ public int GetItemCountCraftedOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return 1;
+ }
+
+ public int GetItemDamageCraftedOnTurntable( IBlockAccess blockAccess, int i, int j, int k )
+ {
+ return 0;
+ public void onCraftedOnTurntable(World world, int x, int y, int z) {
+ world.playAuxSFX(FCBetterThanWolves.m_iBlockDestroyRespectParticleSettingsAuxFXID,
+ x, y, z, world.getBlockId(x, y, z) + (world.getBlockMetadata(x, y, z) << 12));
+ }
+
+ /**
Expand Down Expand Up @@ -2748,6 +2720,19 @@
+ m_iPigItemFoodValue = iFoodValue;
+ }
+
+ //------ Misc Animal Functionality ------//
+
+ private boolean alwaysStartlesAnimals;
+
+ public Block setAlwaysStartlesAnimals() {
+ this.alwaysStartlesAnimals = true;
+ return this;
+ }
+
+ public boolean startlesAnimalsWhenPlaced(World world, int x, int y, int z) {
+ return this.alwaysStartlesAnimals || this.blockMaterial.blocksMovement();
+ }
+
+ //----------- Plant Growth Functionality ----------//
+
+ public boolean CanDomesticatedCropsGrowOnBlock( World world, int i, int j, int k )
Expand Down
25 changes: 12 additions & 13 deletions patches/minecraft/net/minecraft/src/Enchantment.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@
}

static
@@ -219,4 +222,24 @@
@@ -219,4 +222,23 @@

field_92090_c = (Enchantment[])var0.toArray(new Enchantment[0]);
}
+
+ // FCMOD: Added New
+ private boolean m_bCanBeAppliedByVanillaEnchanter = true;
+ // FCMOD: Added New
+ private boolean canBeAppliedByVanillaEnchanter = true;
+
+ static
+ {
+ static {
+ // remove the more powerful enchants from the vanilla enchanter
+
+ protection.m_bCanBeAppliedByVanillaEnchanter = false;
+ silkTouch.m_bCanBeAppliedByVanillaEnchanter = false;
+ fortune.m_bCanBeAppliedByVanillaEnchanter = false;
+ sharpness.m_bCanBeAppliedByVanillaEnchanter = false;
+ featherFalling.m_bCanBeAppliedByVanillaEnchanter = false;
+ protection.canBeAppliedByVanillaEnchanter = false;
+ silkTouch.canBeAppliedByVanillaEnchanter = false;
+ fortune.canBeAppliedByVanillaEnchanter = false;
+ sharpness.canBeAppliedByVanillaEnchanter = false;
+ featherFalling.canBeAppliedByVanillaEnchanter = false;
+ fireAspect.canBeAppliedByVanillaEnchanter = false;
}
+
+ public boolean CanBeAppliedByVanillaEnchanter()
+ {
+ return m_bCanBeAppliedByVanillaEnchanter;
+ public boolean CanBeAppliedByVanillaEnchanter() {
+ return canBeAppliedByVanillaEnchanter;
+ }
+ // END FCMOD
+}
20 changes: 17 additions & 3 deletions patches/minecraft/net/minecraft/src/EntityMooshroom.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{
return this.func_94900_c(par1EntityAgeable);
}
@@ -75,4 +85,86 @@
@@ -75,4 +85,100 @@
{
return this.func_94900_c(par1EntityAgeable);
}
Expand Down Expand Up @@ -122,10 +122,24 @@
+
+ //----------- Client Side Functionality -----------//
+
+ @Override
+ @Override
+ public String getTexture()
+ {
+ // override to prevent cow hunger textures being displayed
+ if ( getWearingBreedingHarness() )
+ {
+ return "/btwmodtex/fc_mr_redcow.png";
+ }
+
+ int iHungerLevel = GetHungerLevel();
+
+ if ( iHungerLevel == 1 )
+ {
+ return "/btwmodtex/fcMooshroomFamished.png";
+ }
+ else if ( iHungerLevel == 2 )
+ {
+ return "/btwmodtex/fcMooshroomStarving.png";
+ }
+
+ return texture;
+ }
Expand Down
Loading

0 comments on commit 4b0f7cf

Please sign in to comment.