Skip to content

Commit

Permalink
comment out default recipe nullification and cauldron behavior like t…
Browse files Browse the repository at this point in the history
…hey should be
  • Loading branch information
LemmaEOF committed Mar 31, 2019
1 parent a668981 commit 1d5bc93
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion project.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
projectName = "cotton";
group = "io.github.cottonmc";
version = "0.2.0+19w13b";
version = "0.2.1+19w13b";
snapshot = true;

minecraft = "19w13b";
Expand Down
44 changes: 22 additions & 22 deletions src/main/java/io/github/cottonmc/cotton/Cotton.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,29 @@ public void onInitialize() {
// TagEntryManager.registerToTag(TagType.BLOCK, new Identifier("minecraft:enderman_holdable"), "minecraft:string");
// TagEntryManager.registerToTag(TagType.BLOCK, new Identifier("minecraft:dragon_immune"), "#minecraft:enderman_holdable");
// LootTableManager.registerBasicBlockDropTable(new Identifier("minecraft", "dirt"));
RecipeUtil.removeRecipe(new Identifier("crafting_table"));
// RecipeUtil.removeRecipe(new Identifier("crafting_table"));

//example cauldron behavior code - lets you make obsidian in a cauldron
CauldronBehavior.registerBehavior(
(ctx) -> ctx.getStack().getItem() == Items.WATER_BUCKET
&& FluidTags.LAVA.contains(ctx.getCauldronFluid())
&& ctx.getCauldronLevel() == 3 && !ctx.getWorld().isClient(),
(ctx) -> {
PlayerEntity player = ctx.getPlayer();
World world = ctx.getWorld();
BlockPos pos = ctx.getPos();
if (!player.abilities.creativeMode) {
player.setStackInHand(ctx.getHand(), new ItemStack(Items.BUCKET));
player.increaseStat(Stats.USE_CAULDRON);
CauldronUtils.tryEmptyFluid(world, pos, ctx.getState());
ItemStack obsidian = new ItemStack(Items.OBSIDIAN);
if (!player.inventory.insertStack(obsidian)) {
player.dropItem(obsidian, false);
}
}

ctx.getWorld().playSound(null, ctx.getPos(), SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCK, 1.0f, 1.0f);
}
);
// CauldronBehavior.registerBehavior(
// (ctx) -> ctx.getStack().getItem() == Items.WATER_BUCKET
// && FluidTags.LAVA.contains(ctx.getCauldronFluid())
// && ctx.getCauldronLevel() == 3 && !ctx.getWorld().isClient(),
// (ctx) -> {
// PlayerEntity player = ctx.getPlayer();
// World world = ctx.getWorld();
// BlockPos pos = ctx.getPos();
// if (!player.abilities.creativeMode) {
// player.setStackInHand(ctx.getHand(), new ItemStack(Items.BUCKET));
// player.increaseStat(Stats.USE_CAULDRON);
// CauldronUtils.tryEmptyFluid(world, pos, ctx.getState());
// ItemStack obsidian = new ItemStack(Items.OBSIDIAN);
// if (!player.inventory.insertStack(obsidian)) {
// player.dropItem(obsidian, false);
// }
// }
//
// ctx.getWorld().playSound(null, ctx.getPos(), SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCK, 1.0f, 1.0f);
// }
// );
}
}

0 comments on commit 1d5bc93

Please sign in to comment.