Creative Crate Revival
- The creative crate is back on the menu - Schematicannons with creative crates no longer require gunpowder to operate - Creative crates can now be used for infinite item supply and voiding - Added a few more advancements
|
@ -74,7 +74,7 @@ import com.simibubi.create.modules.logistics.block.diodes.ToggleLatchBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock;
|
import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorBlock;
|
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.funnel.FunnelBlock;
|
import com.simibubi.create.modules.logistics.block.funnel.FunnelBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.inventories.CrateBlock;
|
import com.simibubi.create.modules.logistics.block.inventories.CreativeCrateBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock;
|
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerBlock;
|
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerBlock;
|
||||||
import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock;
|
import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock;
|
||||||
|
@ -182,10 +182,8 @@ public enum AllBlocks {
|
||||||
CONTACT(new ContactBlock()),
|
CONTACT(new ContactBlock()),
|
||||||
REDSTONE_BRIDGE(new RedstoneLinkBlock()),
|
REDSTONE_BRIDGE(new RedstoneLinkBlock()),
|
||||||
STOCKSWITCH(new StockswitchBlock()),
|
STOCKSWITCH(new StockswitchBlock()),
|
||||||
WAREHOUSE_CRATE(new CrateBlock(Properties.from(Blocks.ANDESITE))),
|
|
||||||
FLEXCRATE(new FlexcrateBlock()),
|
FLEXCRATE(new FlexcrateBlock()),
|
||||||
FILTERED_CRATE(new CrateBlock(Properties.from(Blocks.ANDESITE))),
|
CREATIVE_CRATE(new CreativeCrateBlock(Properties.from(Blocks.ANDESITE))),
|
||||||
CREATIVE_CRATE(new CrateBlock(Properties.from(Blocks.ANDESITE))),
|
|
||||||
EXTRACTOR(new ExtractorBlock()),
|
EXTRACTOR(new ExtractorBlock()),
|
||||||
VERTICAL_EXTRACTOR(new ExtractorBlock.Vertical()),
|
VERTICAL_EXTRACTOR(new ExtractorBlock.Vertical()),
|
||||||
LINKED_EXTRACTOR(new LinkedExtractorBlock()),
|
LINKED_EXTRACTOR(new LinkedExtractorBlock()),
|
||||||
|
|
|
@ -82,6 +82,7 @@ import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterTileEntityRe
|
||||||
import com.simibubi.create.modules.logistics.block.extractor.ExtractorTileEntity;
|
import com.simibubi.create.modules.logistics.block.extractor.ExtractorTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorTileEntity;
|
import com.simibubi.create.modules.logistics.block.extractor.LinkedExtractorTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.funnel.FunnelTileEntity;
|
import com.simibubi.create.modules.logistics.block.funnel.FunnelTileEntity;
|
||||||
|
import com.simibubi.create.modules.logistics.block.inventories.CreativeCrateTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateTileEntity;
|
import com.simibubi.create.modules.logistics.block.inventories.FlexcrateTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerTileEntity;
|
import com.simibubi.create.modules.logistics.block.transposer.LinkedTransposerTileEntity;
|
||||||
import com.simibubi.create.modules.logistics.block.transposer.TransposerTileEntity;
|
import com.simibubi.create.modules.logistics.block.transposer.TransposerTileEntity;
|
||||||
|
@ -153,6 +154,7 @@ public enum AllTileEntities {
|
||||||
REDSTONE_BRIDGE(RedstoneLinkTileEntity::new, AllBlocks.REDSTONE_BRIDGE),
|
REDSTONE_BRIDGE(RedstoneLinkTileEntity::new, AllBlocks.REDSTONE_BRIDGE),
|
||||||
STOCKSWITCH(StockswitchTileEntity::new, AllBlocks.STOCKSWITCH),
|
STOCKSWITCH(StockswitchTileEntity::new, AllBlocks.STOCKSWITCH),
|
||||||
FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE),
|
FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE),
|
||||||
|
CREATIVE_CRATE(CreativeCrateTileEntity::new, AllBlocks.CREATIVE_CRATE),
|
||||||
EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR),
|
EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR),
|
||||||
LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR),
|
LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR),
|
||||||
TRANSPOSER(TransposerTileEntity::new, AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER),
|
TRANSPOSER(TransposerTileEntity::new, AllBlocks.TRANSPOSER, AllBlocks.VERTICAL_TRANSPOSER),
|
||||||
|
@ -235,6 +237,7 @@ public enum AllTileEntities {
|
||||||
bind(FurnaceEngineTileEntity.class, new EngineRenderer<>());
|
bind(FurnaceEngineTileEntity.class, new EngineRenderer<>());
|
||||||
bind(SpeedControllerTileEntity.class, new SpeedControllerRenderer());
|
bind(SpeedControllerTileEntity.class, new SpeedControllerRenderer());
|
||||||
|
|
||||||
|
bind(CreativeCrateTileEntity.class, new SmartTileEntityRenderer<>());
|
||||||
bind(RedstoneLinkTileEntity.class, new SmartTileEntityRenderer<>());
|
bind(RedstoneLinkTileEntity.class, new SmartTileEntityRenderer<>());
|
||||||
bind(ExtractorTileEntity.class, new SmartTileEntityRenderer<>());
|
bind(ExtractorTileEntity.class, new SmartTileEntityRenderer<>());
|
||||||
bind(LinkedExtractorTileEntity.class, new SmartTileEntityRenderer<>());
|
bind(LinkedExtractorTileEntity.class, new SmartTileEntityRenderer<>());
|
||||||
|
|
|
@ -26,6 +26,7 @@ public enum ScreenResources {
|
||||||
SCHEMATICANNON_PROGRESS_2("schematicannon.png", 122, 161, 16, 15),
|
SCHEMATICANNON_PROGRESS_2("schematicannon.png", 122, 161, 16, 15),
|
||||||
SCHEMATICANNON_HIGHLIGHT("schematicannon.png", 0, 182, 28, 28),
|
SCHEMATICANNON_HIGHLIGHT("schematicannon.png", 0, 182, 28, 28),
|
||||||
SCHEMATICANNON_FUEL("schematicannon.png", 0, 215, 82, 4),
|
SCHEMATICANNON_FUEL("schematicannon.png", 0, 215, 82, 4),
|
||||||
|
SCHEMATICANNON_FUEL_CREATIVE("schematicannon.png", 0, 219, 82, 4),
|
||||||
|
|
||||||
FLEXCRATE("flex_crate_and_stockpile_switch.png", 125, 129),
|
FLEXCRATE("flex_crate_and_stockpile_switch.png", 125, 129),
|
||||||
FLEXCRATE_DOUBLE("double_flexcrate.png", 197, 129),
|
FLEXCRATE_DOUBLE("double_flexcrate.png", 197, 129),
|
||||||
|
|
|
@ -16,11 +16,13 @@ import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.advancement.KineticBlockTrigger;
|
import com.simibubi.create.foundation.advancement.KineticBlockTrigger;
|
||||||
|
import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem;
|
||||||
|
import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier;
|
||||||
|
import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem.Components;
|
||||||
|
|
||||||
import net.minecraft.advancements.Advancement;
|
import net.minecraft.advancements.Advancement;
|
||||||
import net.minecraft.advancements.Advancement.Builder;
|
import net.minecraft.advancements.Advancement.Builder;
|
||||||
import net.minecraft.advancements.FrameType;
|
import net.minecraft.advancements.FrameType;
|
||||||
import net.minecraft.advancements.IRequirementsStrategy;
|
|
||||||
import net.minecraft.advancements.criterion.InventoryChangeTrigger;
|
import net.minecraft.advancements.criterion.InventoryChangeTrigger;
|
||||||
import net.minecraft.advancements.criterion.PlacedBlockTrigger;
|
import net.minecraft.advancements.criterion.PlacedBlockTrigger;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -28,6 +30,7 @@ import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.data.DataGenerator;
|
import net.minecraft.data.DataGenerator;
|
||||||
import net.minecraft.data.DirectoryCache;
|
import net.minecraft.data.DirectoryCache;
|
||||||
import net.minecraft.data.IDataProvider;
|
import net.minecraft.data.IDataProvider;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.util.IItemProvider;
|
import net.minecraft.util.IItemProvider;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
@ -55,7 +58,6 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
.withCriterion("0", itemGathered(AllItems.ANDESITE_ALLOY.get()))
|
.withCriterion("0", itemGathered(AllItems.ANDESITE_ALLOY.get()))
|
||||||
.register(t, id + ":andesite_alloy");
|
.register(t, id + ":andesite_alloy");
|
||||||
|
|
||||||
|
|
||||||
kineticsBranch(t, andesite_alloy);
|
kineticsBranch(t, andesite_alloy);
|
||||||
|
|
||||||
Advancement water_wheel = advancement("water_wheel", AllBlocks.WATER_WHEEL.get(), TaskType.NORMAL)
|
Advancement water_wheel = advancement("water_wheel", AllBlocks.WATER_WHEEL.get(), TaskType.NORMAL)
|
||||||
|
@ -77,7 +79,7 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
.withParent(andesite_alloy)
|
.withParent(andesite_alloy)
|
||||||
.withCriterion("0", itemGathered(AllBlocks.ANDESITE_CASING.get()))
|
.withCriterion("0", itemGathered(AllBlocks.ANDESITE_CASING.get()))
|
||||||
.register(t, id + ":andesite_casing");
|
.register(t, id + ":andesite_casing");
|
||||||
|
|
||||||
andesiteExpertLane(t, andesite_casing);
|
andesiteExpertLane(t, andesite_casing);
|
||||||
|
|
||||||
Advancement drill = kinecticAdvancement("drill", AllBlocks.DRILL, TaskType.NORMAL)
|
Advancement drill = kinecticAdvancement("drill", AllBlocks.DRILL, TaskType.NORMAL)
|
||||||
|
@ -89,9 +91,10 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
.withCriterion("0", AllTriggers.BONK.instance())
|
.withCriterion("0", AllTriggers.BONK.instance())
|
||||||
.register(t, id + ":press");
|
.register(t, id + ":press");
|
||||||
|
|
||||||
Advancement rose_quartz = itemAdvancement("polished_rose_quartz", AllItems.POLISHED_ROSE_QUARTZ, TaskType.NORMAL)
|
Advancement rose_quartz =
|
||||||
.withParent(andesite_casing)
|
itemAdvancement("polished_rose_quartz", AllItems.POLISHED_ROSE_QUARTZ, TaskType.NORMAL)
|
||||||
.register(t, id + ":polished_rose_quartz");
|
.withParent(andesite_casing)
|
||||||
|
.register(t, id + ":polished_rose_quartz");
|
||||||
|
|
||||||
Advancement electron_tube = itemAdvancement("electron_tube", AllItems.ELECTRON_TUBE, TaskType.NORMAL)
|
Advancement electron_tube = itemAdvancement("electron_tube", AllItems.ELECTRON_TUBE, TaskType.NORMAL)
|
||||||
.withParent(rose_quartz)
|
.withParent(rose_quartz)
|
||||||
|
@ -123,6 +126,7 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
.register(t, id + ":brass");
|
.register(t, id + ":brass");
|
||||||
|
|
||||||
brassAge(t, brass);
|
brassAge(t, brass);
|
||||||
|
copperAge(t, press);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kineticsBranch(Consumer<Advancement> t, Advancement root) {
|
void kineticsBranch(Consumer<Advancement> t, Advancement root) {
|
||||||
|
@ -166,6 +170,20 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copperAge(Consumer<Advancement> t, Advancement root) {
|
||||||
|
String id = Create.ID;
|
||||||
|
|
||||||
|
Advancement copper_casing = advancement("copper_casing", AllBlocks.COPPER_CASING.get(), TaskType.GOAL)
|
||||||
|
.withParent(root)
|
||||||
|
.withCriterion("0", itemGathered(AllBlocks.COPPER_CASING.get()))
|
||||||
|
.register(t, id + ":copper_casing");
|
||||||
|
|
||||||
|
Advancement copper_end = deadEnd()
|
||||||
|
.withParent(copper_casing)
|
||||||
|
.withCriterion("0", itemGathered(AllBlocks.COPPER_CASING.get()))
|
||||||
|
.register(t, id + ":copper_end");
|
||||||
|
}
|
||||||
|
|
||||||
void brassAge(Consumer<Advancement> t, Advancement root) {
|
void brassAge(Consumer<Advancement> t, Advancement root) {
|
||||||
String id = Create.ID;
|
String id = Create.ID;
|
||||||
|
|
||||||
|
@ -182,7 +200,7 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
.withParent(brass_casing)
|
.withParent(brass_casing)
|
||||||
.register(t, id + ":deployer");
|
.register(t, id + ":deployer");
|
||||||
|
|
||||||
Advancement fist_bump = advancement("fist_bump", AllBlocks.LARGE_COGWHEEL.get(), TaskType.SECRET)
|
Advancement fist_bump = advancement("fist_bump", AllBlocks.DEPLOYER.get(), TaskType.SECRET)
|
||||||
.withParent(deployer)
|
.withParent(deployer)
|
||||||
.withCriterion("0", AllTriggers.DEPLOYER_BOOP.instance())
|
.withCriterion("0", AllTriggers.DEPLOYER_BOOP.instance())
|
||||||
.register(t, id + ":fist_bump");
|
.register(t, id + ":fist_bump");
|
||||||
|
@ -196,21 +214,44 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
itemAdvancement("chromatic_compound", AllItems.CHROMATIC_COMPOUND, TaskType.NORMAL)
|
itemAdvancement("chromatic_compound", AllItems.CHROMATIC_COMPOUND, TaskType.NORMAL)
|
||||||
.withParent(crushing_wheel)
|
.withParent(crushing_wheel)
|
||||||
.register(t, id + ":chromatic_compound");
|
.register(t, id + ":chromatic_compound");
|
||||||
|
|
||||||
Advancement shadow_steel =
|
Advancement shadow_steel = itemAdvancement("shadow_steel", AllItems.SHADOW_STEEL, TaskType.GOAL)
|
||||||
itemAdvancement("shadow_steel", AllItems.SHADOW_STEEL, TaskType.GOAL)
|
|
||||||
.withParent(chromatic_compound)
|
.withParent(chromatic_compound)
|
||||||
.register(t, id + ":shadow_steel");
|
.register(t, id + ":shadow_steel");
|
||||||
|
|
||||||
Advancement refined_radiance =
|
Advancement refined_radiance = itemAdvancement("refined_radiance", AllItems.REFINED_RADIANCE, TaskType.GOAL)
|
||||||
itemAdvancement("refined_radiance", AllItems.REFINED_RADIANCE, TaskType.GOAL)
|
|
||||||
.withParent(chromatic_compound)
|
.withParent(chromatic_compound)
|
||||||
.register(t, id + ":refined_radiance");
|
.register(t, id + ":refined_radiance");
|
||||||
|
|
||||||
|
Advancement deforester = itemAdvancement("deforester", AllItems.DEFORESTER, TaskType.NORMAL)
|
||||||
|
.withParent(refined_radiance)
|
||||||
|
.register(t, id + ":deforester");
|
||||||
|
|
||||||
|
Advancement zapper = itemAdvancement("zapper", AllItems.PLACEMENT_HANDGUN, TaskType.NORMAL)
|
||||||
|
.withParent(refined_radiance)
|
||||||
|
.register(t, id + ":zapper");
|
||||||
|
|
||||||
|
ItemStack gunWithPurpurStuff = AllItems.PLACEMENT_HANDGUN.asStack();
|
||||||
|
for (Components c : Components.values())
|
||||||
|
BlockzapperItem.setTier(c, ComponentTier.Chromatic, gunWithPurpurStuff);
|
||||||
|
Advancement upgraded_zapper = advancement("upgraded_zapper", gunWithPurpurStuff, TaskType.CHALLENGE)
|
||||||
|
.withCriterion("0", AllTriggers.UPGRADED_ZAPPER.instance())
|
||||||
|
.withParent(zapper)
|
||||||
|
.register(t, id + ":upgraded_zapper");
|
||||||
|
|
||||||
|
Advancement symmetry_wand = itemAdvancement("symmetry_wand", AllItems.SYMMETRY_WAND, TaskType.NORMAL)
|
||||||
|
.withParent(refined_radiance)
|
||||||
|
.register(t, id + ":symmetry_wand");
|
||||||
|
|
||||||
|
Advancement shadow_end = deadEnd()
|
||||||
|
.withParent(shadow_steel)
|
||||||
|
.withCriterion("0", itemGathered(AllItems.SHADOW_STEEL.get()))
|
||||||
|
.register(t, id + ":shadow_end");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void andesiteExpertLane(Consumer<Advancement> t, Advancement root) {
|
private void andesiteExpertLane(Consumer<Advancement> t, Advancement root) {
|
||||||
String id = Create.ID;
|
String id = Create.ID;
|
||||||
|
|
||||||
Advancement expert_lane_1 = advancement("expert_lane_1", Blocks.ANDESITE, TaskType.SILENT_GATE)
|
Advancement expert_lane_1 = advancement("expert_lane_1", Blocks.ANDESITE, TaskType.SILENT_GATE)
|
||||||
.withParent(root)
|
.withParent(root)
|
||||||
.withCriterion("0", itemGathered(AllBlocks.ANDESITE_CASING.get()))
|
.withCriterion("0", itemGathered(AllBlocks.ANDESITE_CASING.get()))
|
||||||
|
@ -277,6 +318,7 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
GOAL(FrameType.GOAL, true, true, false),
|
GOAL(FrameType.GOAL, true, true, false),
|
||||||
SECRET(FrameType.GOAL, true, true, true),
|
SECRET(FrameType.GOAL, true, true, true),
|
||||||
SILENT_GATE(FrameType.CHALLENGE, false, false, false),
|
SILENT_GATE(FrameType.CHALLENGE, false, false, false),
|
||||||
|
CHALLENGE(FrameType.CHALLENGE, true, true, false),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -300,6 +342,14 @@ public class CreateAdvancements implements IDataProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder advancement(String name, IItemProvider icon, TaskType type) {
|
public Builder advancement(String name, IItemProvider icon, TaskType type) {
|
||||||
|
return advancement(name, new ItemStack(icon), type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder deadEnd() {
|
||||||
|
return advancement("eob", Items.OAK_SAPLING, TaskType.SILENT_GATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder advancement(String name, ItemStack icon, TaskType type) {
|
||||||
return Advancement.Builder
|
return Advancement.Builder
|
||||||
.builder()
|
.builder()
|
||||||
.withDisplay(icon, new TranslationTextComponent(LANG + name),
|
.withDisplay(icon, new TranslationTextComponent(LANG + name),
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class AllTriggers {
|
||||||
SPEED_READ = simple("speed_read"),
|
SPEED_READ = simple("speed_read"),
|
||||||
BASIN_THROW = simple("basin"),
|
BASIN_THROW = simple("basin"),
|
||||||
PRESS_COMPACT = simple("compact"),
|
PRESS_COMPACT = simple("compact"),
|
||||||
|
UPGRADED_ZAPPER = simple("upgraded_zapper"),
|
||||||
MIXER_MIX = simple("mixer");
|
MIXER_MIX = simple("mixer");
|
||||||
|
|
||||||
private static SimpleTrigger simple(String id) {
|
private static SimpleTrigger simple(String id) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.simibubi.create.foundation.behaviour.filtering;
|
package com.simibubi.create.foundation.behaviour.filtering;
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.simibubi.create.AllPackets;
|
import com.simibubi.create.AllPackets;
|
||||||
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
|
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
|
||||||
|
@ -29,6 +30,7 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
||||||
private ItemStack filter;
|
private ItemStack filter;
|
||||||
public int count;
|
public int count;
|
||||||
private Consumer<ItemStack> callback;
|
private Consumer<ItemStack> callback;
|
||||||
|
private Supplier<Boolean> isActive;
|
||||||
|
|
||||||
int scrollableValue;
|
int scrollableValue;
|
||||||
int ticksUntilScrollPacket;
|
int ticksUntilScrollPacket;
|
||||||
|
@ -40,6 +42,7 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
||||||
slotPositioning = slot;
|
slotPositioning = slot;
|
||||||
showCount = false;
|
showCount = false;
|
||||||
callback = stack -> {};
|
callback = stack -> {};
|
||||||
|
isActive = () -> true;
|
||||||
textShift = Vec3d.ZERO;
|
textShift = Vec3d.ZERO;
|
||||||
count = 0;
|
count = 0;
|
||||||
ticksUntilScrollPacket = -1;
|
ticksUntilScrollPacket = -1;
|
||||||
|
@ -93,6 +96,11 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
||||||
callback = filterCallback;
|
callback = filterCallback;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FilteringBehaviour onlyActiveWhen(Supplier<Boolean> condition) {
|
||||||
|
isActive = condition;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public FilteringBehaviour showCount() {
|
public FilteringBehaviour showCount() {
|
||||||
showCount = true;
|
showCount = true;
|
||||||
|
@ -161,5 +169,9 @@ public class FilteringBehaviour extends TileEntityBehaviour {
|
||||||
public boolean anyAmount() {
|
public boolean anyAmount() {
|
||||||
return count == 0;
|
return count == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isActive() {
|
||||||
|
return isActive.get();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@ public class FilteringHandler {
|
||||||
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
|
if (!behaviour.isActive())
|
||||||
|
return;
|
||||||
|
|
||||||
BlockRayTraceResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
BlockRayTraceResult ray = RaycastHelper.rayTraceRange(world, player, 10);
|
||||||
if (ray == null)
|
if (ray == null)
|
||||||
|
|
|
@ -41,6 +41,8 @@ public class FilteringRenderer {
|
||||||
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
FilteringBehaviour behaviour = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
|
if (!behaviour.isActive())
|
||||||
|
return;
|
||||||
if (Minecraft.getInstance().player.isSneaking())
|
if (Minecraft.getInstance().player.isSneaking())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -75,6 +77,8 @@ public class FilteringRenderer {
|
||||||
FilteringBehaviour behaviour = TileEntityBehaviour.get(tileEntityIn, FilteringBehaviour.TYPE);
|
FilteringBehaviour behaviour = TileEntityBehaviour.get(tileEntityIn, FilteringBehaviour.TYPE);
|
||||||
if (behaviour == null)
|
if (behaviour == null)
|
||||||
return;
|
return;
|
||||||
|
if (!behaviour.isActive())
|
||||||
|
return;
|
||||||
if (behaviour.getFilter().isEmpty())
|
if (behaviour.getFilter().isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.block.render.CustomRenderedItemModel;
|
import com.simibubi.create.foundation.block.render.CustomRenderedItemModel;
|
||||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||||
import com.simibubi.create.foundation.item.IHaveCustomItemModel;
|
import com.simibubi.create.foundation.item.IHaveCustomItemModel;
|
||||||
|
@ -110,8 +111,10 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel
|
||||||
continue;
|
continue;
|
||||||
if (!player.isCreative() && BlockHelper.findAndRemoveInInventory(selectedState, player, 1) == 0) {
|
if (!player.isCreative() && BlockHelper.findAndRemoveInInventory(selectedState, player, 1) == 0) {
|
||||||
player.getCooldownTracker().setCooldown(stack.getItem(), 20);
|
player.getCooldownTracker().setCooldown(stack.getItem(), 20);
|
||||||
player.sendStatusMessage(
|
player
|
||||||
new StringTextComponent(TextFormatting.RED + Lang.translate("blockzapper.empty")), true);
|
.sendStatusMessage(
|
||||||
|
new StringTextComponent(TextFormatting.RED + Lang.translate("blockzapper.empty")),
|
||||||
|
true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,9 +122,9 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel
|
||||||
dropBlocks(world, player, stack, face, placed);
|
dropBlocks(world, player, stack, face, placed);
|
||||||
|
|
||||||
for (Direction updateDirection : Direction.values())
|
for (Direction updateDirection : Direction.values())
|
||||||
selectedState = selectedState.updatePostPlacement(updateDirection,
|
selectedState = selectedState
|
||||||
world.getBlockState(placed.offset(updateDirection)), world, placed,
|
.updatePostPlacement(updateDirection, world.getBlockState(placed.offset(updateDirection)),
|
||||||
placed.offset(updateDirection));
|
world, placed, placed.offset(updateDirection));
|
||||||
|
|
||||||
BlockSnapshot blocksnapshot = BlockSnapshot.getBlockSnapshot(world, placed);
|
BlockSnapshot blocksnapshot = BlockSnapshot.getBlockSnapshot(world, placed);
|
||||||
IFluidState ifluidstate = world.getFluidState(placed);
|
IFluidState ifluidstate = world.getFluidState(placed);
|
||||||
|
@ -132,9 +135,20 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player instanceof ServerPlayerEntity)
|
if (player instanceof ServerPlayerEntity && world instanceof ServerWorld) {
|
||||||
CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayerEntity) player, placed,
|
ServerPlayerEntity serverPlayer = (ServerPlayerEntity) player;
|
||||||
new ItemStack(selectedState.getBlock()));
|
CriteriaTriggers.PLACED_BLOCK.trigger(serverPlayer, placed, new ItemStack(selectedState.getBlock()));
|
||||||
|
|
||||||
|
boolean fullyUpgraded = true;
|
||||||
|
for (Components c : Components.values()) {
|
||||||
|
if (getTier(c, stack) != ComponentTier.Chromatic) {
|
||||||
|
fullyUpgraded = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fullyUpgraded)
|
||||||
|
AllTriggers.UPGRADED_ZAPPER.trigger(serverPlayer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -179,8 +193,9 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel
|
||||||
|
|
||||||
Vec3d start = player.getPositionVec().add(0, player.getEyeHeight(), 0);
|
Vec3d start = player.getPositionVec().add(0, player.getEyeHeight(), 0);
|
||||||
Vec3d range = player.getLookVec().scale(getRange(stack));
|
Vec3d range = player.getLookVec().scale(getRange(stack));
|
||||||
BlockRayTraceResult raytrace = player.world.rayTraceBlocks(
|
BlockRayTraceResult raytrace = player.world
|
||||||
new RayTraceContext(start, start.add(range), BlockMode.COLLIDER, FluidMode.NONE, player));
|
.rayTraceBlocks(
|
||||||
|
new RayTraceContext(start, start.add(range), BlockMode.COLLIDER, FluidMode.NONE, player));
|
||||||
BlockPos pos = raytrace.getPos().toImmutable();
|
BlockPos pos = raytrace.getPos().toImmutable();
|
||||||
|
|
||||||
if (pos == null)
|
if (pos == null)
|
||||||
|
@ -318,8 +333,8 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel
|
||||||
Block.spawnDrops(worldIn.getBlockState(placed), worldIn, playerIn.getPosition(), tileentity);
|
Block.spawnDrops(worldIn.getBlockState(placed), worldIn, playerIn.getPosition(), tileentity);
|
||||||
|
|
||||||
if (getTier(Components.Retriever, item) == ComponentTier.Chromatic)
|
if (getTier(Components.Retriever, item) == ComponentTier.Chromatic)
|
||||||
for (ItemStack stack : Block.getDrops(worldIn.getBlockState(placed), (ServerWorld) worldIn, placed,
|
for (ItemStack stack : Block
|
||||||
tileentity))
|
.getDrops(worldIn.getBlockState(placed), (ServerWorld) worldIn, placed, tileentity))
|
||||||
if (!playerIn.inventory.addItemStackToInventory(stack))
|
if (!playerIn.inventory.addItemStackToInventory(stack))
|
||||||
Block.spawnAsEntity(worldIn, placed, stack);
|
Block.spawnAsEntity(worldIn, placed, stack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class LatchBlock extends ToggleLatchBlock {
|
||||||
Direction direction = state.get(HORIZONTAL_FACING);
|
Direction direction = state.get(HORIZONTAL_FACING);
|
||||||
Direction left = direction.rotateY();
|
Direction left = direction.rotateY();
|
||||||
Direction right = direction.rotateYCCW();
|
Direction right = direction.rotateYCCW();
|
||||||
boolean shouldSide = worldIn.isBlockPowered(pos.offset(left)) || worldIn.isBlockPowered(pos.offset(right));
|
boolean shouldSide = worldIn.isSidePowered(pos, left) || worldIn.isSidePowered(pos, right);
|
||||||
|
|
||||||
TickPriority tickpriority = TickPriority.HIGH;
|
TickPriority tickpriority = TickPriority.HIGH;
|
||||||
if (this.isFacingTowardsRepeater(worldIn, pos, state))
|
if (this.isFacingTowardsRepeater(worldIn, pos, state))
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.simibubi.create.modules.logistics.block.inventories;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.behaviour.base.SmartTileEntity;
|
||||||
|
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Direction.AxisDirection;
|
||||||
|
|
||||||
|
public abstract class CrateTileEntity extends SmartTileEntity {
|
||||||
|
|
||||||
|
public CrateTileEntity(TileEntityType<?> tileEntityTypeIn) {
|
||||||
|
super(tileEntityTypeIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addBehaviours(List<TileEntityBehaviour> behaviours) {}
|
||||||
|
|
||||||
|
public boolean isDoubleCrate() {
|
||||||
|
return getBlockState().get(FlexcrateBlock.DOUBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSecondaryCrate() {
|
||||||
|
if (!hasWorld())
|
||||||
|
return false;
|
||||||
|
if (!(getBlockState().getBlock() instanceof CrateBlock))
|
||||||
|
return false;
|
||||||
|
return isDoubleCrate() && getFacing().getAxisDirection() == AxisDirection.NEGATIVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Direction getFacing() {
|
||||||
|
return getBlockState().get(FlexcrateBlock.FACING);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.simibubi.create.modules.logistics.block.inventories;
|
||||||
|
|
||||||
|
import com.simibubi.create.foundation.block.ITE;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.IBlockReader;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class CreativeCrateBlock extends CrateBlock implements ITE<CreativeCrateTileEntity> {
|
||||||
|
|
||||||
|
public CreativeCrateBlock(Properties p_i48415_1_) {
|
||||||
|
super(p_i48415_1_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasTileEntity(BlockState state) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||||
|
return new CreativeCrateTileEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||||
|
withTileEntityDo(worldIn, pos, CreativeCrateTileEntity::onPlaced);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<CreativeCrateTileEntity> getTileEntityClass() {
|
||||||
|
return CreativeCrateTileEntity.class;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.simibubi.create.modules.logistics.block.inventories;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
|
public class CreativeCrateInventory implements IItemHandler {
|
||||||
|
|
||||||
|
private CreativeCrateTileEntity te;
|
||||||
|
|
||||||
|
public CreativeCrateInventory(CreativeCrateTileEntity te) {
|
||||||
|
this.te = te;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSlots() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getStackInSlot(int slot) {
|
||||||
|
if (slot == 1)
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
ItemStack filter = te.filter.getFilter().copy();
|
||||||
|
if (!filter.isEmpty())
|
||||||
|
filter.setCount(filter.getMaxStackSize());
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack extractItem(int slot, int amount, boolean simulate) {
|
||||||
|
ItemStack filter = te.filter.getFilter().copy();
|
||||||
|
if (!filter.isEmpty())
|
||||||
|
filter.setCount(amount);
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSlotLimit(int slot) {
|
||||||
|
return getStackInSlot(slot).getMaxStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemValid(int slot, ItemStack stack) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.simibubi.create.modules.logistics.block.inventories;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllBlocks;
|
||||||
|
import com.simibubi.create.AllTileEntities;
|
||||||
|
import com.simibubi.create.foundation.behaviour.ValueBoxTransform;
|
||||||
|
import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour;
|
||||||
|
import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
|
public class CreativeCrateTileEntity extends CrateTileEntity {
|
||||||
|
|
||||||
|
public CreativeCrateTileEntity() {
|
||||||
|
super(AllTileEntities.CREATIVE_CRATE.type);
|
||||||
|
inv = new CreativeCrateInventory(this);
|
||||||
|
itemHandler = LazyOptional.of(() -> inv);
|
||||||
|
}
|
||||||
|
|
||||||
|
FilteringBehaviour filter;
|
||||||
|
LazyOptional<IItemHandler> itemHandler;
|
||||||
|
private CreativeCrateInventory inv;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
||||||
|
filter = createFilter();
|
||||||
|
filter.onlyActiveWhen(this::filterVisible);
|
||||||
|
filter.withCallback(this::filterChanged);
|
||||||
|
behaviours.add(filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean filterVisible() {
|
||||||
|
if (!hasWorld() || isDoubleCrate() && !isSecondaryCrate())
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void filterChanged(ItemStack filter) {
|
||||||
|
if (!filterVisible())
|
||||||
|
return;
|
||||||
|
CreativeCrateTileEntity otherCrate = getOtherCrate();
|
||||||
|
if (otherCrate == null)
|
||||||
|
return;
|
||||||
|
if (ItemStack.areItemsEqual(filter, otherCrate.filter.getFilter()))
|
||||||
|
return;
|
||||||
|
otherCrate.filter.setFilter(filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CreativeCrateTileEntity getOtherCrate() {
|
||||||
|
if (!AllBlocks.CREATIVE_CRATE.typeOf(getBlockState()))
|
||||||
|
return null;
|
||||||
|
TileEntity tileEntity = world.getTileEntity(pos.offset(getFacing()));
|
||||||
|
if (tileEntity instanceof CreativeCrateTileEntity)
|
||||||
|
return (CreativeCrateTileEntity) tileEntity;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onPlaced() {
|
||||||
|
if (!isDoubleCrate())
|
||||||
|
return;
|
||||||
|
CreativeCrateTileEntity otherCrate = getOtherCrate();
|
||||||
|
if (otherCrate == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
filter.withCallback($ -> {});
|
||||||
|
filter.setFilter(otherCrate.filter.getFilter());
|
||||||
|
filter.withCallback(this::filterChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
|
||||||
|
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
||||||
|
return itemHandler.cast();
|
||||||
|
return super.getCapability(cap, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilteringBehaviour createFilter() {
|
||||||
|
return new FilteringBehaviour(this, new ValueBoxTransform() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Vec3d getOrientation(BlockState state) {
|
||||||
|
return new Vec3d(0, 0, 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Vec3d getLocation(BlockState state) {
|
||||||
|
return new Vec3d(0.5, 13 / 16d, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getScale() {
|
||||||
|
return super.getScale() * 1.5f;
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -2,7 +2,6 @@ package com.simibubi.create.modules.logistics.block.inventories;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllTileEntities;
|
import com.simibubi.create.AllTileEntities;
|
||||||
import com.simibubi.create.foundation.block.SyncedTileEntity;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
@ -15,7 +14,6 @@ import net.minecraft.network.PacketBuffer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.Direction.AxisDirection;
|
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.StringTextComponent;
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
|
@ -24,7 +22,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
public class FlexcrateTileEntity extends SyncedTileEntity implements INamedContainerProvider {
|
public class FlexcrateTileEntity extends CrateTileEntity implements INamedContainerProvider {
|
||||||
|
|
||||||
public class Inv extends ItemStackHandler {
|
public class Inv extends ItemStackHandler {
|
||||||
public Inv() {
|
public Inv() {
|
||||||
|
@ -81,20 +79,6 @@ public class FlexcrateTileEntity extends SyncedTileEntity implements INamedConta
|
||||||
return new FlexcrateContainer(id, inventory, this);
|
return new FlexcrateContainer(id, inventory, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDoubleCrate() {
|
|
||||||
return getBlockState().get(FlexcrateBlock.DOUBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public FlexcrateTileEntity getMainCrate() {
|
|
||||||
if (isSecondaryCrate())
|
|
||||||
return getOtherCrate();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSecondaryCrate() {
|
|
||||||
return isDoubleCrate() && getFacing().getAxisDirection() == AxisDirection.NEGATIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public FlexcrateTileEntity getOtherCrate() {
|
public FlexcrateTileEntity getOtherCrate() {
|
||||||
if (!AllBlocks.FLEXCRATE.typeOf(getBlockState()))
|
if (!AllBlocks.FLEXCRATE.typeOf(getBlockState()))
|
||||||
return null;
|
return null;
|
||||||
|
@ -104,10 +88,12 @@ public class FlexcrateTileEntity extends SyncedTileEntity implements INamedConta
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Direction getFacing() {
|
public FlexcrateTileEntity getMainCrate() {
|
||||||
return getBlockState().get(FlexcrateBlock.FACING);
|
if (isSecondaryCrate())
|
||||||
|
return getOtherCrate();
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSplit() {
|
public void onSplit() {
|
||||||
FlexcrateTileEntity other = getOtherCrate();
|
FlexcrateTileEntity other = getOtherCrate();
|
||||||
if (other == null)
|
if (other == null)
|
||||||
|
|
|
@ -82,18 +82,20 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
resetButton = new IconButton(x + 106, y + 55, ScreenResources.I_STOP);
|
resetButton = new IconButton(x + 106, y + 55, ScreenResources.I_STOP);
|
||||||
resetIndicator = new Indicator(x + 106, y + 50, "");
|
resetIndicator = new Indicator(x + 106, y + 50, "");
|
||||||
resetIndicator.state = State.RED;
|
resetIndicator.state = State.RED;
|
||||||
Collections.addAll(widgets, playButton, playIndicator, pauseButton, pauseIndicator, resetButton,
|
Collections
|
||||||
resetIndicator);
|
.addAll(widgets, playButton, playIndicator, pauseButton, pauseIndicator, resetButton, resetIndicator);
|
||||||
|
|
||||||
// Replace settings
|
// Replace settings
|
||||||
replaceLevelButtons = new Vector<>(4);
|
replaceLevelButtons = new Vector<>(4);
|
||||||
replaceLevelIndicators = new Vector<>(4);
|
replaceLevelIndicators = new Vector<>(4);
|
||||||
List<ScreenResources> icons = ImmutableList.of(ScreenResources.I_DONT_REPLACE, ScreenResources.I_REPLACE_SOLID,
|
List<ScreenResources> icons = ImmutableList
|
||||||
ScreenResources.I_REPLACE_ANY, ScreenResources.I_REPLACE_EMPTY);
|
.of(ScreenResources.I_DONT_REPLACE, ScreenResources.I_REPLACE_SOLID, ScreenResources.I_REPLACE_ANY,
|
||||||
List<String> toolTips = ImmutableList.of(Lang.translate("gui.schematicannon.option.dontReplaceSolid"),
|
ScreenResources.I_REPLACE_EMPTY);
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithSolid"),
|
List<String> toolTips = ImmutableList
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithAny"),
|
.of(Lang.translate("gui.schematicannon.option.dontReplaceSolid"),
|
||||||
Lang.translate("gui.schematicannon.option.replaceWithEmpty"));
|
Lang.translate("gui.schematicannon.option.replaceWithSolid"),
|
||||||
|
Lang.translate("gui.schematicannon.option.replaceWithAny"),
|
||||||
|
Lang.translate("gui.schematicannon.option.replaceWithEmpty"));
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
replaceLevelIndicators.add(new Indicator(x + 16 + i * 18, y + 96, ""));
|
replaceLevelIndicators.add(new Indicator(x + 16 + i * 18, y + 96, ""));
|
||||||
|
@ -189,8 +191,10 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
boolean enabled = indicator.state == State.ON;
|
boolean enabled = indicator.state == State.ON;
|
||||||
List<String> tip = button.getToolTip();
|
List<String> tip = button.getToolTip();
|
||||||
tip.add(TextFormatting.BLUE + (enabled ? optionEnabled : optionDisabled));
|
tip.add(TextFormatting.BLUE + (enabled ? optionEnabled : optionDisabled));
|
||||||
tip.addAll(TooltipHelper.cutString(Lang.translate("gui.schematicannon.option." + tooltipKey + ".description"),
|
tip
|
||||||
GRAY, GRAY));
|
.addAll(TooltipHelper
|
||||||
|
.cutString(Lang.translate("gui.schematicannon.option." + tooltipKey + ".description"), GRAY,
|
||||||
|
GRAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -221,8 +225,9 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
font.drawStringWithShadow(msg, guiLeft + 20 + 96 - stringWidth / 2, guiTop + 30, 0xCCDDFF);
|
font.drawStringWithShadow(msg, guiLeft + 20 + 96 - stringWidth / 2, guiTop + 30, 0xCCDDFF);
|
||||||
|
|
||||||
font.drawString(settingsTitle, guiLeft + 20 + 13, guiTop + 84, ScreenResources.FONT_COLOR);
|
font.drawString(settingsTitle, guiLeft + 20 + 13, guiTop + 84, ScreenResources.FONT_COLOR);
|
||||||
font.drawString(playerInventory.getDisplayName().getFormattedText(), guiLeft - 10 + 7, guiTop + 145 + 6,
|
font
|
||||||
0x666666);
|
.drawString(playerInventory.getDisplayName().getFormattedText(), guiLeft - 10 + 7, guiTop + 145 + 6,
|
||||||
|
0x666666);
|
||||||
|
|
||||||
// to see or debug the bounds of the extra area uncomment the following lines
|
// to see or debug the bounds of the extra area uncomment the following lines
|
||||||
// Rectangle2d r = extraAreas.get(0);
|
// Rectangle2d r = extraAreas.get(0);
|
||||||
|
@ -268,6 +273,10 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
|
|
||||||
protected void renderFuelBar(float amount) {
|
protected void renderFuelBar(float amount) {
|
||||||
ScreenResources sprite = ScreenResources.SCHEMATICANNON_FUEL;
|
ScreenResources sprite = ScreenResources.SCHEMATICANNON_FUEL;
|
||||||
|
if (container.getTileEntity().hasCreativeCrate) {
|
||||||
|
ScreenResources.SCHEMATICANNON_FUEL_CREATIVE.draw(this, guiLeft + 20 + 73, guiTop + 135);
|
||||||
|
return;
|
||||||
|
}
|
||||||
minecraft.getTextureManager().bindTexture(sprite.location);
|
minecraft.getTextureManager().bindTexture(sprite.location);
|
||||||
blit(guiLeft + 20 + 73, guiTop + 135, sprite.startX, sprite.startY, (int) (sprite.width * amount),
|
blit(guiLeft + 20 + 73, guiTop + 135, sprite.startX, sprite.startY, (int) (sprite.width * amount),
|
||||||
sprite.height);
|
sprite.height);
|
||||||
|
@ -287,11 +296,14 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
||||||
+ te.inventory.getStackInSlot(4).getCount() * (te.getFuelAddedByGunPowder() / fuelUsageRate));
|
+ te.inventory.getStackInSlot(4).getCount() * (te.getFuelAddedByGunPowder() / fuelUsageRate));
|
||||||
|
|
||||||
List<String> tooltip = new ArrayList<>();
|
List<String> tooltip = new ArrayList<>();
|
||||||
tooltip.add(Lang.translate(_gunpowderLevel, "" + (int) (te.fuelLevel * 100)));
|
float f = te.hasCreativeCrate ? 100 : te.fuelLevel * 100;
|
||||||
tooltip.add(GRAY + Lang.translate(_shotsRemaining, "" + TextFormatting.BLUE + shotsLeft));
|
tooltip.add(Lang.translate(_gunpowderLevel, "" + (int) f));
|
||||||
|
if (!te.hasCreativeCrate)
|
||||||
|
tooltip.add(GRAY + Lang.translate(_shotsRemaining, "" + TextFormatting.BLUE + shotsLeft));
|
||||||
if (shotsLeftWithItems != shotsLeft)
|
if (shotsLeftWithItems != shotsLeft)
|
||||||
tooltip.add(GRAY
|
tooltip
|
||||||
+ Lang.translate(_shotsRemainingWithBackup, "" + TextFormatting.BLUE + shotsLeftWithItems));
|
.add(GRAY + Lang
|
||||||
|
.translate(_shotsRemainingWithBackup, "" + TextFormatting.BLUE + shotsLeftWithItems));
|
||||||
|
|
||||||
renderTooltip(tooltip, mouseX, mouseY);
|
renderTooltip(tooltip, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,7 +359,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Fuel
|
// Check Fuel
|
||||||
if (fuelLevel <= 0) {
|
if (fuelLevel <= 0 && !hasCreativeCrate) {
|
||||||
fuelLevel = 0;
|
fuelLevel = 0;
|
||||||
state = State.PAUSED;
|
state = State.PAUSED;
|
||||||
statusMsg = "noGunpowder";
|
statusMsg = "noGunpowder";
|
||||||
|
@ -466,7 +466,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getFuelUsageRate() {
|
public double getFuelUsageRate() {
|
||||||
return config().schematicannonFuelUsage.get() / 100f;
|
return hasCreativeCrate ? 0 : config().schematicannonFuelUsage.get() / 100f;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initializePrinter(ItemStack blueprint) {
|
protected void initializePrinter(ItemStack blueprint) {
|
||||||
|
@ -556,8 +556,10 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
int amountFound = 0;
|
int amountFound = 0;
|
||||||
for (IItemHandler iItemHandler : attachedInventories) {
|
for (IItemHandler iItemHandler : attachedInventories) {
|
||||||
|
|
||||||
amountFound += ItemHelper.extract(iItemHandler, s -> ItemRequirement.validate(required, s),
|
amountFound += ItemHelper
|
||||||
ExtractionCountMode.UPTO, required.getCount(), true).getCount();
|
.extract(iItemHandler, s -> ItemRequirement.validate(required, s), ExtractionCountMode.UPTO,
|
||||||
|
required.getCount(), true)
|
||||||
|
.getCount();
|
||||||
|
|
||||||
if (amountFound < required.getCount())
|
if (amountFound < required.getCount())
|
||||||
continue;
|
continue;
|
||||||
|
@ -570,14 +572,16 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
if (!simulate && success) {
|
if (!simulate && success) {
|
||||||
int amountFound = 0;
|
int amountFound = 0;
|
||||||
for (IItemHandler iItemHandler : attachedInventories) {
|
for (IItemHandler iItemHandler : attachedInventories) {
|
||||||
amountFound += ItemHelper.extract(iItemHandler, s -> ItemRequirement.validate(required, s),
|
amountFound += ItemHelper
|
||||||
ExtractionCountMode.UPTO, required.getCount(), false).getCount();
|
.extract(iItemHandler, s -> ItemRequirement.validate(required, s), ExtractionCountMode.UPTO,
|
||||||
|
required.getCount(), false)
|
||||||
|
.getCount();
|
||||||
if (amountFound < required.getCount())
|
if (amountFound < required.getCount())
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,14 +622,16 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
|
|
||||||
public void finishedPrinting() {
|
public void finishedPrinting() {
|
||||||
inventory.setStackInSlot(0, ItemStack.EMPTY);
|
inventory.setStackInSlot(0, ItemStack.EMPTY);
|
||||||
inventory.setStackInSlot(1,
|
inventory
|
||||||
new ItemStack(AllItems.EMPTY_BLUEPRINT.get(), inventory.getStackInSlot(1).getCount() + 1));
|
.setStackInSlot(1,
|
||||||
|
new ItemStack(AllItems.EMPTY_BLUEPRINT.get(), inventory.getStackInSlot(1).getCount() + 1));
|
||||||
state = State.STOPPED;
|
state = State.STOPPED;
|
||||||
statusMsg = "finished";
|
statusMsg = "finished";
|
||||||
resetPrinter();
|
resetPrinter();
|
||||||
target = getPos().add(1, 0, 0);
|
target = getPos().add(1, 0, 0);
|
||||||
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_FINISH.get(),
|
world
|
||||||
SoundCategory.BLOCKS, 1, .7f);
|
.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_FINISH.get(),
|
||||||
|
SoundCategory.BLOCKS, 1, .7f);
|
||||||
sendUpdate = true;
|
sendUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,6 +709,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void refillFuelIfPossible() {
|
protected void refillFuelIfPossible() {
|
||||||
|
if (hasCreativeCrate)
|
||||||
|
return;
|
||||||
if (1 - fuelLevel + 1 / 128f < getFuelAddedByGunPowder())
|
if (1 - fuelLevel + 1 / 128f < getFuelAddedByGunPowder())
|
||||||
return;
|
return;
|
||||||
if (inventory.getStackInSlot(4).isEmpty())
|
if (inventory.getStackInSlot(4).isEmpty())
|
||||||
|
@ -772,8 +780,9 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playFiringSound() {
|
public void playFiringSound() {
|
||||||
world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.get(),
|
world
|
||||||
SoundCategory.BLOCKS, .1f, 1.1f);
|
.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.get(),
|
||||||
|
SoundCategory.BLOCKS, .1f, 1.1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendToContainer(PacketBuffer buffer) {
|
public void sendToContainer(PacketBuffer buffer) {
|
||||||
|
@ -837,8 +846,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
|
public void addBehaviours(List<TileEntityBehaviour> behaviours) {}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void lazyTick() {
|
public void lazyTick() {
|
||||||
|
|
|
@ -131,9 +131,7 @@
|
||||||
"block.create.contact": "Redstone Contact",
|
"block.create.contact": "Redstone Contact",
|
||||||
"block.create.redstone_bridge": "Redstone Link",
|
"block.create.redstone_bridge": "Redstone Link",
|
||||||
"block.create.stockswitch": "Stockpile Switch",
|
"block.create.stockswitch": "Stockpile Switch",
|
||||||
"block.create.warehouse_crate": "Warehouse Crate",
|
|
||||||
"block.create.flexcrate": "Adjustable Crate",
|
"block.create.flexcrate": "Adjustable Crate",
|
||||||
"block.create.filtered_crate": "Filtered Crate",
|
|
||||||
"block.create.creative_crate": "The Endless Crate",
|
"block.create.creative_crate": "The Endless Crate",
|
||||||
"block.create.extractor": "Extractor",
|
"block.create.extractor": "Extractor",
|
||||||
"block.create.belt_funnel": "Funnel",
|
"block.create.belt_funnel": "Funnel",
|
||||||
|
@ -683,6 +681,8 @@
|
||||||
"advancement.create.brass.desc": "Use Crushed Copper and Crushed Zinc to create some Brass.",
|
"advancement.create.brass.desc": "Use Crushed Copper and Crushed Zinc to create some Brass.",
|
||||||
"advancement.create.brass_casing": "The Brass Age",
|
"advancement.create.brass_casing": "The Brass Age",
|
||||||
"advancement.create.brass_casing.desc": "Use newly obtained Brass and some Wood to create a more advanced Casing.",
|
"advancement.create.brass_casing.desc": "Use newly obtained Brass and some Wood to create a more advanced Casing.",
|
||||||
|
"advancement.create.copper_casing": "The Copper Age",
|
||||||
|
"advancement.create.copper_casing.desc": "Use some copper sheets to create Copper Casing.",
|
||||||
|
|
||||||
"advancement.create.crafter": "Automated Assembly",
|
"advancement.create.crafter": "Automated Assembly",
|
||||||
"advancement.create.crafter.desc": "Place and power some Mechanical Crafters",
|
"advancement.create.crafter.desc": "Place and power some Mechanical Crafters",
|
||||||
|
@ -700,6 +700,18 @@
|
||||||
"advancement.create.refined_radiance": "Bright and Inspiring",
|
"advancement.create.refined_radiance": "Bright and Inspiring",
|
||||||
"advancement.create.refined_radiance.desc": "Create Refined Radiance, a powerful chromatic substance.",
|
"advancement.create.refined_radiance.desc": "Create Refined Radiance, a powerful chromatic substance.",
|
||||||
|
|
||||||
|
"advancement.create.zapper": "Building with style",
|
||||||
|
"advancement.create.zapper.desc": "Craft a Blockzapper. A radiant laser gun that helps you build.",
|
||||||
|
"advancement.create.upgraded_zapper": "Radiant Overdrive",
|
||||||
|
"advancement.create.upgraded_zapper.desc": "Create and activate a fully upgraded Blockzapper.",
|
||||||
|
"advancement.create.symmetry_wand": "Radiant Mirrors",
|
||||||
|
"advancement.create.symmetry_wand.desc": "Craft a Staff of Symmetry.",
|
||||||
|
"advancement.create.deforester": "Radiant Chopping",
|
||||||
|
"advancement.create.deforester.desc": "Craft a Deforester, and say goodbye to the local forest.",
|
||||||
|
|
||||||
|
"advancement.create.eob": "End of Beta",
|
||||||
|
"advancement.create.eob.desc": "Expect more content here in the future. <3",
|
||||||
|
|
||||||
"create.subtitle.schematicannon_launch_block": "Schematicannon shoots",
|
"create.subtitle.schematicannon_launch_block": "Schematicannon shoots",
|
||||||
"create.subtitle.schematicannon_finish": "Schematicannon finishes",
|
"create.subtitle.schematicannon_finish": "Schematicannon finishes",
|
||||||
"create.subtitle.slime_added": "Slime squishes",
|
"create.subtitle.slime_added": "Slime squishes",
|
||||||
|
@ -1074,6 +1086,11 @@
|
||||||
"block.create.flexcrate.tooltip.summary": "This _Storage_ _Container_ allows Manual control over its capacity. It can hold up to _16_ _Stacks_ of any Item. Supports _Redstone_ _Comparators_.",
|
"block.create.flexcrate.tooltip.summary": "This _Storage_ _Container_ allows Manual control over its capacity. It can hold up to _16_ _Stacks_ of any Item. Supports _Redstone_ _Comparators_.",
|
||||||
"block.create.flexcrate.tooltip.control1": "When R-Clicked",
|
"block.create.flexcrate.tooltip.control1": "When R-Clicked",
|
||||||
"block.create.flexcrate.tooltip.action1": "Opens the _Interface_.",
|
"block.create.flexcrate.tooltip.action1": "Opens the _Interface_.",
|
||||||
|
|
||||||
|
"block.create.creative_crate.tooltip": "THE ENDLESS CRATE",
|
||||||
|
"block.create.creative_crate.tooltip.summary": "This _Storage_ _Container_ allows infinite replication of any item. Place next to a _Schematicannon_ to remove any material requirements.",
|
||||||
|
"block.create.creative_crate.tooltip.condition1": "When Item in Filter Slot",
|
||||||
|
"block.create.creative_crate.tooltip.behaviour1": "Anything _extracting_ from this container will provide an _endless_ _supply_ of the item specified. Items _inserted_ into this crate will be _voided._",
|
||||||
|
|
||||||
"block.create.extractor.tooltip": "EXTRACTOR",
|
"block.create.extractor.tooltip": "EXTRACTOR",
|
||||||
"block.create.extractor.tooltip.summary": "_Takes_ _Items_ from an attached _Inventory_ and drops them onto the ground. Will not drop Items unless the space is clear. Can be assigned an item-stack as a _filter_.",
|
"block.create.extractor.tooltip.summary": "_Takes_ _Items_ from an attached _Inventory_ and drops them onto the ground. Will not drop Items unless the space is clear. Can be assigned an item-stack as a _filter_.",
|
||||||
|
@ -1204,9 +1221,5 @@
|
||||||
"tool.create.rose_quartz.tooltip": "ROSE QUARTZ TOOLS",
|
"tool.create.rose_quartz.tooltip": "ROSE QUARTZ TOOLS",
|
||||||
"tool.create.rose_quartz.tooltip.summary": "This tool grants you a _greater_ _reach_ for _breaking_ _blocks_ or _placing_ _blocks_ from the off-hand.",
|
"tool.create.rose_quartz.tooltip.summary": "This tool grants you a _greater_ _reach_ for _breaking_ _blocks_ or _placing_ _blocks_ from the off-hand.",
|
||||||
|
|
||||||
"block.create.warehouse_crate.tooltip": "WIP",
|
|
||||||
"block.create.filtered_crate.tooltip": "WIP",
|
|
||||||
"block.create.creative_crate.tooltip": "WIP",
|
|
||||||
|
|
||||||
"itemGroup.create": "Create"
|
"itemGroup.create": "Create"
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 419 B |
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:press",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "create:copper_casing"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.copper_casing"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.copper_casing.desc"
|
||||||
|
},
|
||||||
|
"frame": "goal",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:copper_casing"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
35
src/main/resources/data/create/advancements/copper_end.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:copper_casing",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "minecraft:oak_sapling"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.eob"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.eob.desc"
|
||||||
|
},
|
||||||
|
"frame": "challenge",
|
||||||
|
"show_toast": false,
|
||||||
|
"announce_to_chat": false,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:copper_casing"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
35
src/main/resources/data/create/advancements/deforester.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:refined_radiance",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "create:deforester"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.deforester"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.deforester.desc"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": false,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:deforester"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"parent": "create:deployer",
|
"parent": "create:deployer",
|
||||||
"display": {
|
"display": {
|
||||||
"icon": {
|
"icon": {
|
||||||
"item": "create:large_cogwheel"
|
"item": "create:deployer"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"translate": "advancement.create.fist_bump"
|
"translate": "advancement.create.fist_bump"
|
||||||
|
|
35
src/main/resources/data/create/advancements/shadow_end.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:shadow_steel",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "minecraft:oak_sapling"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.eob"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.eob.desc"
|
||||||
|
},
|
||||||
|
"frame": "challenge",
|
||||||
|
"show_toast": false,
|
||||||
|
"announce_to_chat": false,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:shadow_steel"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:refined_radiance",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "create:symmetry_wand"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.symmetry_wand"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.symmetry_wand.desc"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": false,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:symmetry_wand"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"parent": "create:zapper",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "create:placement_handgun",
|
||||||
|
"nbt": "{Retriever:\"Chromatic\",Scope:\"Chromatic\",Amplifier:\"Chromatic\",Body:\"Chromatic\",Accelerator:\"Chromatic\"}"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.upgraded_zapper"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.upgraded_zapper.desc"
|
||||||
|
},
|
||||||
|
"frame": "challenge",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "create:upgraded_zapper"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
|
@ -17,12 +17,21 @@
|
||||||
},
|
},
|
||||||
"criteria": {
|
"criteria": {
|
||||||
"0": {
|
"0": {
|
||||||
|
"trigger": "minecraft:placed_block",
|
||||||
|
"conditions": {
|
||||||
|
"block": "create:water_wheel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
"trigger": "create:water_wheel"
|
"trigger": "create:water_wheel"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"requirements": [
|
"requirements": [
|
||||||
[
|
[
|
||||||
"0"
|
"0"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"1"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
35
src/main/resources/data/create/advancements/zapper.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"parent": "create:refined_radiance",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "create:placement_handgun"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancement.create.zapper"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancement.create.zapper.desc"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": false,
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"0": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"item": "create:placement_handgun"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"0"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|