Skip to content

Commit

Permalink
1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ammoore00 authored and SimonMeskens committed Jan 25, 2022
1 parent ae83d8c commit 1d08238
Show file tree
Hide file tree
Showing 23 changed files with 260 additions and 113 deletions.
15 changes: 14 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
## Version 1.3.5 ##
## Version 1.3.6 ##
/--Gameplay--/
- Fixed an issue where sawing corners of wood types with metadata would create gears with metadata which wouldn't stack together or work in recipes. Additionally, recipes involving gears have been changed to ignore metadata so that existing bugged gears can be used.
- Fixed an issue where diamond shears made no sound when used in crafting.

/--Creative Mode--/
- Changed health/hunger status effects to not apply when the player is in creative mode.

/--Addon API--/
- Added hooks to FCAddOn to allow addons to define behavior for decorating the world (for things like trees, ores, etc)
- Added hooks to allow biomes to define whether it can snow at a certain location.
- Changed the checks for breaking the saw to check for if a block has a recipe, removing the need to also disable breaking the saw in the block's class.

Thanks to the following people who contributed to this release!
- Dawnraider
- yany

## Version 1.3.5 ##
/--Gameplay--/
- Fixed an issue where moonlight was erroneously block mobs from spawning on slabs and other partial blocks.
- Fixed an issue where scattered features (temples and witch huts) were not generating properly.
Expand Down
11 changes: 11 additions & 0 deletions patches/minecraft/net/minecraft/src/BiomeDecorator.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/minecraft/net/minecraft/src/BiomeDecorator.java
+++ b/minecraft/net/minecraft/src/BiomeDecorator.java
@@ -376,6 +376,8 @@
(new WorldGenLiquids(Block.lavaMoving.blockID)).generate(this.currentWorld, this.randomGenerator, var3, var4, var7);
}
}
+
+ FCAddOnHandler.decorateWorld(this, this.currentWorld, this.randomGenerator, this.chunk_X, this.chunk_Z, this.biome);
}

