-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.14.4' of https://github.com/TerraformersMC/Terrestria …
…into 1.14.4
- Loading branch information
Showing
41 changed files
with
610 additions
and
21 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
47 changes: 47 additions & 0 deletions
47
src/main/java/com/terraformersmc/terrestria/init/TerrestriaEntities.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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.terraformersmc.terrestria.init; | ||
|
||
import com.terraformersmc.terraform.entity.TerraformBoat; | ||
import com.terraformersmc.terraform.entity.TerraformBoatEntity; | ||
import com.terraformersmc.terrestria.Terrestria; | ||
import com.terraformersmc.terrestria.init.helpers.WoodItems; | ||
import net.fabricmc.fabric.api.entity.FabricEntityTypeBuilder; | ||
import net.minecraft.entity.EntityCategory; | ||
import net.minecraft.entity.EntityDimensions; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.vehicle.BoatEntity; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.registry.Registry; | ||
|
||
public class TerrestriaEntities { | ||
public static EntityType<TerraformBoatEntity> REDWOOD_BOAT; | ||
public static EntityType<TerraformBoatEntity> HEMLOCK_BOAT; | ||
public static EntityType<TerraformBoatEntity> RUBBER_BOAT; | ||
public static EntityType<TerraformBoatEntity> CYPRESS_BOAT; | ||
public static EntityType<TerraformBoatEntity> WILLOW_BOAT; | ||
public static EntityType<TerraformBoatEntity> JAPANESE_MAPLE_BOAT; | ||
public static EntityType<TerraformBoatEntity> RAINBOW_EUCALYPTUS_BOAT; | ||
public static EntityType<TerraformBoatEntity> SAKURA_BOAT; | ||
|
||
public static void init() { | ||
REDWOOD_BOAT = registerBoat("redwood", TerrestriaItems.REDWOOD, BoatEntity.Type.DARK_OAK); | ||
HEMLOCK_BOAT = registerBoat("hemlock", TerrestriaItems.HEMLOCK, BoatEntity.Type.OAK); | ||
RUBBER_BOAT = registerBoat("rubber", TerrestriaItems.RUBBER, BoatEntity.Type.BIRCH); | ||
CYPRESS_BOAT = registerBoat("cypress", TerrestriaItems.CYPRESS, BoatEntity.Type.BIRCH); | ||
WILLOW_BOAT = registerBoat("willow", TerrestriaItems.WILLOW, BoatEntity.Type.SPRUCE); | ||
JAPANESE_MAPLE_BOAT = registerBoat("japanese_maple", TerrestriaItems.JAPANESE_MAPLE, BoatEntity.Type.ACACIA); | ||
RAINBOW_EUCALYPTUS_BOAT = registerBoat("rainbow_eucalyptus", TerrestriaItems.RAINBOW_EUCALYPTUS, BoatEntity.Type.JUNGLE); | ||
SAKURA_BOAT = registerBoat("sakura", TerrestriaItems.SAKURA, BoatEntity.Type.DARK_OAK); | ||
} | ||
|
||
private static EntityType<TerraformBoatEntity> registerBoat(String name, WoodItems wood, BoatEntity.Type vanilla) { | ||
Identifier skin = new Identifier(Terrestria.MOD_ID, "textures/entity/boat/" + name + ".png"); | ||
TerraformBoat boat = new TerraformBoat(wood.boat, wood.planks, skin, vanilla); | ||
|
||
EntityType<TerraformBoatEntity> type = FabricEntityTypeBuilder.<TerraformBoatEntity>create( | ||
EntityCategory.MISC, (entity, world) -> new TerraformBoatEntity(entity, world, boat)) | ||
.size(EntityDimensions.fixed(1.375F, 0.5625F)) | ||
.build(); | ||
|
||
return Registry.register(Registry.ENTITY_TYPE, new Identifier(Terrestria.MOD_ID, name + "_boat"), type); | ||
} | ||
} |
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
24 changes: 22 additions & 2 deletions
24
src/main/java/com/terraformersmc/terrestria/init/helpers/TerrestriaRegistry.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
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
Oops, something went wrong.