Skip to content

Commit

Permalink
New Campfire, Temperature Rendering, Drink Stacking
Browse files Browse the repository at this point in the history
New campfire model by fonnymunkey
New frost rod / powder textures by Artsy
Tweaked campfire particles slightly
Moved temperature rendering to All phase
Drinks are stackable to 8 now
Removed anvil handler as it's no longer necessary
Bump gradle, updated contributors
  • Loading branch information
Charles445 committed Nov 27, 2021
1 parent dab3f58 commit 96002e4
Show file tree
Hide file tree
Showing 15 changed files with 703 additions and 164 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ List of contributors
Charles445 - anything not specified below

- Assets -
Artsydgy/Artsydy - Temperature HUD Textures, Cloth Armor Item Textures, Cloth Armor Model Textures
Artsydgy/Artsydy - Temperature HUD Textures, Cloth Armor Item Textures, Cloth Armor Model Textures, Frost Powder/Rod Textures
fonnymunkey - Campfire Model
HoontsArt - Dragon Canteen Textures, Iron Canteen Textures, Thermometer Textures
Shivaxi - Thirst HUD Textures
tehmadtitaan - Ice Armor Model Textures, Cloth Armor Model Textures
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge'


version = "1.12.2-0.3.6"
version = "1.12.2-0.3.7"
group = "com.charles445.simpledifficulty" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "SimpleDifficulty"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class BlockCampfire extends Block implements IBlockStateIgnore
public static final PropertyBool BURNING = PropertyBool.create("burning");

private static final IProperty[] ignoredProperties = new IProperty[]{BURNING};
private static final AxisAlignedBB HITBOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.25D, 1.0D);
private static final AxisAlignedBB HITBOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.4D, 1.0D); //Old is 0.25D for height

public BlockCampfire()
{
Expand Down Expand Up @@ -325,7 +325,7 @@ private void createFlameParticle(World world, BlockPos pos, Random rand)



world.spawnParticle(EnumParticleTypes.FLAME, xOffset + pos.getX(), yOffset + pos.getY(), zOffset + pos.getZ(), 0.0d, rand.nextDouble() * 0.015d, 0.0d);
world.spawnParticle(EnumParticleTypes.FLAME, xOffset + pos.getX(), yOffset + pos.getY(), zOffset + pos.getZ(), 0.0d, (rand.nextDouble() * 0.015d) + 0.005d, 0.0d);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class TemperatureGui
@SubscribeEvent
public void onPreRenderGameOverlay(RenderGameOverlayEvent.Pre event)
{
if(event.getType()==ElementType.EXPERIENCE && QuickConfig.isTemperatureEnabled() && mc.playerController.gameIsSurvivalOrAdventure())
if(event.getType()==ElementType.ALL && QuickConfig.isTemperatureEnabled() && mc.playerController.gameIsSurvivalOrAdventure())
{
//Set the seed to avoid shaking during pausing
rand.setSeed((long)(updateCounter * 445));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ public void onDismount(EntityMountEvent event)
}

//Prevent canteens from being repaired in the anvil
//Canteens don't use damage anymore so this is no longer necessary
/*
@SubscribeEvent
public void onAnvilUpdate(AnvilUpdateEvent event)
{
if(event.getLeft().getItem() == SDItems.canteen || event.getRight().getItem() == SDItems.canteen)
event.setCanceled(true);
event.setOutput(ItemStack.EMPTY);
}
*/



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void onRightClickBlock(PlayerInteractEvent.RightClickBlock event)
}
}
}
else if(heldItem.getItem() == SDItems.canteen)
else if(heldItem.getItem() instanceof IItemCanteen)
{
//TODO this is janky and probably not the right place for it anyway

Expand All @@ -199,17 +199,14 @@ else if(heldItem.getItem() == SDItems.canteen)
int level = state.getValue(BlockCauldron.LEVEL);
if(level > 0)
{
if(heldItem.getItem() instanceof IItemCanteen)
IItemCanteen canteen = (IItemCanteen) heldItem.getItem();

if(canteen.tryAddDose(heldItem,ThirstEnum.NORMAL))
{
IItemCanteen canteen = (IItemCanteen) heldItem.getItem();
SoundUtil.serverPlayBlockSound(world, pos, SoundEvents.ITEM_BUCKET_FILL);

if(canteen.tryAddDose(heldItem,ThirstEnum.NORMAL))
{
SoundUtil.serverPlayBlockSound(world, pos, SoundEvents.ITEM_BUCKET_FILL);

//TODO Auto drink bug is present when using canteens on cauldrons
//Not sure how to fix, stop active hand and the scheduled variant don't seem to work
}
//TODO Auto drink bug is present when using canteens on cauldrons
//Not sure how to fix, stop active hand and the scheduled variant don't seem to work
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class ItemDrinkBase extends Item
public ItemDrinkBase()
{
this.setMaxDamage(0);
this.setMaxStackSize(1);
this.setMaxStackSize(8);
}

public void runSecondaryEffect(EntityPlayer player, ItemStack stack)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.charles445.simpledifficulty.util;

import java.util.Objects;

@FunctionalInterface
public interface QuadConsumer<A, B, C, D>
{
void accept(A a, B b, C c, D d);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.charles445.simpledifficulty.util;

import java.util.Objects;

@FunctionalInterface
public interface TriConsumer<A, B, C>
{
void accept(A a, B b, C c);
}
Loading

0 comments on commit 96002e4

Please sign in to comment.