Skip to content

Commit

Permalink
Updated to 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
the-realest-stu committed Dec 28, 2017
1 parent 7dfec3c commit ac4146b
Show file tree
Hide file tree
Showing 25 changed files with 65 additions and 37 deletions.
2 changes: 2 additions & 0 deletions README.txt → README.md
@@ -1 +1,3 @@
# Rustic
---
A medieval themed Minecraft mod based around decoration, exploration, and agriculture
6 changes: 3 additions & 3 deletions build.gradle
Expand Up @@ -69,7 +69,7 @@ jar {

apply from: 'dependencies.gradle'

version = "0.4.3"
version = "0.4.4"
group = "com.mangoose.rustic"
archivesBaseName = "rustic"

Expand All @@ -79,10 +79,10 @@ compileJava {
}

minecraft {
version = "1.12.1-14.22.1.2478"
version = "1.12.2-14.23.1.2582"
runDir = "run"

mappings = "snapshot_20170726"
mappings = "snapshot_20171003"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
@@ -1,7 +1,7 @@
dependencies {
provided 'inventory-tweaks:InventoryTweaks:1.63'
provided 'inventory-tweaks:InventoryTweaks:1.63:api'
deobfCompile "mezz.jei:jei_1.12.1:4.7.8.91"
provided "quark:Quark:r1.2:101"
compile "CraftTweaker2:CraftTweaker2-API:4.0.10.298"
deobfCompile "net.sengir.forestry:forestry_1.12.1:5.5.5.196"
deobfCompile "net.sengir.forestry:forestry_1.12.2:5.5.6.197"
}
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Nov 30 01:14:43 CST 2017
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
1 change: 1 addition & 0 deletions src/main/java/rustic/common/EventHandlerCommon.java
Expand Up @@ -194,6 +194,7 @@ public void onPlayerUseGlassBottle(PlayerInteractEvent.RightClickBlock event) {
ItemStack stack = event.getItemStack();
World world = event.getWorld();
RayTraceResult raytraceresult = GenericUtils.rayTrace(world, player, true);
if (raytraceresult == null || raytraceresult.getBlockPos() == null) return;
BlockPos pos2 = raytraceresult.getBlockPos();
if (player.canPlayerEdit(pos2, event.getFace(), stack)
&& player.canPlayerEdit(pos2.offset(raytraceresult.sideHit), raytraceresult.sideHit, stack)) {
Expand Down
Expand Up @@ -131,8 +131,8 @@ public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int
@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
if (state.getValue(BOTTOM)) {
if (worldIn.getTileEntity(pos) != null && worldIn.getTileEntity(pos) instanceof TileEntityCondenser) {
((TileEntityCondenser) worldIn.getTileEntity(pos)).breakBlock(worldIn, pos, state);
if (worldIn.getTileEntity(pos) != null && worldIn.getTileEntity(pos) instanceof TileEntityCondenserAdvanced) {
((TileEntityCondenserAdvanced) worldIn.getTileEntity(pos)).breakBlock(worldIn, pos, state);
worldIn.removeTileEntity(pos);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/blocks/BlockLattice.java
Expand Up @@ -220,7 +220,7 @@ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos
public IItemColor getItemColor() {
return new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
public int colorMultiplier(ItemStack stack, int tintIndex) {
IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
IBlockColor blockColor = ((IColoredBlock) state.getBlock()).getBlockColor();
return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/blocks/BlockLeavesRustic.java
Expand Up @@ -255,7 +255,7 @@ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos
public IItemColor getItemColor() {
return new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
public int colorMultiplier(ItemStack stack, int tintIndex) {
IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
IBlockColor blockColor = ((IColoredBlock) state.getBlock()).getBlockColor();
return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/blocks/BlockLiquidBarrel.java
Expand Up @@ -131,7 +131,7 @@ public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, B

@Override
public void fillWithRain(World worldIn, BlockPos pos) {
float f = worldIn.getBiome(pos).getFloatTemperature(pos);
float f = worldIn.getBiome(pos).getTemperature(pos);

if (worldIn.getBiomeProvider().getTemperatureAtHeight(f, pos.getY()) >= 0.15F) {
TileEntity te = worldIn.getTileEntity(pos);
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/rustic/common/blocks/crops/BlockBerryBush.java
Expand Up @@ -86,7 +86,7 @@ public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random ra
net.minecraftforge.common.ForgeHooks.onCropsGrowPost(worldIn, pos, state,
worldIn.getBlockState(pos));
}
} else {
}/* else {
float f = getGrowthChance(this, worldIn, pos);
if (numNeighbors(worldIn, pos) < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(worldIn, pos,
Expand All @@ -95,7 +95,7 @@ public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random ra
net.minecraftforge.common.ForgeHooks.onCropsGrowPost(worldIn, pos, state,
worldIn.getBlockState(pos));
}
}
}*/
}
}

Expand Down Expand Up @@ -154,8 +154,10 @@ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, En
EnumFacing side, float hitX, float hitY, float hitZ) {
if (state.getValue(BERRIES)) {
world.setBlockState(pos, state.withProperty(BERRIES, false), 3);
state.getBlock().spawnAsEntity(world, pos.offset(side),
new ItemStack(getBerries()));
ItemStack stack = new ItemStack(getBerries());
if (!player.addItemStackToInventory(stack)) {
Block.spawnAsEntity(world, pos.offset(player.getHorizontalFacing().getOpposite()), stack);
}
return true;
}
return false;
Expand Down Expand Up @@ -293,7 +295,7 @@ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos
public IItemColor getItemColor() {
return new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
public int colorMultiplier(ItemStack stack, int tintIndex) {
IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
IBlockColor blockColor = ((IColoredBlock) state.getBlock()).getBlockColor();
return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex);
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/rustic/common/blocks/crops/BlockGrapeLeaves.java
Expand Up @@ -440,13 +440,20 @@ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos
@SideOnly(Side.CLIENT)
@Override
public IItemColor getItemColor() {
return null;
return new IItemColor() {
@Override
public int colorMultiplier(ItemStack stack, int tintIndex) {
IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
IBlockColor blockColor = ((IColoredBlock) state.getBlock()).getBlockColor();
return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex);
}
};
}

@Override
@SideOnly(Side.CLIENT)
public void initModel() {

ClientProxy.addColoredBlock(this);
}

}
Expand Up @@ -285,7 +285,7 @@ public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos
public IItemColor getItemColor() {
return new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
public int colorMultiplier(ItemStack stack, int tintIndex) {
IBlockState state = ((ItemBlock) stack.getItem()).getBlock().getStateFromMeta(stack.getMetadata());
IBlockColor blockColor = ((IColoredBlock) state.getBlock()).getBlockColor();
return blockColor == null ? 0xFFFFFF : blockColor.colorMultiplier(state, null, null, tintIndex);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/rustic/common/crafting/Recipes.java
Expand Up @@ -108,10 +108,13 @@ private static void addOreDictEntries() {
OreDictionary.registerOre("listAllberry", new ItemStack(ModItems.GRAPES));
OreDictionary.registerOre("listAllberry", new ItemStack(ModItems.IRONBERRIES));
OreDictionary.registerOre("listAllberry", new ItemStack(ModItems.WILDBERRIES));
OreDictionary.registerOre("listAllfruit", new ItemStack(ModItems.WILDBERRIES));
OreDictionary.registerOre("cropWildberry", new ItemStack(ModItems.WILDBERRIES));
OreDictionary.registerOre("cropGrape", new ItemStack(ModItems.GRAPES));
OreDictionary.registerOre("cropChilipepper", new ItemStack(ModItems.CHILI_PEPPER));
OreDictionary.registerOre("listAllpepper", new ItemStack(ModItems.CHILI_PEPPER));
OreDictionary.registerOre("cropTomato", new ItemStack(ModItems.TOMATO));
OreDictionary.registerOre("listAllveggie", new ItemStack(ModItems.TOMATO));

for (int i = 0; i < BlockPlanksRustic.EnumType.values().length; i++) {
IBlockState state = ModBlocks.LOG.getDefaultState().withProperty(BlockLogRustic.VARIANT,
Expand Down Expand Up @@ -142,6 +145,8 @@ private static void addOreDictEntries() {

OreDictionary.registerOre("wax", new ItemStack(ModItems.BEESWAX));
OreDictionary.registerOre("wax", new ItemStack(ModItems.TALLOW));
OreDictionary.registerOre("tallow", new ItemStack(ModItems.BEESWAX));
OreDictionary.registerOre("tallow", new ItemStack(ModItems.TALLOW));

OreDictionary.registerOre("dustTinyIron", new ItemStack(ModItems.IRON_DUST_TINY));

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/items/ItemBook.java
Expand Up @@ -14,7 +14,7 @@ public class ItemBook extends ItemBase {

public ItemBook() {
super("book");
setMaxStackSize(0);
setMaxStackSize(1);
setMaxDamage(0);
setCreativeTab(Rustic.decorTab);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/items/ItemElixir.java
Expand Up @@ -134,7 +134,7 @@ public void addInformation(ItemStack stack, @Nullable World worldIn, List<String
public IItemColor getItemColor() {
return new IItemColor() {
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
public int colorMultiplier(ItemStack stack, int tintIndex) {
if (tintIndex == 0) {
return ElixirUtils.getColor(stack);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/common/items/ModItems.java
Expand Up @@ -108,7 +108,7 @@ public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer play
0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!worldIn.isRemote) {
EntityTomato entitytomato = new EntityTomato(worldIn, playerIn);
entitytomato.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw,
entitytomato.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw,
0.0F, 1.5F, 1.0F);
worldIn.spawnEntity(entitytomato);
}
Expand Down
Expand Up @@ -126,6 +126,11 @@ public void readFromNBT(NBTTagCompound tag) {
brewTime = tag.getInteger("brewTime");
}
}

@Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
return oldState.getBlock() != newState.getBlock();
}

@Override
public NBTTagCompound getUpdateTag() {
Expand Down
Expand Up @@ -337,7 +337,7 @@ public boolean canBrew() {
return false;
}

if (this.getAmount() <= 125) {
if (this.getAmount() < 125) {
return false;
}

Expand Down
Expand Up @@ -89,6 +89,12 @@ public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate

public TileEntityCondenserAdvanced() {
super();
tank = new FluidTank(capacity) {
@Override
protected void onContentsChanged() {
markDirty();
}
};
tank.setTileEntity(this);
tank.setCanFill(true);
tank.setCanDrain(true);
Expand Down Expand Up @@ -356,7 +362,7 @@ public boolean canBrew() {
return false;
}

if (this.getAmount() <= 125) {
if (this.getAmount() < 125) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rustic/core/Rustic.java
Expand Up @@ -46,7 +46,7 @@
public class Rustic {
public static final String MODID = "rustic";
public static final String NAME = "Rustic";
public static final String VERSION = "0.4.2.1";
public static final String VERSION = "0.4.4";
public static final String DEPENDENCIES = "";

@SidedProxy(clientSide = "rustic.core.ClientProxy", serverSide = "rustic.core.CommonProxy")
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/assets/rustic/blockstates/grape_leaves.json
Expand Up @@ -2,6 +2,10 @@
"forge_marker": 1,
"defaults": { "model": "rustic:grape_leaves_0" },
"variants": {
"distance": {
0: { "submodel": { "stem": { "model": "rustic:grape_stem_top" } } },
1: { "model": "rustic:grape_leaves_1" }
},
"axis": {
"z": { "submodel": { "rope": { "model": "rustic:rope_horizontal" }, "vine": { "model": "rustic:grape_vine" } } },
"x": { "submodel": { "rope": { "model": "rustic:rope_horizontal" }, "vine": { "model": "rustic:grape_vine" } }, "y": 90 }
Expand All @@ -10,14 +14,10 @@
"true": { "submodel": { "dangle": { "model": "rustic:rope_dangle" }, "knot": {"model": "rustic:rope_knot"} } },
"false": {}
},
"grapes": {
"grapes": {
"true": { "submodel": { "grapes": { "model": "rustic:grapes" } } },
"false": {}
},
"distance": {
0: { "submodel": { "stem": { "model": "rustic:grape_stem_top" } } },
1: { "model": "rustic:grape_leaves_1" }
},
},
"inventory": []
}
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/rustic/blockstates/rope.json
@@ -1,6 +1,6 @@
{
"forge_marker": 1,
"defaults": {},
"defaults": { "model": "rustic:rope_horizontal" },
"variants": {
"axis": {
"y": { "model": "rustic:rope" },
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/rustic/lang/en_us.lang
Expand Up @@ -186,7 +186,7 @@ effect.tipsy=Inebriated

#Elixirs
rustic.elixir.prefix=Elixir of
rutsic.elixir.separator=,
rustic.elixir.separator=,

#JEI Categories
rustic.jei.recipe.crushing_tub=Crushing Tub
Expand Down Expand Up @@ -271,7 +271,7 @@ book.rustic.text.tomatoes_1=Tomato vines can grow upwards onto crop stakes, but
book.rustic.text.chili_peppers=Chili peppers are the fruit of chili pepper plants, which can be grown on crop stakes. Chili Pepper seeds can be found by breaking tall grass, and can be planted by interacting with a crop stake with the seeds in hand. The seeds can only be planted on crop stakes that are above farmland or fertile soil. When mature, chili pepper plants produce chili peppers. When the plant has chili peppers, it can also grow upward onto crop stakes, but only up to a height of 2 blocks tall.
book.rustic.text.chili_peppers_1=Chili peppers can be harvested from mature plants by interacting with or breaking the plant. It is better not to break the plant, as broken plants will need to regrow before bearing more chili peppers. Chili peppers can be eaten, but doing so will cause some fire damage due to the spiciness of the crop. However, eating them also gives a short buff to the consumer's speed. Chili peppers can also be used as an alchemy ingredient.
book.rustic.text.wildberries=Wildberries come from wildberry bushes. Wildberry bushes spawn naturally throughout the overworld in warm, but not dry climates. Wildberries can be harvested from fully grown bushes by interacting with the bush. Breaking the bush also works, but then the bush must be replaced.
book.rustic.text.wildberries_1=Wildberry bushes naturally multiply under certain conditions. They must be fully grown (have berries), and they must have fewer than two wildberry bushes within the eight surrounding blocks. Wildberries can be eaten, but they are not very filling. However, they can be eaten faster than normal foods, and they grow very quickly.
book.rustic.text.wildberries_1=Wildberry bushes will not reproduce naturally, but bonemeal can be applied to make them spread. Wildberries can be eaten, but they are not very filling. However, they can be eaten faster than normal foods, and they grow very quickly.
book.rustic.text.wildberry_juice=Crushing wildberries in a crushing tub yields the berries' juice. When drank from a bottle, wildberry juice fills some hunger and saturation, with a chance of providing a regeneration buff, and a smaller chance of poisoning the consumer. Wildberry juice can also be brewed into wildberry wine.
book.rustic.text.grapes=Grapes come from grape vines, which are grown with grape seeds on farmland or fertile soil. Grape seeds can be found by breaking vines. Grape seeds grow into grape stems, which, if they have horizontal ropes above them, grow onto the ropes, forming vines. The vines then spread one block outward along the rope, so long as there is rope to grow onto. The outer vines will grow grapes so long as there isn't a block directly underneath them.
book.rustic.text.grapes_1=Grapes can be harvested from grape vines by interacting with or breaking fully grown vines. It is better not to break the vine, as broken vines must regrow before producing more grapes. Grapes can be eaten, taking half as long to eat as normal foods.
Expand Down
Expand Up @@ -2,7 +2,7 @@
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
"0": "blocks/leaves_oak",
"particle": "blocks/leaves_oak"
"particle": "blocks/leaves_oak"
},
"elements": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/the-realest-stu/Rustic",
"updateUrl": "",
"authorList": ["the-realest-stu"],
"credits": "The Forge and FML guys, for making this example",
"credits": "",
"logoFile": "",
"screenshots": [],
"dependencies": []
Expand Down

0 comments on commit ac4146b

Please sign in to comment.