Skip to content

Commit

Permalink
Merge pull request #112 from MuradAkh/spring-bugfix-inv
Browse files Browse the repository at this point in the history
Backport minor bugfixes/qol from 1.18 to 1.16
  • Loading branch information
EDToaster authored Feb 27, 2022
2 parents 7ed969e + 756e181 commit 26e9ac9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# Core properties
mod_version = mc1.16.5-v1.0.4
mod_version = mc1.16.5-v1.0.5
mod_group = dev.murad.littlelogistics
mod_id = littlelogistics
mod_title = Little Logistics
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/dev/murad/shipping/item/SpringItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ private void createSpringHelper(ItemStack stack, PlayerEntity player, World worl
player.displayClientMessage(new TranslationTextComponent("item.littlelogistics.spring.noLoops"), true);
} else if (firstTrain.getTug().isPresent()) {
SpringEntity.createSpring((VesselEntity) firstTrain.getTail(), (VesselEntity) secondTrain.getHead());
if(!player.isCreative())
stack.shrink(1);
} else {
SpringEntity.createSpring((VesselEntity) secondTrain.getTail(), (VesselEntity) firstTrain.getHead());
if(!player.isCreative())
stack.shrink(1);
}
// First entity clicked is the dominant
if(!player.isCreative())
stack.shrink(1);



}
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/dev/murad/shipping/setup/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,55 @@ public class ModBlocks {
"tug_dock",
() -> new TugDockBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> BARGE_DOCK = register(
"barge_dock",
() -> new BargeDockBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> GUIDE_RAIL_CORNER = register(
"guide_rail_corner",
() -> new CornerGuideRailBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> VESSEL_DETECTOR = register(
"vessel_detector",
() -> new VesselDetectorBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> GUIDE_RAIL_TUG = register(
"guide_rail_tug",
() -> new TugGuideRailBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> FLUID_HOPPER = register(
"fluid_hopper",
() -> new FluidHopperBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

public static final RegistryObject<Block> VESSEL_CHARGER = register(
"vessel_charger",
() -> new VesselChargerBlock(AbstractBlock.Properties.of(Material.METAL)
.harvestLevel(1)
.strength(0.5f)
),
ItemGroup.TAB_TRANSPORTATION);

Expand Down

0 comments on commit 26e9ac9

Please sign in to comment.