/**
6 changes: 5 additions & 1 deletion patches/minecraft/net/minecraft/src/BiomeGenBase.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

/**
* Checks to see if the rainfall level of the biome is extremely high
@@ -352,4 +408,20 @@
@@ -352,4 +408,24 @@
double var3 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
return ColorizerFoliage.getFoliageColor(var1, var3);
}
Expand All @@ -188,5 +188,9 @@
+ public boolean canSlimesSpawnOnSurface() {
+ return false;
+ }
+
+ public boolean canSnowAt(int x, int y, int z) {
+ return this.temperature <= 0.15F;
+ }
+ // END FCMOD
+}
7 changes: 5 additions & 2 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,2345 @@
@@ -1364,10 +1429,2348 @@
}

useNeighborBrightness[var0] = var1;
Expand Down Expand Up @@ -1596,7 +1596,10 @@
+ //------------- Saw related functionality ------------//
+
+ public boolean DoesBlockBreakSaw(World world, int x, int y, int z) {
+ if (blockMaterial.isSolid() && blockMaterial.breaksSaw()) {
+ int metadata = world.getBlockMetadata(x, y, z);
+ FCCraftingManagerSawRecipe recipe = FCCraftingManagerSaw.instance.getRecipe(this, metadata);
+
+ if (blockMaterial.isSolid() && blockMaterial.breaksSaw() && recipe == null) {
+ return true;
+ }
+
Expand Down
8 changes: 6 additions & 2 deletions patches/minecraft/net/minecraft/src/EntityPlayer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@
return this.capabilities.allowEdit ? true : (par5ItemStack != null ? par5ItemStack.func_82835_x() : false);
}

@@ -2183,4 +2374,1150 @@
@@ -2183,4 +2374,1154 @@
{
return ScorePlayerTeam.func_96667_a(this.getTeam(), this.username);
}
Expand Down Expand Up @@ -788,7 +788,7 @@
+ {
+ float fModifier = GetHealthAndExhaustionModifier();
+
+ if ( GetGloomLevel() > 0 )
+ if (GetGloomLevel() > 0 && !this.capabilities.isCreativeMode)
+ {
+ fModifier *= 0.5F;
+ }
Expand Down Expand Up @@ -860,6 +860,10 @@
+
+ public int GetMaximumStatusPenaltyLevel()
+ {
+ if (this.capabilities.isCreativeMode) {
+ return 0;
+ }
+
+ int iMaximumPenaltyLevel = GetHealthPenaltyLevel();
+ int iHungerPenaltyLevel = GetHungerPenaltyLevel();
+
Expand Down
10 changes: 5 additions & 5 deletions patches/minecraft/net/minecraft/src/EntityPlayerMP.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
+
+ private void UpdateHealthAndHungerEffects()
+ {
+ if ( !isDead && ( worldObj.getTotalWorldTime() + (long)entityId ) % 80L == 0L )
+ if ( !isDead && ( worldObj.getTotalWorldTime() + (long)entityId ) % 80L == 0L && !this.capabilities.isCreativeMode )
+ {
+ if ( foodStats.getFoodLevel() <= 0 && foodStats.getSaturationLevel() <= 0F )
+ {
Expand All @@ -379,7 +379,7 @@
+ {
+ if ( !isDead )
+ {
+ if ( IsInGloom() )
+ if ( IsInGloom() && !this.capabilities.isCreativeMode )
+ {
+ m_iInGloomCounter++;
+
Expand Down Expand Up @@ -436,7 +436,7 @@
+ int iFat = (int)foodStats.getSaturationLevel();
+ int iFatLevel = 4;
+
+ if ( iFat < 12 )
+ if ( iFat < 12 || this.capabilities.isCreativeMode)
+ {
+ iFatLevel = 0;
+ }
Expand All @@ -462,7 +462,7 @@
+ int iHunger = foodStats.getFoodLevel();
+ int iPenaltyLevel = 5;
+
+ if ( iHunger > 24 )
+ if ( iHunger > 24 || this.capabilities.isCreativeMode )
+ {
+ iPenaltyLevel = 0;
+ }
Expand Down Expand Up @@ -492,7 +492,7 @@
+ int iHealth = getHealth();
+ int iPenaltyLevel = 5;
+
+ if ( iHealth > 10 )
+ if ( iHealth > 10 || this.capabilities.isCreativeMode )
+ {
+ iPenaltyLevel = 0;
+ }
Expand Down
15 changes: 14 additions & 1 deletion patches/minecraft/net/minecraft/src/FCAddOn.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/minecraft/net/minecraft/src/FCAddOn.java
@@ -0,0 +1,451 @@
@@ -0,0 +1,464 @@
+// FCMOD
+
+package net.minecraft.src;
Expand All @@ -27,6 +27,7 @@
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Set;
+
+import net.minecraft.client.Minecraft;
Expand Down Expand Up @@ -120,6 +121,18 @@
+ return null;
+ }
+
+ /**
+ * Called when decorating a chunk (adding trees, ores, etc) to allow addons to add their own generators
+ * Look in BiomeDecorator for guidance in how to create and use a generator for those things
+ * @param decorator The decorator instance
+ * @param world The current world
+ * @param rand The random number generator. Always use this generator for deterministic generation.
+ * @param x
+ * @param y
+ * @param biome The biome being decorated. Biomes during decoration are lower resolution, only being caluclated per chunk not per block
+ */
+ public void decorateWorld(BiomeDecorator decorator, World world, Random rand, int x, int y, BiomeGenBase biome) {}
+
+ //------ API Methods ------//
+ /*
+ * These are methods which should be called from
Expand Down
11 changes: 10 additions & 1 deletion patches/minecraft/net/minecraft/src/FCAddOnHandler.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/minecraft/net/minecraft/src/FCAddOnHandler.java
@@ -0,0 +1,402 @@
@@ -0,0 +1,411 @@
+// FCMOD
+
+package net.minecraft.src;
Expand All @@ -13,6 +13,7 @@
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.logging.FileHandler;
+import java.util.logging.Level;
Expand Down Expand Up @@ -323,6 +324,14 @@
+ FCAddOnHandler.addonWorldDataMap.put(mod, data);
+ }
+
+ public static void decorateWorld(BiomeDecorator decorator, World world, Random rand, int x, int y, BiomeGenBase biome) {
+ for (Object mod : FCAddOnHandler.m_ModList) {
+ FCAddOn addon = (FCAddOn) mod;
+
+ addon.decorateWorld(decorator, world, rand, x, y, biome);
+ }
+ }
+
+ public static boolean isModInstalled(String name) {
+ for (FCAddOn mod : m_ModList) {
+ if (mod.getName().equals(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
+
+public class FCBetterThanWolves extends FCAddOn
+{
+ public static final String fcVersionString = "1.3.4";
+ public static final String fcVersionString = "1.3.6";
+
+ public static FCBetterThanWolves m_instance = new FCBetterThanWolves();
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
+ }
+
+ @Override
+ public void OnDamagedInCrafting( EntityPlayer player )
+ public void OnUsedInCrafting(EntityPlayer player, ItemStack outputStack)
+ {
+ // note: the playSound function for player both plays the sound locally on the client, and plays it remotely on the server without it being sent again to the same player
+
Expand Down
32 changes: 16 additions & 16 deletions patches/minecraft/net/minecraft/src/FCRecipes.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@
+ "XYX",
+ "#X#",
+ '#', Block.planks,
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', FCBetterThanWolves.fcBlockAxle
+ } );
+
Expand All @@ -1617,7 +1617,7 @@
+ "XYX",
+ "#X#",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', FCBetterThanWolves.fcBlockAxle
+ } );
+
Expand All @@ -1626,7 +1626,7 @@
+ "XYX",
+ "#X#",
+ '#', Block.planks,
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', FCBetterThanWolves.fcItemRedstoneLatch
+ } );
+
Expand All @@ -1635,7 +1635,7 @@
+ "XYX",
+ "#X#",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', FCBetterThanWolves.fcItemRedstoneLatch
+ } );
+
Expand All @@ -1644,15 +1644,15 @@
+ " Y ",
+ "#X#",
+ '#', FCBetterThanWolves.fcItemStoneBrick,
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Item.stick
+ } );
+
+ AddRecipe( new ItemStack( FCBetterThanWolves.fcMillStone ), new Object[] {
+ "YYY",
+ "YYY",
+ "YXY",
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', FCBetterThanWolves.fcItemStoneBrick
+ } );
+
Expand All @@ -1662,7 +1662,7 @@
+ "ZYZ",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', Item.pocketSundial,
+ 'Y', FCBetterThanWolves.fcItemGear,
+ 'Y', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Z', FCBetterThanWolves.fcItemStoneBrick
+ } );
+
Expand All @@ -1672,7 +1672,7 @@
+ "YZY",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemTannedLeather,
+ 'Y', FCBetterThanWolves.fcItemGear,
+ 'Y', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Z', FCBetterThanWolves.fcItemBelt
+ } );
+
Expand All @@ -1682,7 +1682,7 @@
+ "YZY",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemTannedLeatherCut,
+ 'Y', FCBetterThanWolves.fcItemGear,
+ 'Y', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Z', FCBetterThanWolves.fcItemBelt
+ } );
+ }
Expand Down Expand Up @@ -1874,7 +1874,7 @@
+ "XYX",
+ " Z ",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Block.pressurePlatePlanks,
+ 'Z', new ItemStack( FCBetterThanWolves.fcBlockWoodCornerItemStubID, 1, ignoreMetadata )
+ } );
Expand All @@ -1884,7 +1884,7 @@
+ "XZX",
+ "#X#",
+ '#', Block.planks,
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Item.ingotIron,
+ 'Z', FCBetterThanWolves.fcItemBelt
+ } );
Expand All @@ -1894,7 +1894,7 @@
+ "XZX",
+ "#X#",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Item.ingotIron,
+ 'Z', FCBetterThanWolves.fcItemBelt
+ } );
Expand All @@ -1920,7 +1920,7 @@
+ "XZX",
+ "#Y#",
+ '#', Block.planks,
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Item.ingotIron,
+ 'Z', FCBetterThanWolves.fcItemRedstoneLatch
+ } );
Expand All @@ -1931,7 +1931,7 @@
+ "XZX",
+ "#Y#",
+ '#', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'X', FCBetterThanWolves.fcItemGear,
+ 'X', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'Y', Item.ingotIron,
+ 'Z', FCBetterThanWolves.fcItemRedstoneLatch
+ } );
Expand Down Expand Up @@ -2012,7 +2012,7 @@
+ "WSW",
+ "WgW",
+ 'W', new ItemStack( FCBetterThanWolves.fcBlockWoodSidingItemStubID, 1, ignoreMetadata ),
+ 'g', FCBetterThanWolves.fcItemGear,
+ 'g', new ItemStack(FCBetterThanWolves.fcItemGear, 1, ignoreMetadata),
+ 'S', FCBetterThanWolves.fcItemScrew,
+ 'G', FCBetterThanWolves.fcBlockGrate,
+ 'X', FCBetterThanWolves.fcItemGlue
Expand Down Expand Up @@ -5895,7 +5895,7 @@
+ moulding, mouldingMetas);
+
+ //Corners
+ addSawRecipe(new ItemStack(FCBetterThanWolves.fcItemGear, 2, itemMetadata),
+ addSawRecipe(new ItemStack(FCBetterThanWolves.fcItemGear, 2),
+ sidingAndCorner, cornerMetas);
+
+ //Fence
Expand Down
Loading

0 comments on commit 1d08238

Please sign in to comment.