-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from terrarium-earth/fix/barrel
Fix barrel issue
- Loading branch information
Showing
7 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
fabricLoaderVersion=0.15.11 | ||
fabricApiVersion=0.100.1 | ||
fabricLoaderVersion=0.16.3 | ||
fabricApiVersion=0.103.0 |
5 changes: 5 additions & 0 deletions
5
fabric/src/main/java/earth/terrarium/chipped/fabric/ChippedFabric.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package earth.terrarium.chipped.fabric; | ||
|
||
import com.teamresourceful.resourcefullib.common.registry.RegistryEntry; | ||
import earth.terrarium.chipped.Chipped; | ||
import earth.terrarium.chipped.common.registry.ModBlocks; | ||
import net.fabricmc.api.ModInitializer; | ||
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityType; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
|
||
public class ChippedFabric implements ModInitializer { | ||
@Override | ||
public void onInitialize() { | ||
Chipped.init(); | ||
ModBlocks.BARREL.stream().map(RegistryEntry::get).forEach(((FabricBlockEntityType) BlockEntityType.BARREL)::addSupportedBlock); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
loom.platform=neoforge | ||
neoforgeVersion=21.0.60-beta | ||
neoforgeVersion=21.1.34 |
12 changes: 11 additions & 1 deletion
12
neoforge/src/main/java/earth/terrarium/chipped/neoforge/ChippedNeoForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
package earth.terrarium.chipped.neoforge; | ||
|
||
import com.teamresourceful.resourcefullib.common.registry.RegistryEntry; | ||
import earth.terrarium.chipped.Chipped; | ||
import earth.terrarium.chipped.common.registry.ModBlocks; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.fml.event.IModBusEvent; | ||
import net.neoforged.neoforge.event.BlockEntityTypeAddBlocksEvent; | ||
|
||
@Mod(Chipped.MOD_ID) | ||
public class ChippedNeoForge { | ||
public ChippedNeoForge() { | ||
public ChippedNeoForge(IEventBus bus) { | ||
Chipped.init(); | ||
|
||
bus.addListener((BlockEntityTypeAddBlocksEvent event) -> { | ||
ModBlocks.BARREL.stream().map(RegistryEntry::get).forEach(block -> event.modify(BlockEntityType.BARREL, block)); | ||
}); | ||
} | ||
} |