Skip to content

Commit

Permalink
version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yany2 committed Mar 27, 2022
1 parent 0745074 commit 532d1dd
Show file tree
Hide file tree
Showing 61 changed files with 5,513 additions and 127 deletions.
9 changes: 5 additions & 4 deletions README.md
@@ -1,18 +1,18 @@
# Yany's Stuff & Things Addon
Are you literally me? Then this addon might just be the thing for you. It changes BTW - especially the early game - to make it more interesting for my own preferred play style. You can find out more in the changelog in the repo, or in the associated thread on the BTW forums [here](https://sargunster.com/btwforum/viewtopic.php?f=12&t=9873).
Are you literally me? Then this addon might just be the thing for you. It changes BTW - especially the early game - to make it more interesting for my own preferred play style. You can find out more in the changelog in the repo, or in the associated [thread](https://sargunster.com/btwforum/viewtopic.php?f=12&t=9873) on the BTW forums.

# Installation
You can install the addon to your Better Than Wolves instance by adding the contents of the released zip to your minecraft.jar, the same way you installed Better Than Wolves.

You should not install my Boat Mapping and Click Bait addons together with this one, as those are already included in their own way.
You should not install my Boat Mapping addon together with this one, as it is already included.

I have not made a lot of effort to keep this compatible with other addons. If another addon modifies the same classes, you can expect it to be incompatible with this one for the time being.

# Using the source code

I haven't tried setting up a working environment based on the source code, but it should generally involve

1. Obtaining the source code of BTW CE 1.3.4
1. Obtaining the source code of BTW CE 1.3.4 from [BTW-Public](https://github.com/BTW-Community/BTW-Public)
2. Copying the addon source files in `minecraft` and `minecraft_server`
3. Applying `src.patch` to the above using git
4. Putting the contents of the resources wherever MCP expects them to be
Expand All @@ -22,7 +22,7 @@ If you're interested in building the mod yourself and run into trouble, feel fre

## The patch modifies:
```
EntityCreature.java
EntityAnimal.java
EntityCreeper.java
EntityFishHook.java
EntityItem.java
Expand All @@ -32,6 +32,7 @@ FoodStats.java
ItemMap.java
Potion.java
PotionEffect.java
SpawnerAnimals.java
```
Client only:
```
Expand Down
14 changes: 14 additions & 0 deletions changelog.txt
@@ -1,3 +1,17 @@
Version 1.2.0 - 2022-03-27

- Changed Zombies, Spiders, and Squids to not attack animals that spawned on world generation and haven't interacted with a player. Note that this only applies to animals in newly generated chunks.
- Removed passive, food based health regeneration. The only ways of gaining health now are potions (and Golden Apples) and the following mechanics.
- Added healing totem poles. They can be created by "enchanting" a sapling, and carving the tree trunk it eventually grow into. Saplings can be enchanted for a cost of 2 XP levels by right clicking them while holding the alternate use button (Ctrl). The eyes on carved totem poles will eventually turn green, at which point right clicking the bottom block heals the player. New totems can't be created too close to already existing totems.
- Increased the durability and speed of the Iron Chisel, and slightly decreased the speed of the Diamond Chisel.
- Added a new Drop Spindle item. It is crafted with a Pointy Stick above a Loose Stone, and it can be used to spin a piece of Wool into String.
- Changed Knitting to give 2 Wool Knit from 1 Wool instead of the previous 1 Wool Knit from 2 Wool.
- Changed Bark Stitching to be crafted with 4 Bark and no String, and Bark Boxes to be crafted with 4 Stiched Bark.
- Reverted the previous change that made Spiders notice players from further away.
- Changed Hardcore Spawn to reset the moon phase to a full moon in singleplayer.
- Fixed an issue that caused some armor indicator icons to not show up when the player maximum health was below 10 hearts.


Version 1.1.0 - 2022-01-07

- Added a new system that determines the maximum health of the player.
Expand Down
53 changes: 44 additions & 9 deletions src/minecraft/net/minecraft/src/FCBlockSaplingLegacy.java
Expand Up @@ -43,18 +43,53 @@ public void updateTick(World world, int i, int j, int k, Random random)
}

@Override
//Debug method
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!FCUtilsReflection.isObfuscated()) {
if (!world.isRemote) {
attemptToGrow(world, x, y, z, world.rand);
if(player.experienceLevel>=2 && player.isUsingSpecialKey())
{
boolean canEnchant = true;
foundBlock:
for(int i=-YYBlockTotemBottom.blockingRange; i<=YYBlockTotemBottom.blockingRange; i++)
{
for(int k=-YYBlockTotemBottom.blockingRange; k<=YYBlockTotemBottom.blockingRange; k++)
{
for(int y1=0; y1<256; y1++)
{
int x1 = x+i;
int z1 = z+k;
int id = world.getBlockId(x1, y1, z1);
int metadata = world.getBlockMetadata(x1, y1, z1);
if
(
id==YYStuffAndThings.yyBlockTotemBottom.blockID ||
id==YYStuffAndThings.yyBlockTotemSapling.blockID ||
(id==YYStuffAndThings.yyBlockTotemCarving.blockID && (metadata&8)==8)
)
{
canEnchant=false;
if(!world.isRemote)
{
int xd = YYBlockTotemBottom.blockingRange - Math.abs(i) +1;
int zd = YYBlockTotemBottom.blockingRange - Math.abs(k) +1;
player.addChatMessage
(
"Try doing that " + xd + " block" + (xd!=1?"s":"") + " to the " + (i<0 ? "East" : "West") +
" or " + zd + " block" + (zd!=1?"s":"") + " to the " + (k>0 ? "North" : "South")
);
}
break foundBlock;
}
}
}
}

if(canEnchant)
{
player.experienceLevel-=2;
world.setBlockWithNotify(x, y, z, YYStuffAndThings.yyBlockTotemSapling.blockID);
return true;
}

return true;
}
else {
return false;
}
return false;
}

@Override
Expand Down

0 comments on commit 532d1dd

Please sign in to comment.