Compare commits

...

76 Commits

Author SHA1 Message Date
6da38814d2 give rocket an owner 2025-04-04 18:10:42 +05:00
0a21a0432e Enforcer rocket attack 2025-04-04 03:36:54 +05:00
2e354f5e84 m 2025-04-03 13:54:57 +05:00
62eaaadb44 lang 2025-04-03 13:54:06 +05:00
b07b116d18 rofl 2025-04-03 05:38:30 +05:00
b151e7fa89 rooms 2025-04-03 01:55:21 +05:00
f2528f5c2b Merge remote-tracking branch 'origin/world-structures' into world-structures 2025-04-02 14:31:44 +05:00
c73729f8e7 nevermind 2025-04-02 14:31:27 +05:00
0fefe81858
Merge branch '1.21' into world-structures 2025-03-31 20:58:28 +07:00
2354190184
Update method references after merge 2025-03-31 08:23:17 +07:00
0783e83465
Merge branch '1.21' into world-structures
# Conflicts:
#	src/data/kotlin/ru/dbotthepony/mc/otm/datagen/advancements/AdvancementData.kt
#	src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt
#	src/main/kotlin/ru/dbotthepony/mc/otm/entity/Loader.kt
2025-03-31 08:20:12 +07:00
863d52230e Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-29 23:14:28 +05:00
caee0dc199 Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-29 17:52:13 +05:00
cc76ada6b1 I wanted to make a separate texture for loot crates but it stucks ass 2025-03-29 17:51:28 +05:00
a627646e87 loader texture fix 2025-03-29 17:20:44 +05:00
fa4f4204f4 add crates to lab rooms 2025-03-29 15:02:47 +05:00
126b8e8010 crate loot pools 2025-03-28 18:48:51 +05:00
7fbb68d9d0 loot table tweaks 2025-03-28 18:29:28 +05:00
a39bfd5a47 Industrial ladder recipe 2025-03-28 18:23:28 +05:00
0306ec6455 Add chance condition to rogue ai core drop 2025-03-28 18:21:17 +05:00
ec008d7243 change the crate texture a bit 2025-03-26 21:21:00 +05:00
e100124e44 rge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-26 21:02:33 +05:00
71d0c8a063 wud 2025-03-26 21:02:25 +05:00
a205dc69c2 Lang tweaks 2025-03-25 10:23:34 +05:00
78395e228b ъ 2025-03-25 09:23:31 +05:00
79022ddac9 hall variation and another intersection room 2025-03-24 22:49:51 +05:00
0f2b61ef7d huh 2025-03-23 11:54:03 +05:00
1300445f76
Add more entity translation strings 2025-03-23 10:21:14 +07:00
9848f64ee6
Update loader particle code 2025-03-23 10:18:44 +07:00
a5ba06b52f
Update black hole particles 2025-03-23 10:14:15 +07:00
e31817e482
Merge branch '1.21' into world-structures 2025-03-23 10:11:41 +07:00
3ec685b3f5
help 2025-03-23 10:11:11 +07:00
4b222f70b4
⚙ SHOCKY — 10:04
skull emoji
2025-03-23 10:08:37 +07:00
6f7dc8b944
Translation strings for enforcer 2025-03-23 09:59:34 +07:00
f0da7102c9
More fixes for RammingGoal 2025-03-23 09:56:39 +07:00
7ed8c6673c
💀 2025-03-23 09:47:44 +07:00
994dae96e8
Make Enforcer have proper description ID on its boss healthbar 2025-03-23 09:46:28 +07:00
8f15366011
More const values 2025-03-23 09:42:14 +07:00
5606096040
Update BlazeFireballGoal's code 2025-03-23 09:40:48 +07:00
832b5f7d2a
Use targetSelector goal list 2025-03-23 09:26:02 +07:00
6888a8c7bc
Rearrange goals 2025-03-23 09:24:54 +07:00
55688594b9 apple 2025-03-20 07:28:30 +05:00
77026f6d72 make matter decomposer have a more visible working state texture 2025-03-18 17:02:06 +05:00
92cd3326ee Make crossroads large enough to fit both the arena and corridors 2025-03-18 04:27:36 +05:00
94601478bb
Merge branch '1.21' into world-structures 2025-03-18 00:02:36 +07:00
dec8aab382
Actual fix for ladder datagen 2025-03-18 00:02:31 +07:00
2f1b698810
Add industrial ladder to creative menu, rearrange items in decorative tab 2025-03-17 23:55:54 +07:00
aedd545a39
Fix ladder datagen 2025-03-17 23:54:08 +07:00
62c05b3c3f
Misc code fixes in enforcer code 2025-03-17 23:39:27 +07:00
a9851e08b3 n 2025-03-17 21:27:00 +05:00
ae840736c7 idiot 2025-03-17 14:01:52 +05:00
2d5858bd29 beep 2025-03-17 08:12:25 +05:00
7a7139c48c Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-17 05:44:22 +05:00
96400db67c ok 2025-03-17 05:44:07 +05:00
64c9b007cc буду срать 2025-03-17 03:47:22 +05:00
b212959490 ⡶⠶⠂⠐⠲⠶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⡶⠶⡶⣶
⣗⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⣿⠿⣿⣿⣿⣿⠿⠿⠿⠟⠛⠉⠁⠀⠀⠀⢠⣿
⣿⣷⣀⠀⠈⠛⠢⠥⠴⠟⠂⠀⠀⠀⠉⣛⠉⠁⠀⠐⠲⠤⠖⠛⠁⠀⠀⣐⣿⣿
⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⣀⡠⣤⣦⣿⣿⣿⣆⣴⣠⣀⣀⡀⣀⣀⣚⣿⣿⣿⢳
⣧⠉⠙⢿⣿⣿⣶⣶⣾⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢇⣿
⣿⣷⡄⠈⣿⣿⣿⣿⣯⣥⣦⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢉⣴⣿⣿
⣿⣿⣿⣦⣘⠋⢻⠿⢿⣿⣿⣿⣾⣭⣛⣛⣛⣯⣷⣿⣿⠿⠟⠋⠉⣴⣿⣿⣿
2025-03-16 23:29:34 +05:00
5e3fcddd34 fireball 2025-03-16 13:20:21 +05:00
24485696f3 don't move when charging 2025-03-16 10:03:41 +05:00
7b3a6f229b Merge remote-tracking branch 'origin/world-structures' into world-structures 2025-03-16 02:45:59 +05:00
7c31180430 h2 2025-03-16 02:45:46 +05:00
fd3caf5d21
Revert black hole random changes 2025-03-15 10:12:43 +07:00
05fa437fa4
Merge branch '1.21' into world-structures 2025-03-15 10:11:55 +07:00
1670e14ae8 h 2025-03-13 10:45:42 +05:00
4fc7bc62ae Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-11 16:27:35 +05:00
284bd3c3c6 nah 2025-03-11 03:52:29 +05:00
091895fb10 emissives? 2025-03-11 02:41:22 +05:00
d2371b03f6 Enforcer WIP 2025-03-11 00:22:14 +05:00
c323f70a97 Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-09 20:10:46 +05:00
59af269c00 Merge branch '1.21' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into world-structures 2025-03-09 19:57:27 +05:00
b9291104e6 what 2025-03-09 19:57:18 +05:00
45ba5a6d55 cleaner drone wip 2025-03-09 19:55:42 +05:00
4c282d51a8 they're no longer empty, but always inactive, need fixing later 2025-03-08 03:37:46 +05:00
297b32d775 Fix empty vaults 2025-03-08 03:07:54 +05:00
22798cff1e more stuff 2025-03-08 02:17:17 +05:00
2d1d9d28f3 :3 2025-03-07 20:58:05 +05:00
5064a6d996
Unfinished labs 2025-03-07 16:21:42 +07:00
186 changed files with 3000 additions and 247 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@ build
# other
eclipse
run
.kotlin
design/
libs/

1
src/bb/Roomba.bbmodel Normal file

File diff suppressed because one or more lines are too long

1
src/bb/dronel.bbmodel Normal file

File diff suppressed because one or more lines are too long

1
src/bb/enforcer.bbmodel Normal file

File diff suppressed because one or more lines are too long

1
src/bb/missile.bbmodel Normal file
View File

@ -0,0 +1 @@
{"meta":{"format_version":"4.10","model_format":"modded_entity","box_uv":true},"name":"missile","model_identifier":"","modded_entity_entity_class":"","modded_entity_version":"1.17","modded_entity_flip_y":true,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":32,"height":16},"elements":[{"name":"cube","box_uv":true,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[-2,0,-6],"to":[2,4,6],"autouv":0,"color":1,"origin":[0,0,0],"faces":{"north":{"uv":[12,12,16,16],"texture":0},"east":{"uv":[0,12,12,16],"texture":0},"south":{"uv":[28,12,32,16],"texture":0},"west":{"uv":[16,12,28,16],"texture":0},"up":{"uv":[16,12,12,0],"texture":0},"down":{"uv":[20,0,16,12],"texture":0}},"type":"cube","uuid":"05bb825d-c347-164b-64cf-b73e046e8741"}],"outliner":["05bb825d-c347-164b-64cf-b73e046e8741"],"textures":[{"path":"L:\\overdrive_that_matters\\src\\main\\resources\\assets\\overdrive_that_matters\\textures\\entity\\missile.png","name":"missile.png","folder":"block","namespace":"","id":"0","group":"","width":32,"height":16,"uv_width":32,"uv_height":16,"particle":false,"use_as_default":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","pbr_channel":"color","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"46c03cb1-173a-a2a3-6e4d-ef2bed629caf","relative_path":"../main/resources/assets/overdrive_that_matters/textures/entity/missile.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAK9JREFUSEtjZCARBAUF/cenZd26dYykGEmSYpDBNjY2eB1w5MgRkswkSfGoA0AhEJ4gizcKVi54TFKokqR41AGjITAaAthCYIqUE0rJK9q2kKScxQgq21+9egU3RFrlId6ifMX8RwwRiXJgNchsXJqe3pGHS4mJiTEs61ZAUUqyA0ipaEBqsTmAXVodbMzPpzcZiHYALKhznu1jwMXG5jiqOQBkOHp8wywEOYrcKAAALrttKeKPrtQAAAAASUVORK5CYII="}]}

View File

@ -134,12 +134,16 @@ object DataGen {
blockStateProvider.simplePillar(block)
}
fun decorativeLadder(block: Block) {
blockModelProvider.decorativeLadder(block)
blockStateProvider.simpleLadder(block)
}
fun stairs(block: StairBlock, side: String, top: String) {
blockStateProvider.exec {
blockStateProvider.stairsBlock(block, modLocation(side), modLocation(top), modLocation(top))
}
}
const val DECORATIVE_BLOCK_LOCATION = "block/decorative"
fun decorativeStairs(block: StairBlock, side: String, top: String) {
@ -160,6 +164,11 @@ object DataGen {
}
}
fun decorativeCubeFramed(block: String, texture: String){
blockModelProvider.cubeAllFramed(block,texture)
blockStateProvider.block()
}
fun stairs(block: StairBlock) {
stairs(block, "$DECORATIVE_BLOCK_LOCATION/${block.registryName!!.path}", "$DECORATIVE_BLOCK_LOCATION/${block.registryName!!.path}")
}

View File

@ -36,9 +36,24 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
DataGen.decorativeCubeAll(MBlocks.CARBON_FIBRE_BLOCK)
DataGen.decorativeCubeAllCutout(MBlocks.METAL_MESH)
DataGen.decorativePillar(MBlocks.TIRE_BLOCK, "carbon_fibre_block", "tire")
DataGen.decorativeLadder(MBlocks.INDUSTRIAL_LADDER)
DataGen.decoratives(MRegistry.TRITANIUM_BLOCK)
DataGen.decorativeCubeAll(MBlocks.ROFLITE_FRAME)
DataGen.decorativeCubeAll(MBlocks.ROFLITE_PLATING)
DataGen.decorativeStairs(MBlocks.ROFLITE_PLATING_STAIRS,"roflite_plating","roflite_plating")
DataGen.decorativeSlab(MBlocks.ROFLITE_PLATING_SLAB, MBlocks.ROFLITE_PLATING.registryName!!,"roflite_plating","roflite_plating")
DataGen.decorativeCubeAll(MBlocks.CUT_ROFLITE)
DataGen.decorativeStairs(MBlocks.CUT_ROFLITE_STAIRS,"cut_roflite","cut_roflite")
DataGen.decorativeSlab(MBlocks.CUT_ROFLITE_SLAB, MBlocks.CUT_ROFLITE.registryName!!,"cut_roflite","cut_roflite")
DataGen.decorativeCubeAll(MBlocks.CHISELED_ROFLITE)
DataGen.decorativeCubeFramed("roflite_assembly","block/decorative/roflite_assembly")
DataGen.decorativePillar(MBlocks.ROFLITE_PILLAR, "roflite_pillar", "roflite_pillar_top")
for (color in DyeColor.entries) {
blockModelProvider.exec {
blockModelProvider.withExistingParent("block/tritanium_anvil0_${color.name.lowercase()}", "${DataGen.MOD_ID}:block/tritanium_anvil0")
@ -260,9 +275,26 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
itemModelProvider.block(MItems.DANGER_STRIPE_BLOCK, MItems.DANGER_STRIPE_BLOCK.registryName!!.path + "_0")
itemModelProvider.block(MItems.METAL_BEAM)
itemModelProvider.generatedBlockDecorative(MItems.INDUSTRIAL_LADDER)
itemModelProvider.block(MItems.TIRE_BLOCK)
blockStateProvider.block(MBlocks.METAL_BEAM_CENTER)
itemModelProvider.block(MItems.METAL_BEAM_CENTER)
itemModelProvider.block(MItems.ROFLITE_FRAME)
itemModelProvider.block(MItems.ROFLITE_PLATING)
itemModelProvider.block(MItems.ROFLITE_ASSEMBLY)
itemModelProvider.block(MItems.ROFLITE_PILLAR)
itemModelProvider.block(MItems.CHISELED_ROFLITE)
itemModelProvider.block(MItems.CUT_ROFLITE)
itemModelProvider.block(MItems.ROFLITE_PLATING_SLAB)
itemModelProvider.block(MItems.ROFLITE_PLATING_STAIRS)
itemModelProvider.block(MItems.CUT_ROFLITE_SLAB)
itemModelProvider.block(MItems.CUT_ROFLITE_STAIRS)
blockStateProvider.block(MBlocks.ROFLITE_ASSEMBLY)
blockStateProvider.exec {
blockStateProvider.getVariantBuilder(MBlocks.LABORATORY_LAMP).forAllStates {
return@forAllStates ConfiguredModel.builder()

View File

@ -1,20 +1,20 @@
package ru.dbotthepony.mc.otm.datagen.advancements
import net.minecraft.advancements.AdvancementHolder
import net.minecraft.advancements.AdvancementRewards
import net.minecraft.advancements.AdvancementRequirements.Strategy
import net.minecraft.advancements.AdvancementRewards
import net.minecraft.advancements.AdvancementType
import net.minecraft.advancements.critereon.InventoryChangeTrigger
import net.minecraft.world.item.DyeColor
import net.minecraft.world.item.ItemStack
import ru.dbotthepony.mc.otm.util.registryName
import ru.dbotthepony.mc.otm.datagen.lang.MatteryLanguageProvider
import ru.dbotthepony.mc.otm.datagen.modLocation
import ru.dbotthepony.mc.otm.registry.MItemTags
import ru.dbotthepony.mc.otm.registry.game.MItems
import ru.dbotthepony.mc.otm.registry.MRegistry
import ru.dbotthepony.mc.otm.registry.game.MItems
import ru.dbotthepony.mc.otm.server.triggers.BlackHoleTrigger
import ru.dbotthepony.mc.otm.server.triggers.NailedEntityTrigger
import ru.dbotthepony.mc.otm.util.registryName
import java.util.function.Consumer
fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLanguageProvider) {

View File

@ -6,10 +6,7 @@ import net.minecraft.advancements.AdvancementRewards
import net.minecraft.advancements.AdvancementType
import net.minecraft.advancements.Criterion
import net.minecraft.advancements.DisplayInfo
import net.minecraft.advancements.critereon.ContextAwarePredicate
import net.minecraft.advancements.critereon.EntityPredicate
import net.minecraft.advancements.critereon.InventoryChangeTrigger
import net.minecraft.advancements.critereon.ItemPredicate
import net.minecraft.advancements.critereon.*
import net.minecraft.core.registries.Registries
import net.minecraft.network.chat.Component
import net.minecraft.resources.ResourceKey

View File

@ -35,6 +35,11 @@ fun addBlockModels(provider: MatteryBlockModelProvider) {
cubeAll(MBlocks.ENERGY_OUTPUT_INTERFACE)
cubeAll(MBlocks.TRITANIUM_HULL)
cubeAll(MBlocks.WOODEN_CRATE)
provider.exec {
provider.cubeAll("wooden_crate_decorative", modLocation("block/wooden_crate"))
}
orientable(MBlocks.MATTER_INPUT_HATCH,"block/tritanium_hull","block/matter_input_hatch")
orientable(MBlocks.MATTER_OUTPUT_HATCH,"block/tritanium_hull","block/matter_output_hatch")

View File

@ -352,6 +352,9 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
provider.block(MBlocks.TRITANIUM_HULL)
provider.block(MBlocks.WOODEN_CRATE)
provider.block(MBlocks.WOODEN_CRATE_DECORATIVE)
provider.block(MBlocks.FLYWHEEL_HOUSING)
provider.block(MBlocks.FLYWHEEL_BEARING)
provider.block(MBlocks.FLYWHEEL_SHAFT)

View File

@ -3,11 +3,13 @@ package ru.dbotthepony.mc.otm.datagen.blocks
import net.minecraft.core.Direction
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.HorizontalDirectionalBlock
import net.minecraft.world.level.block.RotatedPillarBlock
import net.minecraft.world.level.block.state.BlockState
import net.neoforged.neoforge.client.model.generators.BlockStateProvider
import net.neoforged.neoforge.client.model.generators.ConfiguredModel
import net.neoforged.neoforge.data.event.GatherDataEvent
import ru.dbotthepony.mc.otm.OverdriveThatMatters
import ru.dbotthepony.mc.otm.block.entity.WorkerState
import ru.dbotthepony.mc.otm.util.getValueNullable
import ru.dbotthepony.mc.otm.util.math.BlockRotationFreedom
@ -119,6 +121,39 @@ class MatteryBlockStateProvider(event: GatherDataEvent) : BlockStateProvider(eve
return this
}
fun simpleLadder(vararg blocks: Block): MatteryBlockStateProvider {
for (block in blocks) {
exec {
val mdl = models().getExistingFile(modLocation("block/${block.registryName!!.path}"))
getVariantBuilder(block)
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.NORTH)
.modelForState()
.modelFile(mdl)
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.SOUTH)
.modelForState()
.modelFile(mdl)
.rotationY(180)
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.WEST)
.modelForState()
.modelFile(mdl)
.rotationY(270)
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.EAST)
.modelForState()
.modelFile(mdl)
.rotationY(90)
.addModel()
}
}
return this
}
fun simpleBlockM(blocks: Collection<Block>): MatteryBlockStateProvider {
blocks.forEach(this::simpleBlockM)
return this

View File

@ -127,6 +127,8 @@ fun addItemModels(provider: MatteryItemModelProvider) {
provider.generated(MItems.BREAD_MONSTER_SPAWN_EGG, modLocation("item/egg/bread_monster"))
provider.generated(MItems.LOADER_SPAWN_EGG, modLocation("item/egg/loader"))
provider.generated(MItems.CLEANER_DRONE_KIT, modLocation("item/egg/cleaner"))
provider.generated(MItems.ANDROID_MELEE_SPAWN_EGG, modLocation("item/egg/android_melee"))
provider.generatedTiered(MItems.BATTERIES, "battery_tier")
provider.generated(MItems.BATTERY_CREATIVE)
@ -264,6 +266,9 @@ fun addItemModels(provider: MatteryItemModelProvider) {
provider.block(MItems.TRITANIUM_HULL)
provider.block(MItems.WOODEN_CRATE)
provider.block(MItems.WOODEN_CRATE_DECORATIVE)
provider.block(MItems.GENERATOR_BLOCK)
provider.block(MItems.ENERGY_INPUT_INTERFACE)
provider.block(MItems.ENERGY_OUTPUT_INTERFACE)

View File

@ -506,10 +506,10 @@ private fun blocks(provider: MatteryLanguageProvider) {
with(provider.english) {
addBlock(MBlocks.ANDROID_STATION.values, "Android Station")
addBlock(MBlocks.ANDROID_STATION.values, "desc", "Grants access to android upgrades")
addBlock(MBlocks.ANDROID_CHARGER.values, "Wireless Charger")
addBlock(MBlocks.ANDROID_CHARGER.values, "desc", "Charges nearby androids and exopacks")
addBlock(MBlocks.BATTERY_BANK.values, "Battery Bank")
addBlock(MBlocks.BATTERY_BANK.values, "desc", "Provides a way to use battery items as ordinary energy storage cell")
@ -657,6 +657,24 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.METAL_JUNK, "desc", "Useless junk, or is it?")
add(MBlocks.METAL_MESH, "Metal Grate")
add(MBlocks.INDUSTRIAL_LADDER, "Industrial Ladder")
add(MBlocks.TIRE_BLOCK, "Tire")
add(MBlocks.ROFLITE_FRAME, "Roflite Alloy Frame Block")
add(MBlocks.ROFLITE_PLATING, "Roflite Alloy Plating Block")
add(MBlocks.ROFLITE_PLATING_STAIRS, "Roflite Alloy Plating Stairs")
add(MBlocks.ROFLITE_PLATING_SLAB, "Roflite Alloy Plating Slab")
add(MBlocks.CUT_ROFLITE, "Cut Roflite Alloy Block")
add(MBlocks.CUT_ROFLITE_STAIRS, "Cut Roflite Alloy Stairs")
add(MBlocks.CUT_ROFLITE_SLAB, "Cut Roflite Alloy Slab")
add(MBlocks.CHISELED_ROFLITE, "Chiseled Roflite Alloy Block")
add(MBlocks.ROFLITE_PILLAR, "Roflite Alloy Pillar Block")
add(MBlocks.ROFLITE_ASSEMBLY, "Roflite Alloy Assembly Block")
add(MBlocks.TRITANIUM_ORE, "Tritanium Ore")
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Deepslate Tritanium Ore")
add(MBlocks.TRITANIUM_RAW_BLOCK, "Raw Tritanium Block")
@ -836,6 +854,9 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.CARBON_MESH, "Carbon Mesh")
add(MItems.DISPLAY_SCREEN, "Display Screen")
add(MItems.ROGUE_AI_CORE, "Rogue AI Core")
add(MItems.ROGUE_AI_CORE, "desc", "It appears that this device is still active, pulsating with a crimson light")
add(MItems.GRAVITATIONAL_DISRUPTOR, "Spacetime Equalizer")
add(MItems.GRAVITATIONAL_DISRUPTOR, "description", "Once within close proximity of massive spacetime dilation anomaly, equalizes spacetime in it's radius")
@ -869,10 +890,11 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.ENERGY_SWORD, "desc4", "Does not benefit from Sweeping Edge enchantment")
add(MItems.FALLING_SUN, "◄ Falling Sun ►")
add(MItems.FALLING_SUN, "desc", "Prototype weapon, needs power to operate")
add(MItems.FALLING_SUN, "desc", "A ridiculously unwieldy weapon, needs power to operate")
add(MItems.FALLING_SUN, "desc2", "Deals extra damage to androids when empowered")
add(MItems.FALLING_SUN, "desc3", "Always strikes surrounding enemies with full damage if empowered")
add(MItems.FALLING_SUN, "desc4", "Does not benefit from Sweeping Edge enchantment")
add(MItems.FALLING_SUN, "desc5", "Has my judgement come so soon?")
add(MItems.PORTABLE_CONDENSATION_DRIVE, "Portable Condensation Drive")
add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE, "Portable Dense Condensation Drive")
@ -943,10 +965,9 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.CONFIGURATOR, "desc_saved", "Saved configuration for: %s")
add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg")
add(MEntityTypes.BREAD_MONSTER, "Bread Monster")
add(MItems.LOADER_SPAWN_EGG, "Loader Spawn Egg")
add(MEntityTypes.LOADER, "Loader")
add(MItems.CLEANER_DRONE_KIT, "Cleaner Drone Kit")
add(MItems.ANDROID_MELEE_SPAWN_EGG, "Melee Android Spawn Egg")
}
}
@ -1240,6 +1261,16 @@ private fun maps(provider: MatteryLanguageProvider) {
}
}
private fun entities(provider: MatteryLanguageProvider) {
with(provider.english) {
add(MEntityTypes.ENFORCER, "Enforcer")
add(MEntityTypes.BREAD_MONSTER, "Bread Monster")
add(MEntityTypes.LOADER, "Loader")
add(MEntityTypes.CLEANER, "Cleaner Drone")
add(MEntityTypes.ANDROID_MELEE, "Melee Android")
}
}
fun AddEnglishLanguage(provider: MatteryLanguageProvider) {
decoratives(provider)
sounds(provider)
@ -1257,6 +1288,7 @@ fun AddEnglishLanguage(provider: MatteryLanguageProvider) {
jade(provider)
maps(provider)
entities(provider)
with(provider.english) {
add("itemGroup.otm", "Overdrive That Matters")

View File

@ -661,6 +661,24 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.METAL_JUNK, "Металлический хлам")
add(MBlocks.METAL_JUNK, "desc", "Бесполезный хлам, или нет?")
add(MBlocks.INDUSTRIAL_LADDER, "Индустриальная лестница")
add(MBlocks.TIRE_BLOCK, "Колесо")
add(MBlocks.ROFLITE_FRAME, "Рама из рофлитового сплава")
add(MBlocks.ROFLITE_PLATING, "Блок из пластин рофлитового сплава")
add(MBlocks.ROFLITE_PLATING_STAIRS, "Ступеньки из пластин рофлитового сплава")
add(MBlocks.ROFLITE_PLATING_SLAB, "Плита из пластин рофлитового сплава")
add(MBlocks.CUT_ROFLITE, "Резной блок рофлитового сплава")
add(MBlocks.CUT_ROFLITE_STAIRS, "Ступеньки из резного блока рофлитового сплава")
add(MBlocks.CUT_ROFLITE_SLAB, "Плита из резного блока рофлитового сплава")
add(MBlocks.CHISELED_ROFLITE, "Точёный блок рофлитового сплава")
add(MBlocks.ROFLITE_PILLAR, "Пилон из рофлитового сплава")
add(MBlocks.ROFLITE_ASSEMBLY, "Стройка из рофлитового сплава")
add(MBlocks.TRITANIUM_ORE, "Тритановая руда")
add(MBlocks.DILITHIUM_ORE, "Дилитевая руда")
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Тританоносный глубинный сланец")
@ -683,9 +701,9 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.PHANTOM_ATTRACTOR, "Приманщик фантомов")
add(MBlocks.PHANTOM_ATTRACTOR, "desc", "Приманивает фантомов в ночное время")
add(MBlocks.REDSTONE_LAMP_INVERTED, "Лампа (инвертированный сигнал)")
add(MBlocks.REINFORCED_REDSTONE_LAMP, "Укреплённая лампа")
add(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, "Укреплённая лампа (инвертированный сигнал)")
add(MBlocks.REDSTONE_LAMP_INVERTED, "Редстоуновый фонарь (инвертированный сигнал)")
add(MBlocks.REINFORCED_REDSTONE_LAMP, "Укреплённый фонарь")
add(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, "Укреплённый фонарь (инвертированный сигнал)")
add(MBlocks.LABORATORY_LAMP, "Лабораторная лампа")
add(MBlocks.LABORATORY_LAMP, "description", "Освещает на несколько блоков в направлении своей лампы, с переключателем красного камня")
@ -829,6 +847,9 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.CARBON_MESH, "Углеродная сетка")
add(MItems.DISPLAY_SCREEN, "Экран дисплея")
add(MItems.ROGUE_AI_CORE, "Ядро ИИ")
add(MItems.ROGUE_AI_CORE, "desc", "Похоже, что это устройство все еще работает, и пульсирует алым светом.")
add(MItems.GRAVITATIONAL_DISRUPTOR, "Маяк уравнения пространства-времени")
add(MItems.GRAVITATIONAL_DISRUPTOR, "description", "Будучи находясь около точки искажения пространства-времени, создаёт противоположное искажение пространства-времени")
@ -862,10 +883,11 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.ENERGY_SWORD, "desc4", "Зачарование 'Разящий клинок' не имеет никакого эффекта на данном оружии")
add(MItems.FALLING_SUN, "◄ Падающее Солнце ►")
add(MItems.FALLING_SUN, "desc", "Прототип,требует энергию для работы")
add(MItems.FALLING_SUN, "desc", "Смехотворно громоздкое оружие,требует энергию для работы")
add(MItems.FALLING_SUN, "desc2", "Наносит дополнительный урон андроидам если имеет заряд")
add(MItems.FALLING_SUN, "desc3", "Всегда наносит полный урон по площади если имеет заряд")
add(MItems.FALLING_SUN, "desc4", "Зачарование 'Разящий клинок' не имеет никакого эффекта на данном оружии")
add(MItems.FALLING_SUN, "desc5", "Мой судный день пришел так скоро?")
add(MItems.PORTABLE_CONDENSATION_DRIVE, "Portable Condensation Drive")
add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE, "Portable Dense Condensation Drive")
@ -936,10 +958,9 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.CONFIGURATOR, "desc_saved", "Сохранены настройки для: %s")
add(MItems.BREAD_MONSTER_SPAWN_EGG, "Яйцо призыва хлебного монстра")
add(MEntityTypes.BREAD_MONSTER, "Хлебный монстр")
add(MItems.LOADER_SPAWN_EGG, "Яйцо призыва погрузчика")
add(MEntityTypes.LOADER, "Погрузчик")
add(MItems.CLEANER_DRONE_KIT, "Набор Дрона-уборщика")
add(MItems.ANDROID_MELEE_SPAWN_EGG, "Яйцо призыва андроида ближнего боя")
}
}
@ -1226,6 +1247,16 @@ private fun maps(provider: MatteryLanguageProvider) {
}
}
private fun entities(provider: MatteryLanguageProvider) {
with(provider.russian) {
add(MEntityTypes.ENFORCER, "Принудитель")
add(MEntityTypes.BREAD_MONSTER, "Хлебный монстр")
add(MEntityTypes.LOADER, "Погрузчик")
add(MEntityTypes.CLEANER, "Дрон-уборщик")
add(MEntityTypes.ANDROID_MELEE, "Андроид ближнего боя")
}
}
fun AddRussianLanguage(provider: MatteryLanguageProvider) {
decoratives(provider)
blocks(provider)
@ -1239,4 +1270,5 @@ fun AddRussianLanguage(provider: MatteryLanguageProvider) {
androidFeatures(provider)
jade(provider)
maps(provider)
entities(provider)
}

View File

@ -20,6 +20,21 @@ fun addEntityLoot(loot: LootTables) {
}
setRolls(1)
}
lootPool {
item(MItems.ROGUE_AI_CORE) {
chanceCondition(0.5)
setCount(1, 1)
}
}
}
loot.builder(LootContextParamSets.ENTITY, modLootTable("entities/android_melee")) {
lootPool {
item(MItems.ROGUE_AI_CORE) {
chanceCondition(0.3)
setCount(1, 1)
}
}
}
loot.builder(LootContextParamSets.ENTITY, MEntityTypes.BREAD_MONSTER.defaultLootTable) {

View File

@ -2,14 +2,15 @@ package ru.dbotthepony.mc.otm.datagen.loot
import net.minecraft.util.valueproviders.UniformInt
import net.minecraft.world.item.Items
import net.minecraft.world.level.storage.loot.entries.NestedLootTable
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets
import ru.dbotthepony.mc.otm.util.math.Decimal
import ru.dbotthepony.mc.otm.data.world.UniformDecimal
import ru.dbotthepony.mc.otm.datagen.modLootTable
import ru.dbotthepony.mc.otm.item.ProceduralBatteryItem
import ru.dbotthepony.mc.otm.item.exopack.ProceduralExopackSlotUpgradeItem
import ru.dbotthepony.mc.otm.item.matter.MatterDustItem
import ru.dbotthepony.mc.otm.registry.game.MItems
import ru.dbotthepony.mc.otm.util.math.Decimal
fun addChestLootTables(loot: LootTables) {
loot.builder(LootContextParamSets.CHEST, modLootTable("food_box")) {
@ -27,7 +28,6 @@ fun addChestLootTables(loot: LootTables) {
item(MItems.MECHANICAL_PARTS) { setCount(minimal = 2, maximal = 3) }
item(MItems.IRON_PLATE) { setCount(minimal = 2, maximal = 3) }
item(MItems.ELECTRIC_PARTS) { setCount(minimal = 2, maximal = 3) }
item(MItems.MECHANICAL_PARTS) { setCount(minimal = 2, maximal = 3) }
item(MItems.CIRCUIT_PLATING) { setCount(minimal = 1, maximal = 3) }
item(MItems.METAL_JUNK) { setCount(minimal = 3, maximal = 5) }
@ -44,20 +44,66 @@ fun addChestLootTables(loot: LootTables) {
}
}
loot.builder(LootContextParamSets.CHEST, modLootTable("frigate_cargo")) {
loot.builder(LootContextParamSets.BLOCK, modLootTable("wooden_crate")) {
lootPool {
item(Items.STICK) { setCount(minimal = 2, maximal = 4)}
}
lootPool {
item(Items.OAK_PLANKS) { setCount(minimal = 1, maximal = 2)}
}
}
loot.builder(LootContextParamSets.BLOCK, modLootTable("wooden_crate_materials")) {
lootPool {
item(Items.IRON_INGOT) {
setCount(minimal = 1, maximal = 3)
setWeight(3)
}
item(MItems.TRITANIUM_INGOT) {
setCount(minimal = 1, maximal = 3)
}
}
lootPool {
item(Items.GOLD_INGOT) {
chanceCondition(0.3)
setCount(minimal = 1, maximal = 3)
}
item(Items.DIAMOND) {
chanceCondition(0.1)
setCount(minimal = 1, maximal = 2)
}
}
lootPool {
item(MItems.MECHANICAL_PARTS) { setCount(minimal = 2, maximal = 3) }
item(Items.COPPER_INGOT) { setCount(minimal = 1, maximal = 3) }
}
lootPool {
add(NestedLootTable.lootTableReference(
modLootTable("wooden_crate")
))
}
}
loot.builder(LootContextParamSets.BLOCK, modLootTable("wooden_crate_modules")) {
lootPool {
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(12, 24), UniformInt.of(0, 3)))
}
}
lootPool {
add(NestedLootTable.lootTableReference(
modLootTable("wooden_crate")
))
}
}
loot.builder(LootContextParamSets.CHEST, modLootTable("frigate_cargo")) {
lootPool {
item(Items.IRON_INGOT) { setCount(minimal = 1, maximal = 3)}
item(Items.GOLD_INGOT) { setCount(minimal = 1, maximal = 3) }
item(Items.EMERALD) { setCount(minimal = 1, maximal = 3) }
item(MItems.TRITANIUM_INGOT) { setCount(minimal = 1, maximal = 3) }
item(MItems.MECHANICAL_PARTS) {
setCount(minimal = 2, maximal = 3)
setWeight(2)
}
item(MItems.MECHANICAL_PARTS) { setCount(minimal = 2, maximal = 3)}
item(MItems.CIRCUIT_PLATING) { setCount(minimal = 2, maximal = 3) }
item(MItems.ENERGY_BUS) { setCount(minimal = 0, maximal = 2) }
@ -66,13 +112,11 @@ fun addChestLootTables(loot: LootTables) {
item(Items.SADDLE) { setCount(minimal = 0, maximal = 1) }
item(Items.DIAMOND) { setCount(minimal = 0, maximal = 3) }
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.2)
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) { chanceCondition(0.2)
setWeight(3)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3)))
}
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.1)
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) { chanceCondition(0.1)
setWeight(2)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(9, 18), UniformInt.of(0, 3)))
}
@ -89,7 +133,7 @@ fun addChestLootTables(loot: LootTables) {
}
item(MItems.ZPM_BATTERY) {
chanceCondition(0.001)
chanceCondition(0.0002)
setWeight(1)
}
@ -103,6 +147,8 @@ fun addChestLootTables(loot: LootTables) {
}
}
//LABORATORY///////////
loot.builder(LootContextParamSets.CHEST, modLootTable("laboratory/supply")) {
lootPool {
item(Items.BREAD) { setCount(minimal = 2, maximal = 3) }
@ -115,12 +161,152 @@ fun addChestLootTables(loot: LootTables) {
}
}
loot.builder(LootContextParamSets.CHEST, modLootTable("laboratory/reward")) {
loot.builder(LootContextParamSets.VAULT, modLootTable("laboratory/reward")){
//materials
lootPool {
item(MItems.NUTRIENT_PASTE) { setCount(minimal = 2, maximal = 3) }
item(Items.IRON_INGOT) {
setCount(minimal = 3, maximal = 8)
setWeight(3)
}
item(Items.GOLD_INGOT) {
setCount(minimal = 2, maximal = 3)
setWeight(2)
}
item(Items.DIAMOND) {
setCount(minimal = 1, maximal = 3)
setWeight(1)
}
}
//food
lootPool {
item(MItems.NUTRIENT_PASTE) {
setCount(minimal = 2, maximal = 4)
setWeight(3)
}
item(Items.BREAD) {
setCount(minimal = 2, maximal = 4)
setWeight(4)
}
item(Items.COOKED_BEEF) {
setCount(minimal = 2, maximal = 4)
setWeight(3)
}
}
lootPool {
item(Items.OMINOUS_BOTTLE) {
chanceCondition(0.3)
setWeight(1)
}
}
//otm
lootPool {
item(MItems.MATTER_DUST) {
chanceCondition(0.1)
setWeight(4)
apply(MatterDustItem.Randomizer(UniformDecimal(Decimal(100), Decimal(2_500))))
}
item(MItems.PROCEDURAL_BATTERY) {
chanceCondition(0.05)
setWeight(1)
apply(
ProceduralBatteryItem.Randomizer(
maxBatteryLevel = UniformDecimal(Decimal(10_000_000), Decimal(50_000_000)),
batteryLevel = UniformDecimal(Decimal(0), Decimal(25_000_000)),
maxInput = UniformDecimal(Decimal(1_000), Decimal(5_000)),
)
)
}
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.2)
setWeight(2)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3)))
}
lootPool {
item(MItems.PILL_ANDROID) { chanceCondition(0.1)
setWeight(1)
}
item(MItems.PILL_HEAL) { chanceCondition(0.5)
setWeight(2)
setCount(2, 5)
}
}
}
}
setRolls(5)
loot.builder(LootContextParamSets.CHEST, modLootTable("laboratory/reward_ominous")) {
//unique
lootPool { item(MItems.FALLING_SUN) {
chanceCondition(0.075)
setWeight(1)
} }
//special materials
lootPool {
item(Items.DIAMOND_BLOCK) {
setCount(minimal = 1, maximal = 1)
setWeight(1)
}
item(Items.EMERALD) {
setCount(minimal = 3, maximal = 6)
setWeight(7)
}
item(MItems.WITHERED_STEEL) {
setCount(minimal = 2, maximal = 4)
setWeight(8)
}
}
//materials
lootPool {
item(Items.COAL_BLOCK) {
setCount(minimal = 1, maximal = 3)
setWeight(2)
}
item(Items.IRON_BLOCK) {
setCount(minimal = 2, maximal = 3)
setWeight(1)
}
item(Items.REDSTONE_BLOCK) {
setCount(minimal = 1, maximal = 3)
setWeight(1)
}
}
//pills
lootPool {
item(MItems.PILL_HUMANE) {
chanceCondition(0.1)
setWeight(1)
}
item(MItems.PILL_OBLIVION) {
chanceCondition(0.3)
setWeight(2)
setCount(2, 5)
}
}
//otm
lootPool {
item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.2)
setWeight(2)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(12, 24), UniformInt.of(0, 3)))
}
}
lootPool {
item(MItems.ZPM_BATTERY) {
chanceCondition(0.001)
setWeight(1)
}
}
}
loot.builder(LootContextParamSets.VAULT, modLootTable("laboratory/ominous_vault")){
lootPool{
add(NestedLootTable.lootTableReference(
modLootTable("laboratory/reward")
))
add(NestedLootTable.lootTableReference(
modLootTable("laboratory/reward_ominous")
))
}
}
}

View File

@ -2,13 +2,13 @@ package ru.dbotthepony.mc.otm.datagen.models
import net.minecraft.world.item.DyeColor
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.WaterloggedTransparentBlock
import net.neoforged.neoforge.client.model.generators.BlockModelProvider
import net.neoforged.neoforge.data.event.GatherDataEvent
import ru.dbotthepony.mc.otm.util.ResourceLocation
import ru.dbotthepony.mc.otm.datagen.DataGen
import ru.dbotthepony.mc.otm.util.registryName
import ru.dbotthepony.mc.otm.datagen.modLocation
import java.util.LinkedList
import ru.dbotthepony.mc.otm.util.registryName
import java.util.*
class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(event.generator.packOutput, DataGen.MOD_ID, event.existingFileHelper) {
private val callbacks = LinkedList<(MatteryBlockModelProvider) -> Unit>()
@ -51,6 +51,15 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
}
}
fun decorativeLadder(block: Block) {
exec {
withExistingParent(block.registryName!!.path, ResourceLocation("minecraft", "block/ladder"))
.texture("particle", modLocation("block/decorative/${block.registryName!!.path}"))
.texture("texture", modLocation("block/decorative/${block.registryName!!.path}"))
.renderType("cutout")
}
}
fun decorativeGlassAll(blocks: Collection<Block>) {
for (block in blocks) {
exec {
@ -124,6 +133,12 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
}
}
fun cubeBottomTop(block: Block, side: String, bottom: String, top: String){
exec {
cubeBottomTop(block.registryName!!.path, modLocation(side), modLocation(bottom), modLocation(top))
}
}
fun decorativeColumn(it: Block, side: String, end: String) {
column(it, "block/decorative/$side", "block/decorative/$end")
}

View File

@ -593,4 +593,12 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) {
.unlockedBy(MItems.DILITHIUM_CRYSTAL)
.unlockedBy(MItems.DISPLAY_SCREEN)
.build(consumer)
MatteryRecipe(MItems.CLEANER_DRONE_KIT, category = RecipeCategory.TOOLS)
.row(MItems.ELECTROMOTOR,MItems.ROGUE_AI_CORE,MItems.ELECTROMOTOR)
.row(MItemTags.TRITANIUM_PLATES, MItems.ELECTRIC_PARTS, MItemTags.TRITANIUM_PLATES)
.row(Items.BRUSH, MItemTags.TRITANIUM_PLATES, Items.BRUSH)
.unlockedBy(MItemTags.TRITANIUM_PLATES)
.unlockedBy(MItems.ROGUE_AI_CORE)
.build(consumer)
}

View File

@ -412,6 +412,15 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
.unlockedBy(MItems.METAL_MESH)
.build(consumer, modLocation("decorative/metal_railing"))
MatteryRecipe(MItems.INDUSTRIAL_LADDER, count = 6, category = RecipeCategory.BUILDING_BLOCKS)
.rowAC(MItems.METAL_MESH, MItems.METAL_MESH)
.row(MItems.METAL_MESH, MItems.METAL_MESH, MItems.METAL_MESH)
.rowAC(MItems.METAL_MESH, MItems.METAL_MESH)
.unlockedBy(Items.IRON_BARS)
.unlockedBy(Tags.Items.NUGGETS_IRON)
.unlockedBy(MItems.METAL_MESH)
.build(consumer, modLocation("decorative/industrial_ladder"))
// Голо табличка
MatteryRecipe(MItems.HOLO_SIGN, category = RecipeCategory.DECORATIONS)
.row(MItemTags.BASIC_CIRCUIT, MItemTags.TRITANIUM_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS)

View File

@ -82,6 +82,8 @@ fun addTags(tagsProvider: TagsProvider) {
tagsProvider.impermeable.add(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
tagsProvider.blocks.Appender(BlockTags.CLIMBABLE).add(MBlocks.INDUSTRIAL_LADDER)
tagsProvider.androidImmuneEffects.add(
MobEffects.CONDUIT_POWER,
MobEffects.HEAL,

View File

@ -0,0 +1,19 @@
package ru.dbotthepony.mc.otm.client.animation;
import net.minecraft.client.animation.AnimationChannel;
import net.minecraft.client.animation.AnimationDefinition;
import net.minecraft.client.animation.Keyframe;
import net.minecraft.client.animation.KeyframeAnimations;
public class CleanerAnimation {
public static final AnimationDefinition MOVE = AnimationDefinition.Builder.withLength(0.48F).looping()
.addAnimation("brushR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(0.0F, -360.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("brushL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(0.0F, 360.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.build();
}

View File

@ -0,0 +1,55 @@
package ru.dbotthepony.mc.otm.client.animation;
import net.minecraft.client.animation.AnimationChannel;
import net.minecraft.client.animation.AnimationDefinition;
import net.minecraft.client.animation.Keyframe;
import net.minecraft.client.animation.KeyframeAnimations;
public class DroneAnimation {
public static final AnimationDefinition LOOP = AnimationDefinition.Builder.withLength(3.0F).looping()
.addAnimation("eye", new AnimationChannel(AnimationChannel.Targets.POSITION,
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.32F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.4F, KeyframeAnimations.posVec(0.0F, 0.2F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.52F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(1.08F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(1.16F, KeyframeAnimations.posVec(-0.3F, -0.3F, 0.3F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(1.28F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(1.92F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(2.0F, KeyframeAnimations.posVec(0.0F, 0.0F, -0.4F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(2.12F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(2.72F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(2.8F, KeyframeAnimations.posVec(0.3F, 0.3F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(2.92F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("gyroL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(720.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("gyroR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(720.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("antennaL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(1.52F, KeyframeAnimations.degreeVec(5.5795F, 4.4039F, 2.4381F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM)
))
.addAnimation("antennaR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(1.52F, KeyframeAnimations.degreeVec(5.5795F, -4.4039F, -2.4381F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM)
))
.addAnimation("finL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(1.52F, KeyframeAnimations.degreeVec(0.0F, 20.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM)
))
.addAnimation("finR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(1.52F, KeyframeAnimations.degreeVec(0.0F, -20.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM),
new Keyframe(3.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.CATMULLROM)
))
.build();
}

View File

@ -0,0 +1,101 @@
package ru.dbotthepony.mc.otm.client.animation;
import net.minecraft.client.animation.AnimationChannel;
import net.minecraft.client.animation.AnimationDefinition;
import net.minecraft.client.animation.Keyframe;
import net.minecraft.client.animation.KeyframeAnimations;
public class EnforcerAnimation {
public static final AnimationDefinition CHARGE = AnimationDefinition.Builder.withLength(0.6F).looping()
.addAnimation("root", new AnimationChannel(AnimationChannel.Targets.POSITION,
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, -1.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.posVec(0.0F, -1.1F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.24F, KeyframeAnimations.posVec(0.0F, -1.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.36F, KeyframeAnimations.posVec(0.0F, -1.1F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.posVec(0.0F, -1.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.posVec(0.0F, -1.1F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("Body", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(7.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("leg_FL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.3977F, 21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.degreeVec(-0.4394F, 21.7555F, -4.066F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.24F, KeyframeAnimations.degreeVec(0.3977F, 21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.36F, KeyframeAnimations.degreeVec(-0.4394F, 21.7555F, -4.066F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(0.3977F, 21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(-0.4394F, 21.7555F, -4.066F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("leg_FR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.3635F, -21.7813F, 3.7159F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.degreeVec(-0.4705F, -21.7281F, 3.709F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.24F, KeyframeAnimations.degreeVec(0.3635F, -21.7813F, 3.7159F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.36F, KeyframeAnimations.degreeVec(-0.4705F, -21.7281F, 3.709F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(0.3635F, -21.7813F, 3.7159F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(-0.4705F, -21.7281F, 3.709F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("leg_BR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-0.3977F, 21.8144F, 4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.degreeVec(0.5465F, 21.748F, 4.0604F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.24F, KeyframeAnimations.degreeVec(-0.3977F, 21.8144F, 4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.36F, KeyframeAnimations.degreeVec(0.5465F, 21.748F, 4.0604F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(-0.3977F, 21.8144F, 4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(0.5465F, 21.748F, 4.0604F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("leg_BL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-0.3977F, -21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.degreeVec(0.5465F, -21.748F, -4.0604F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.24F, KeyframeAnimations.degreeVec(-0.3977F, -21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.36F, KeyframeAnimations.degreeVec(0.5465F, -21.748F, -4.0604F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.48F, KeyframeAnimations.degreeVec(-0.3977F, -21.8144F, -4.1091F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(0.5465F, -21.748F, -4.0604F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint0_FL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint1_FL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint0_FR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint1_FR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint0_BL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint1_BL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint0_BR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("joint1_BR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("wheelFR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(360.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("wheelFL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(355.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("wheelBL", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(-360.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.addAnimation("wheelBR", new AnimationChannel(AnimationChannel.Targets.ROTATION,
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.6F, KeyframeAnimations.degreeVec(-360.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.build();
public static final AnimationDefinition IDLE = AnimationDefinition.Builder.withLength(0.12F).looping()
.addAnimation("Body", new AnimationChannel(AnimationChannel.Targets.POSITION,
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR),
new Keyframe(0.12F, KeyframeAnimations.posVec(0.0F, -0.2F, 0.0F), AnimationChannel.Interpolations.LINEAR)
))
.build();
}

View File

@ -0,0 +1,76 @@
package ru.dbotthepony.mc.otm.client.model.entity;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.model.geom.PartPose;
import net.minecraft.client.model.geom.builders.*;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import org.jetbrains.annotations.NotNull;
import ru.dbotthepony.mc.otm.client.animation.BreadMonsterAnimation;
import ru.dbotthepony.mc.otm.client.animation.CleanerAnimation;
import ru.dbotthepony.mc.otm.entity.Cleaner;
import ru.dbotthepony.mc.otm.registry.MNames;
import static ru.dbotthepony.mc.otm.OverdriveThatMatters.loc;
public class CleanerModel {
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(loc(MNames.CLEANER), "main");
private static HierarchicalModel<Cleaner> model;
private static LayerDefinition def;
public static HierarchicalModel<Cleaner> getModel() {
if (def == null) {
def = createBodyLayer();
}
if (model == null) {
return model = new CleanerHierarchicalModel<>(def.bakeRoot());
}
return model;
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create().texOffs(0, 0).addBox(-7.0F, -3.3F, -7.0F, 14.0F, 3.0F, 14.0F, new CubeDeformation(0.0F))
.texOffs(0, 17).addBox(-3.0F, -3.8F, 0.0F, 6.0F, 1.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(0, 7).addBox(-6.0F, -1.0F, 3.0F, 1.0F, 1.0F, 3.0F, new CubeDeformation(0.0F))
.texOffs(0, 7).addBox(5.0F, -1.0F, 3.0F, 1.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
PartDefinition brushR = root.addOrReplaceChild("brushR", CubeListBuilder.create(), PartPose.offset(-4.5F, -0.1F, -4.5F));
PartDefinition brushr_r1 = brushR.addOrReplaceChild("brushr_r1", CubeListBuilder.create().texOffs(7, 0).addBox(10.5F, -1.0F, -3.5F, -7.0F, 0.0F, 7.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(7.0F, -1.1F, 0.0F, 0.0F, 0.0F, -3.1416F));
PartDefinition brushL = root.addOrReplaceChild("brushL", CubeListBuilder.create().texOffs(-7, 0).addBox(-3.5F, -0.1F, -3.5F, 7.0F, 0.0F, 7.0F, new CubeDeformation(0.0F)), PartPose.offset(4.5F, -0.1F, -4.5F));
model = null;
return def = LayerDefinition.create(meshdefinition, 64, 32);
}
private static class CleanerHierarchicalModel<T extends Cleaner> extends HierarchicalModel<T> {
private final ModelPart root;
public CleanerHierarchicalModel(ModelPart root) {
this.root = root.getChild("root");
}
@Override
public void setupAnim(@NotNull T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.root().getAllParts().forEach(ModelPart::resetPose);
this.animate(entity.getIdleState(), CleanerAnimation.MOVE, ageInTicks, 1.0F);
}
@Override
public @NotNull ModelPart root() {
return this.root;
}
}
public static void register(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(LAYER_LOCATION, CleanerModel::createBodyLayer);
}
}

View File

@ -0,0 +1,95 @@
package ru.dbotthepony.mc.otm.client.model.entity;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.model.geom.PartPose;
import net.minecraft.client.model.geom.builders.*;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import org.jetbrains.annotations.NotNull;
import ru.dbotthepony.mc.otm.client.animation.BreadMonsterAnimation;
import ru.dbotthepony.mc.otm.client.animation.DroneAnimation;
import ru.dbotthepony.mc.otm.entity.BreadMonster;
import ru.dbotthepony.mc.otm.entity.Drone;
import ru.dbotthepony.mc.otm.registry.MNames;
import static ru.dbotthepony.mc.otm.OverdriveThatMatters.loc;
public class DroneModel {
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(loc(MNames.DRONE), "main");
private static HierarchicalModel<Drone> model;
private static LayerDefinition def;
public static HierarchicalModel<Drone> getModel() {
if (def == null) {
def = createBodyLayer();
}
if (model == null) {
return model = new DroneModel.DroneHierarchicalModel<>(def.bakeRoot());
}
return model;
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 24.0F, 0.0F));
PartDefinition body = root.addOrReplaceChild("body", CubeListBuilder.create().texOffs(0, 21).addBox(-3.0F, -3.0F, 0.0F, 6.0F, 6.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-6.0F, -6.0F, -8.0F, 12.0F, 12.0F, 9.0F, new CubeDeformation(0.0F))
.texOffs(24, 21).addBox(-4.0F, -4.0F, -10.0F, 8.0F, 8.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(13, 43).addBox(-5.0F, -5.0F, -6.0F, 10.0F, 10.0F, 11.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -8.0F, 1.0F));
PartDefinition eye = body.addOrReplaceChild("eye", CubeListBuilder.create().texOffs(0, 33).addBox(-3.0F, -3.0F, -3.0F, 6.0F, 6.0F, 6.0F, new CubeDeformation(-0.2F)), PartPose.offsetAndRotation(0.0F, 0.0F, -4.5F, 0.0F, 0.0F, 0.0F));
PartDefinition gyroL = body.addOrReplaceChild("gyroL", CubeListBuilder.create().texOffs(40, 31).addBox(-1.0F, -3.0F, -3.0F, 2.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(4.0F, 0.0F, 0.0F));
PartDefinition gyroR = body.addOrReplaceChild("gyroR", CubeListBuilder.create().texOffs(24, 31).addBox(-1.0F, -3.0F, -3.0F, 2.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(-4.0F, 0.0F, 0.0F));
PartDefinition antennaL = body.addOrReplaceChild("antennaL", CubeListBuilder.create().texOffs(46, -2).addBox(0.0F, -22.0F, -1.0F, 0.0F, 23.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(4.0F, -2.0F, 3.0F, -1.1695F, 0.2013F, 0.0846F));
PartDefinition antennaR = body.addOrReplaceChild("antennaR", CubeListBuilder.create().texOffs(42, -2).addBox(0.0F, -22.0F, -1.0F, 0.0F, 23.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-4.0F, -2.0F, 3.0F, -1.1695F, -0.2013F, -0.0846F));
PartDefinition finL = body.addOrReplaceChild("finL", CubeListBuilder.create().texOffs(39, 0).addBox(-1.0F, 0.0F, -1.0F, 5.0F, 0.0F, 11.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(5.0F, 4.5F, 4.0F, 0.2849F, 0.274F, 0.8249F));
PartDefinition finR = body.addOrReplaceChild("finR", CubeListBuilder.create().texOffs(39, 11).addBox(-4.0F, 0.0F, -1.0F, 5.0F, 0.0F, 11.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-5.0F, 4.5F, 4.0F, 0.2849F, -0.274F, -0.8249F));
model = null;
return def = LayerDefinition.create(meshdefinition, 64, 64);
}
private static class DroneHierarchicalModel<T extends Drone> extends HierarchicalModel<T> {
private final ModelPart root;
private final ModelPart body;
private final ModelPart eye;
public DroneHierarchicalModel(ModelPart root) {
this.root = root.getChild("root");
this.body = this.root.getChild("body");
this.eye = this.body.getChild("eye");
}
@Override
public void setupAnim(@NotNull T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.root().getAllParts().forEach(ModelPart::resetPose);
this.body.getChild("eye").yRot = netHeadYaw * ((float) Math.PI / 180F);
this.body.getChild("eye").xRot = headPitch * ((float) Math.PI / 180F);
this.animate(entity.getIdleState(), DroneAnimation.LOOP, ageInTicks, 1.0F);
}
@Override
public @NotNull ModelPart root() {
return this.root;
}
}
public static void register(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(LAYER_LOCATION, DroneModel::createBodyLayer);
}
}

View File

@ -0,0 +1,192 @@
package ru.dbotthepony.mc.otm.client.model.entity;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.model.geom.PartPose;
import net.minecraft.client.model.geom.builders.*;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import org.jetbrains.annotations.NotNull;
import ru.dbotthepony.mc.otm.client.animation.EnforcerAnimation;
import ru.dbotthepony.mc.otm.client.animation.LoaderAnimation;
import ru.dbotthepony.mc.otm.entity.Enforcer;
import ru.dbotthepony.mc.otm.registry.MNames;
import static ru.dbotthepony.mc.otm.OverdriveThatMatters.loc;
public class EnforcerModel {
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(loc(MNames.ENFORCER), "main");
private static HierarchicalModel<Enforcer> model;
private static LayerDefinition def;
public static HierarchicalModel<Enforcer> getModel() {
if (def == null) {
def = createBodyLayer();
}
if (model == null) {
return model = new EnforcerHierarchicalModel<>(def.bakeRoot());
}
return model;
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 18.0F, 0.0F));
PartDefinition base = root.addOrReplaceChild("base", CubeListBuilder.create().texOffs(132, 1).addBox(-8.0F, -2.0F, -7.0F, 16.0F, 5.0F, 14.0F, new CubeDeformation(0.0F))
.texOffs(92, 0).addBox(-5.0F, 0.0F, -10.0F, 10.0F, 14.0F, 20.0F, new CubeDeformation(0.0F))
.texOffs(70, 0).addBox(-7.0F, 1.0F, -11.0F, 3.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(70, 5).addBox(4.0F, 1.0F, -11.0F, 3.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(152, 73).addBox(-6.0F, -5.0F, -6.0F, 12.0F, 3.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -22.0F, 0.0F));
PartDefinition Body = base.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(70, 0).addBox(-9.0F, -16.4F, -8.1F, 3.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(70, 5).addBox(-5.0F, -16.4F, -8.1F, 3.0F, 3.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(92, 34).addBox(-11.0F, -15.4F, 10.9F, 22.0F, 14.0F, 14.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-12.0F, -13.4F, -11.1F, 24.0F, 16.0F, 22.0F, new CubeDeformation(0.0F))
.texOffs(0, 38).addBox(-12.0F, -13.4F, -11.1F, 24.0F, 16.0F, 22.0F, new CubeDeformation(0.5F))
.texOffs(192, 49).addBox(12.0F, -11.4F, -6.1F, 2.0F, 12.0F, 12.0F, new CubeDeformation(0.0F))
.texOffs(164, 49).addBox(-14.0F, -11.4F, -6.1F, 2.0F, 12.0F, 12.0F, new CubeDeformation(0.0F))
.texOffs(92, 62).addBox(-7.0F, 0.0F, 10.0F, 15.0F, 5.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -6.6F, 0.1F));
PartDefinition cube_r1 = Body.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(80, -2).addBox(0.0F, -18.5F, -1.0F, 0.0F, 19.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(8.0F, -12.9F, 7.9F, -0.1745F, 0.0F, 0.0F));
PartDefinition Head = Body.addOrReplaceChild("Head", CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -1.0F, -1.0F, 7.0F, 3.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(-4.0F, 1.6F, -11.1F));
PartDefinition rocket = Body.addOrReplaceChild("rocket", CubeListBuilder.create().texOffs(164, 0).addBox(-13.0F, -8.5F, -14.0F, 13.0F, 21.0F, 28.0F, new CubeDeformation(0.0F)), PartPose.offset(-14.0F, -7.9F, -0.1F));
PartDefinition gun = Body.addOrReplaceChild("gun", CubeListBuilder.create().texOffs(185, 73).addBox(2.0F, -6.0F, -7.0F, 7.0F, 14.0F, 15.0F, new CubeDeformation(0.0F))
.texOffs(187, 102).addBox(1.0F, -7.0F, -6.0F, 9.0F, 16.0F, 13.0F, new CubeDeformation(-0.6F))
.texOffs(218, 170).addBox(2.5F, 4.0F, -1.0F, 6.0F, 6.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(218, 189).addBox(2.5F, -8.0F, -1.0F, 6.0F, 6.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(184, 170).addBox(3.5F, -6.0F, -20.0F, 4.0F, 6.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(220, 56).addBox(2.5F, -2.0F, -17.0F, 6.0F, 6.0F, 11.0F, new CubeDeformation(0.0F))
.texOffs(184, 189).addBox(3.5F, 2.0F, -20.0F, 4.0F, 6.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(80, 160).addBox(-6.0F, -5.0F, -5.0F, 10.0F, 10.0F, 10.0F, new CubeDeformation(0.0F)), PartPose.offset(14.0F, -5.5F, 0.0F));
PartDefinition leg_FL = root.addOrReplaceChild("leg_FL", CubeListBuilder.create().texOffs(45, 76).addBox(-3.561F, -4.2978F, -11.0972F, 7.0F, 9.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(9.5F, -15.5F, -5.5F, 0.9425F, -0.5061F, -0.0349F));
PartDefinition joint0_FL = leg_FL.addOrReplaceChild("joint0_FL", CubeListBuilder.create().texOffs(82, 233).addBox(-3.061F, -9.3731F, -7.1617F, 6.0F, 15.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -3.0F, -8.0F, -0.3054F, 0.0F, 0.0F));
PartDefinition joint1_FL = joint0_FL.addOrReplaceChild("joint1_FL", CubeListBuilder.create().texOffs(88, 91).addBox(-2.061F, -1.7726F, -14.7213F, 4.0F, 3.0F, 16.0F, new CubeDeformation(0.0F))
.texOffs(110, 230).addBox(-4.061F, -8.7726F, -15.7213F, 8.0F, 7.0F, 19.0F, new CubeDeformation(0.0F))
.texOffs(103, 225).addBox(-3.061F, -4.7726F, -15.7213F, 6.0F, 9.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(30, 124).addBox(-5.061F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(30, 142).addBox(2.939F, -1.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -9.0F, -4.0F, 0.1309F, 0.0F, 0.0F));
PartDefinition cube_r2 = joint1_FL.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(24, 184).addBox(-3.939F, 1.6269F, -0.1617F, 7.0F, 10.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.5F, -6.5F, -12.0F, -1.9635F, 0.0F, 0.0F));
PartDefinition wheelFL = joint1_FL.addOrReplaceChild("wheelFL", CubeListBuilder.create(), PartPose.offset(-0.061F, 0.2274F, -23.7213F));
PartDefinition cube_r3 = wheelFL.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(184, 232).addBox(-3.061F, -5.9313F, -7.9979F, 6.0F, 12.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.061F, -1.4613F, 1.3641F, 0.7854F, 0.0F, 0.0F));
PartDefinition leg_FR = root.addOrReplaceChild("leg_FR", CubeListBuilder.create().texOffs(0, 76).addBox(-3.439F, -4.2978F, -11.0972F, 7.0F, 9.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-9.5F, -15.5F, -5.5F, 0.9425F, 0.5061F, 0.0349F));
PartDefinition joint0_FR = leg_FR.addOrReplaceChild("joint0_FR", CubeListBuilder.create().texOffs(0, 233).addBox(-2.939F, -9.3731F, -7.1617F, 6.0F, 15.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -3.0F, -8.0F, -0.3054F, 0.0F, 0.0F));
PartDefinition joint1_FR = joint0_FR.addOrReplaceChild("joint1_FR", CubeListBuilder.create().texOffs(88, 72).addBox(-1.939F, -1.7726F, -14.7213F, 4.0F, 3.0F, 16.0F, new CubeDeformation(0.0F))
.texOffs(28, 230).addBox(-3.939F, -8.7726F, -15.7213F, 8.0F, 7.0F, 19.0F, new CubeDeformation(0.0F))
.texOffs(21, 225).addBox(-2.939F, -4.7726F, -15.7213F, 6.0F, 9.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(0, 124).addBox(-4.939F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(0, 142).addBox(3.061F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -9.0F, -4.0F, 0.1309F, 0.0F, 0.0F));
PartDefinition cube_r4 = joint1_FR.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(24, 184).addBox(-3.939F, 1.6269F, -0.1617F, 7.0F, 10.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.5F, -6.5F, -12.0F, -1.9635F, 0.0F, 0.0F));
PartDefinition wheelFR = joint1_FR.addOrReplaceChild("wheelFR", CubeListBuilder.create(), PartPose.offset(0.061F, 0.2274F, -23.7213F));
PartDefinition cube_r5 = wheelFR.addOrReplaceChild("cube_r5", CubeListBuilder.create().texOffs(220, 232).addBox(-2.939F, -5.9313F, -7.9979F, 6.0F, 12.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.061F, -1.4613F, 1.3641F, 0.7854F, 0.0F, 0.0F));
PartDefinition leg_BL = root.addOrReplaceChild("leg_BL", CubeListBuilder.create().texOffs(45, 100).addBox(-3.561F, -3.9644F, -2.2362F, 7.0F, 9.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(9.5F, -15.8333F, 5.8333F, -0.9425F, 0.5061F, -0.0349F));
PartDefinition joint0_BL = leg_BL.addOrReplaceChild("joint0_BL", CubeListBuilder.create().texOffs(0, 202).addBox(-3.061F, -9.0749F, -0.7948F, 6.0F, 15.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -2.6667F, 7.6667F, 0.3491F, 0.0F, 0.0F));
PartDefinition joint1_BL = joint0_BL.addOrReplaceChild("joint1_BL", CubeListBuilder.create().texOffs(128, 72).addBox(-1.939F, -1.7726F, -14.7213F, 4.0F, 3.0F, 16.0F, new CubeDeformation(0.0F))
.texOffs(28, 199).addBox(-3.939F, -8.7726F, -15.7213F, 8.0F, 7.0F, 19.0F, new CubeDeformation(0.0F))
.texOffs(0, 187).addBox(-2.939F, -4.8726F, -15.7213F, 6.0F, 9.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(60, 124).addBox(-4.939F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(60, 142).addBox(3.061F, -2.8726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -8.7509F, 4.1156F, -2.9671F, 0.0F, -3.1416F));
PartDefinition thruster_r1 = joint1_BL.addOrReplaceChild("thruster_r1", CubeListBuilder.create().texOffs(0, 160).addBox(0.0F, -9.0F, -14.0F, 7.0F, 11.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-3.5F, -2.7491F, -3.6156F, -0.7418F, 0.0F, 0.0F));
PartDefinition cube_r6 = joint1_BL.addOrReplaceChild("cube_r6", CubeListBuilder.create().texOffs(48, 184).addBox(-3.939F, 1.6269F, -0.1617F, 7.0F, 10.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.5F, -6.7491F, -26.1156F, 1.1781F, 0.0F, 0.0F));
PartDefinition wheelBL = joint1_BL.addOrReplaceChild("wheelBL", CubeListBuilder.create(), PartPose.offset(0.061F, 0.2274F, -22.7213F));
PartDefinition cube_r7 = wheelBL.addOrReplaceChild("cube_r7", CubeListBuilder.create().texOffs(184, 208).addBox(-2.939F, -5.9313F, -7.9979F, 6.0F, 12.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.061F, -1.4613F, 1.3641F, 0.7854F, 0.0F, 0.0F));
PartDefinition leg_BR = root.addOrReplaceChild("leg_BR", CubeListBuilder.create().texOffs(1, 100).addBox(-3.439F, -3.9644F, -1.5695F, 7.0F, 9.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-9.5F, -15.8333F, 5.1667F, -0.9425F, -0.5061F, 0.0349F));
PartDefinition joint0_BR = leg_BR.addOrReplaceChild("joint0_BR", CubeListBuilder.create().texOffs(82, 202).addBox(-2.939F, -9.0749F, -0.7948F, 6.0F, 15.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -2.6667F, 8.3333F, 0.3491F, 0.0F, 0.0F));
PartDefinition joint1_BR = joint0_BR.addOrReplaceChild("joint1_BR", CubeListBuilder.create().texOffs(128, 91).addBox(-2.061F, -1.7726F, -14.7213F, 4.0F, 3.0F, 16.0F, new CubeDeformation(0.0F))
.texOffs(110, 199).addBox(-4.061F, -8.7726F, -15.7213F, 8.0F, 7.0F, 19.0F, new CubeDeformation(0.0F))
.texOffs(83, 187).addBox(-3.061F, -4.7726F, -15.7213F, 6.0F, 9.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(90, 124).addBox(-5.061F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(90, 142).addBox(2.939F, -2.7726F, -25.7213F, 2.0F, 5.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -8.7509F, 4.1156F, -2.9671F, 0.0F, -3.1416F));
PartDefinition thruster_r2 = joint1_BR.addOrReplaceChild("thruster_r2", CubeListBuilder.create().texOffs(40, 160).addBox(0.0F, -9.0F, -14.0F, 7.0F, 11.0F, 13.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-3.5F, -2.7491F, -3.6156F, -0.7418F, 0.0F, 0.0F));
PartDefinition cube_r8 = joint1_BR.addOrReplaceChild("cube_r8", CubeListBuilder.create().texOffs(48, 184).addBox(-3.939F, 1.6269F, -0.1617F, 7.0F, 10.0F, 5.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.5F, -6.7491F, -26.1156F, 1.1781F, 0.0F, 0.0F));
PartDefinition wheelBR = joint1_BR.addOrReplaceChild("wheelBR", CubeListBuilder.create(), PartPose.offset(-0.061F, 0.2274F, -23.7213F));
PartDefinition cube_r9 = wheelBR.addOrReplaceChild("cube_r9", CubeListBuilder.create().texOffs(220, 208).addBox(-3.061F, -5.9313F, -7.9979F, 6.0F, 12.0F, 12.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.061F, -1.4613F, 1.3641F, 0.7854F, 0.0F, 0.0F));
model = null;
return def = LayerDefinition.create(meshdefinition, 256, 256);
}
private static class EnforcerHierarchicalModel<T extends Enforcer> extends HierarchicalModel<T> {
private final ModelPart root;
private final ModelPart base;
private final ModelPart Body;
private final ModelPart Head;
private final ModelPart rocket;
private final ModelPart gun;
public EnforcerHierarchicalModel(ModelPart root) {
this.root = root.getChild("root");
this.base = this.root.getChild("base");
this.Body = this.base.getChild("Body");
this.Head = this.Body.getChild("Head");
this.rocket = this.Body.getChild("rocket");
this.gun = this.Body.getChild("gun");
}
@Override
public void setupAnim(@NotNull T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.root().getAllParts().forEach(ModelPart::resetPose);
this.Head.xRot = headPitch * ((float) Math.PI / 180F);
this.Body.yRot = netHeadYaw * ((float) Math.PI / 180F);
this.rocket.xRot = headPitch * ((float) Math.PI / 180F);
this.gun.xRot = headPitch * ((float) Math.PI / 180F);
//this.animate(entity.getChargeState(), EnforcerAnimation.CHARGE, ageInTicks, 1.0F);
this.animateWalk(EnforcerAnimation.CHARGE, limbSwing, limbSwingAmount, 0.8F, 2.5F);
this.animate(entity.getIdleState(), EnforcerAnimation.IDLE, ageInTicks, 1.0F);
}
public ModelPart getHead() {
return this.Body.getChild("Head");
}
@Override
public @NotNull ModelPart root() {
return this.root;
}
}
public static void register(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(LAYER_LOCATION, EnforcerModel::createBodyLayer);
}
}

View File

@ -21,7 +21,7 @@ public class LoaderModel {
public static HierarchicalModel<Loader> getModel() {
if (def == null) {
def = createBodyLayer(); // Ensure def is created before using it
def = createBodyLayer();
}
if (model == null) {

View File

@ -0,0 +1,46 @@
package ru.dbotthepony.mc.otm.client.model.entity;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.model.geom.PartPose;
import net.minecraft.client.model.geom.builders.*;
import net.minecraft.world.entity.Entity;
import ru.dbotthepony.mc.otm.entity.RocketProjectile;
import ru.dbotthepony.mc.otm.registry.MNames;
import static ru.dbotthepony.mc.otm.OverdriveThatMatters.loc;
public class RocketModel extends HierarchicalModel<RocketProjectile> {
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(loc(MNames.ROCKET), "main");
private final ModelPart mainPart;
public RocketModel(ModelPart root) {
this.mainPart = root.getChild("bb_main");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshDefinition = new MeshDefinition();
PartDefinition partDefinition = meshDefinition.getRoot();
partDefinition.addOrReplaceChild(
"bb_main",
CubeListBuilder.create()
.texOffs(0, 0)
.addBox(-2.0F, -2.0F, -6.0F, 4.0F, 4.0F, 12.0F),
PartPose.offset(0.0F, 0.0F, 0.0F)
);
return LayerDefinition.create(meshDefinition, 32, 16);
}
@Override
public void setupAnim(RocketProjectile entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
}
@Override
public ModelPart root() {
return mainPart;
}
}

View File

@ -5,6 +5,8 @@ import net.minecraft.client.Minecraft
import net.minecraft.core.BlockPos
import net.minecraft.core.HolderLookup
import net.minecraft.core.SectionPos
import net.minecraft.core.particles.DustParticleOptions
import net.minecraft.core.particles.ParticleTypes
import net.minecraft.nbt.CompoundTag
import net.minecraft.server.level.ServerLevel
import net.minecraft.server.level.ServerPlayer
@ -202,10 +204,34 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Mattery
setDeltaMovement(ply, center, distance)
}
for (item in level!!.getEntitiesOfClass(ItemEntity::class.java, affectedBoundsAABB)) {
val level = level!!
for (item in level.getEntitiesOfClass(ItemEntity::class.java, affectedBoundsAABB)) {
val distance = item.position().distanceTo(center)
setDeltaMovement(item, center, distance)
}
if (level.otmRandom.nextDouble() < 0.8) {
val size = gravitationStrength.pow(0.5)
val eventHorizonRadius = size / 2
val spawnRadius = 4 + eventHorizonRadius * (1.2 + level.otmRandom.nextDouble() * 0.6)
val theta = level.otmRandom.nextDouble() * Math.PI * 2
val phi = level.otmRandom.nextDouble() * Math.PI - Math.PI / 2
//мугек я не ощущаю центр
//хз нужно настроить
val x = blockPos.x + 0.5 + spawnRadius * Math.cos(theta) * Math.cos(phi)
val y = blockPos.y + 0.5 + spawnRadius * Math.sin(phi)
val z = blockPos.z + 0.5 + spawnRadius * Math.sin(theta) * Math.cos(phi)
val motionX = (blockPos.x + 0.5 - x) * 0.05
val motionY = (blockPos.y - 1.5 - y) * 0.05
val motionZ = (blockPos.z + 0.5 - z) * 0.05
level.addParticle(ParticleTypes.SMOKE, x, y, z, motionX, motionY, motionZ)
}
}
private val sphericalPositionsCache = ArrayList<BlockPos>()

View File

@ -0,0 +1,18 @@
package ru.dbotthepony.mc.otm.client.render.entity
import net.minecraft.client.model.HierarchicalModel
import net.minecraft.client.renderer.entity.EntityRendererProvider
import net.minecraft.client.renderer.entity.MobRenderer
import net.minecraft.resources.ResourceLocation
import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc
import ru.dbotthepony.mc.otm.client.model.entity.CleanerModel
import ru.dbotthepony.mc.otm.entity.Cleaner
class CleanerRenderer(context: EntityRendererProvider.Context)
: MobRenderer<Cleaner, HierarchicalModel<Cleaner>>(context, CleanerModel.getModel(), 0.5f) {
override fun getTextureLocation(entity: Cleaner): ResourceLocation = TEXTURE_LOCATION
companion object {
private val TEXTURE_LOCATION = loc("textures/entity/cleaner.png")
}
}

View File

@ -0,0 +1,58 @@
package ru.dbotthepony.mc.otm.client.render.entity
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.client.model.HierarchicalModel
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.RenderType
import net.minecraft.client.renderer.entity.EntityRendererProvider
import net.minecraft.client.renderer.entity.MobRenderer
import net.minecraft.client.renderer.entity.layers.RenderLayer
import net.minecraft.client.renderer.texture.OverlayTexture
import net.minecraft.resources.ResourceLocation
import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc
import ru.dbotthepony.mc.otm.client.model.entity.DroneModel
import ru.dbotthepony.mc.otm.entity.Drone
class DroneRenderer(context: EntityRendererProvider.Context)
: MobRenderer<Drone, HierarchicalModel<Drone>>(context, DroneModel.getModel(), 0.8f) {
override fun getTextureLocation(entity: Drone): ResourceLocation = TEXTURE_LOCATION
init {
this.addLayer(DroneEmissiveLayer(this, model))
}
companion object {
private val TEXTURE_LOCATION = loc("textures/entity/drone.png")
}
}
class DroneEmissiveLayer(
entityRenderer: DroneRenderer,
model: HierarchicalModel<Drone>
) : RenderLayer<Drone, HierarchicalModel<Drone>>(entityRenderer) {
private val emissive = loc("textures/entity/drone_emissive.png")
override fun render(
poseStack: PoseStack,
bufferSource: MultiBufferSource,
packedLight: Int,
entity: Drone,
limbSwing: Float,
limbSwingAmount: Float,
partialTicks: Float,
ageInTicks: Float,
netHeadYaw: Float,
headPitch: Float
) {
val buffer = bufferSource.getBuffer(RenderType.eyes(emissive))
this.parentModel.renderToBuffer(
poseStack,
buffer,
15728640,
OverlayTexture.NO_OVERLAY
)
}
}

View File

@ -0,0 +1,57 @@
package ru.dbotthepony.mc.otm.client.render.entity
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.client.model.HierarchicalModel
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.RenderType
import net.minecraft.client.renderer.entity.EntityRendererProvider
import net.minecraft.client.renderer.entity.MobRenderer
import net.minecraft.client.renderer.entity.layers.RenderLayer
import net.minecraft.client.renderer.texture.OverlayTexture
import net.minecraft.resources.ResourceLocation
import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc
import ru.dbotthepony.mc.otm.client.model.entity.EnforcerModel
import ru.dbotthepony.mc.otm.entity.Enforcer
class EnforcerRenderer(context: EntityRendererProvider.Context)
: MobRenderer<Enforcer, HierarchicalModel<Enforcer>>(context, EnforcerModel.getModel(), 2.2f) {
override fun getTextureLocation(entity: Enforcer): ResourceLocation = TEXTURE_LOCATION
init {
this.addLayer(EnforcerEmissiveLayer(this, model))
}
companion object {
private val TEXTURE_LOCATION = loc("textures/entity/enforcer.png")
}
}
class EnforcerEmissiveLayer(
entityRenderer: EnforcerRenderer,
model: HierarchicalModel<Enforcer>
) : RenderLayer<Enforcer, HierarchicalModel<Enforcer>>(entityRenderer) {
private val emissive = loc("textures/entity/enforcer_emissive.png")
override fun render(
poseStack: PoseStack,
bufferSource: MultiBufferSource,
packedLight: Int,
entity: Enforcer,
limbSwing: Float,
limbSwingAmount: Float,
partialTicks: Float,
ageInTicks: Float,
netHeadYaw: Float,
headPitch: Float
) {
val buffer = bufferSource.getBuffer(RenderType.eyes(emissive))
this.parentModel.renderToBuffer(
poseStack,
buffer,
15728640,
OverlayTexture.NO_OVERLAY
)
}
}

View File

@ -1,8 +1,13 @@
package ru.dbotthepony.mc.otm.client.render.entity
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.client.model.HierarchicalModel
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.RenderType
import net.minecraft.client.renderer.entity.EntityRendererProvider
import net.minecraft.client.renderer.entity.MobRenderer
import net.minecraft.client.renderer.entity.layers.RenderLayer
import net.minecraft.client.renderer.texture.OverlayTexture
import net.minecraft.resources.ResourceLocation
import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc
import ru.dbotthepony.mc.otm.client.model.entity.LoaderModel
@ -12,7 +17,42 @@ class LoaderRenderer(context: EntityRendererProvider.Context)
: MobRenderer<Loader, HierarchicalModel<Loader>>(context, LoaderModel.getModel(), 0.8f) {
override fun getTextureLocation(entity: Loader): ResourceLocation = TEXTURE_LOCATION
init {
this.addLayer(LoaderEmissiveLayer(this, model))
}
companion object {
private val TEXTURE_LOCATION = loc("textures/entity/loader.png")
}
}
class LoaderEmissiveLayer(
entityRenderer: LoaderRenderer,
model: HierarchicalModel<Loader>
) : RenderLayer<Loader, HierarchicalModel<Loader>>(entityRenderer) {
private val emissive = loc("textures/entity/loader_emissive.png")
override fun render(
poseStack: PoseStack,
bufferSource: MultiBufferSource,
packedLight: Int,
entity: Loader,
limbSwing: Float,
limbSwingAmount: Float,
partialTicks: Float,
ageInTicks: Float,
netHeadYaw: Float,
headPitch: Float
) {
val buffer = bufferSource.getBuffer(RenderType.eyes(emissive))
this.parentModel.renderToBuffer(
poseStack,
buffer,
15728640,
OverlayTexture.NO_OVERLAY
)
}
}

View File

@ -0,0 +1,51 @@
package ru.dbotthepony.mc.otm.client.renderer.entity
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.RenderType
import net.minecraft.client.renderer.entity.EntityRenderer
import net.minecraft.client.renderer.entity.EntityRendererProvider
import net.minecraft.client.renderer.texture.OverlayTexture
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.phys.Vec3
import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc
import ru.dbotthepony.mc.otm.client.model.entity.RocketModel
import ru.dbotthepony.mc.otm.entity.RocketProjectile
class RocketRenderer(context: EntityRendererProvider.Context) : EntityRenderer<RocketProjectile>(context) {
private val model: ModelPart = RocketModel.createBodyLayer().bakeRoot()
private val TEXTURE = loc("textures/entity/missile.png")
override fun getTextureLocation(entity: RocketProjectile): ResourceLocation = TEXTURE
override fun render(
entity: RocketProjectile,
yaw: Float,
partialTicks: Float,
poseStack: PoseStack,
buffer: MultiBufferSource,
packedLight: Int
) {
poseStack.pushPose()
val motion: Vec3 = entity.deltaMovement
val speed = motion.length()
if (speed > 0) {
val yawRotation = Math.toDegrees(Math.atan2(motion.x, motion.z)).toFloat()
val pitch = Math.toDegrees(-motion.y / speed).toFloat()
poseStack.mulPose(com.mojang.math.Axis.YP.rotationDegrees(yawRotation))
poseStack.mulPose(com.mojang.math.Axis.XP.rotationDegrees(pitch+ 180F))
}
val vertexConsumer = buffer.getBuffer(RenderType.entityCutout(TEXTURE))
model.render(poseStack, vertexConsumer, 15728880, OverlayTexture.NO_OVERLAY)
poseStack.popPose()
super.render(entity, yaw, partialTicks, poseStack, buffer, packedLight)
}
}

View File

@ -1,5 +1,7 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.EntityType
@ -21,6 +23,9 @@ import net.minecraft.world.entity.npc.Villager
import net.minecraft.world.entity.player.Player
import net.minecraft.world.item.ItemStack
import net.minecraft.world.level.Level
import net.minecraft.world.level.storage.loot.LootTable
import ru.dbotthepony.mc.otm.OverdriveThatMatters
import ru.dbotthepony.mc.otm.util.ResourceLocation
class AndroidMelee(type: EntityType<AndroidMelee>, level: Level) : Monster(type, level) {
@ -54,6 +59,13 @@ class AndroidMelee(type: EntityType<AndroidMelee>, level: Level) : Monster(type,
return SoundEvents.VAULT_BREAK
}
override fun getDefaultLootTable(): ResourceKey<LootTable> {
return ResourceKey.create(
Registries.LOOT_TABLE,
ResourceLocation(OverdriveThatMatters.MOD_ID, "entities/android_melee")
)
}
override fun createNavigation(level: Level): PathNavigation = GroundPathNavigation(this, level)
companion object {
@ -61,6 +73,7 @@ class AndroidMelee(type: EntityType<AndroidMelee>, level: Level) : Monster(type,
return createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 30.0)
.add(Attributes.ARMOR, 4.0)
.add(Attributes.ARMOR_TOUGHNESS, 2.0)
.add(Attributes.SCALE, 1.1)
.add(Attributes.MOVEMENT_SPEED, 0.3)
.add(Attributes.ATTACK_DAMAGE, 4.0)

View File

@ -14,11 +14,7 @@ import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation
import net.minecraft.world.entity.ai.navigation.PathNavigation
import net.minecraft.world.entity.monster.AbstractIllager
import net.minecraft.world.entity.monster.AbstractSkeleton
import net.minecraft.world.entity.monster.Monster
import net.minecraft.world.entity.monster.Zombie
import net.minecraft.world.entity.npc.Villager
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.Level
import ru.dbotthepony.mc.otm.registry.game.MEntityTypes

View File

@ -0,0 +1,68 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.InteractionHand
import net.minecraft.world.InteractionResult
import net.minecraft.world.entity.AnimationState
import net.minecraft.world.entity.EntityType
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.attributes.AttributeSupplier
import net.minecraft.world.entity.ai.attributes.Attributes
import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation
import net.minecraft.world.entity.ai.navigation.PathNavigation
import net.minecraft.world.entity.monster.Monster
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.Level
class Cleaner(type: EntityType<Cleaner>, level: Level) : Monster(type, level) {
val idleState = AnimationState()
init {
idleState.start(tickCount)
}
override fun registerGoals() {
goalSelector.addGoal(8, RandomLookAroundGoal(this))
goalSelector.addGoal(7, WaterAvoidingRandomStrollGoal(this, 0.8))
}
override fun createNavigation(level: Level): PathNavigation = GroundPathNavigation(this, level)
override fun isPushable(): Boolean {
return false
}
override fun getControllingPassenger(): LivingEntity? {
return null
}
override fun isMultipartEntity(): Boolean {
return false
}
override fun getHurtSound(damageSource: net.minecraft.world.damagesource.DamageSource): SoundEvent {
return SoundEvents.HEAVY_CORE_BREAK
}
override fun getDeathSound(): SoundEvent {
return SoundEvents.VAULT_BREAK
}
override fun mobInteract(player: Player, hand: InteractionHand): InteractionResult {
if (!this.level().isClientSide) {
player.startRiding(this)
return InteractionResult.SUCCESS
}
return InteractionResult.CONSUME
}
companion object {
fun createAttributes() : AttributeSupplier.Builder {
return createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 4.0)
.add(Attributes.MOVEMENT_SPEED, 0.2)
}
}
}

View File

@ -0,0 +1,114 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.*
import net.minecraft.world.entity.ai.attributes.AttributeSupplier
import net.minecraft.world.entity.ai.attributes.Attributes
import net.minecraft.world.entity.ai.control.MoveControl
import net.minecraft.world.entity.ai.goal.*
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal
import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
import net.minecraft.world.entity.ai.navigation.PathNavigation
import net.minecraft.world.entity.monster.Monster
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.Level
import net.minecraft.world.phys.Vec3
import ru.dbotthepony.mc.otm.registry.game.MEntityTypes
import java.util.*
import kotlin.math.cos
import kotlin.math.sin
class Drone(type: EntityType<Drone>, level: Level) : Monster(type, level) {
constructor(level: Level) : this(MEntityTypes.DRONE, level)
var attackTarget: LivingEntity? = null
var attackTime = 0
var attackDuration = 40
val idleState = AnimationState()
override fun createNavigation(level: Level): PathNavigation = FlyingPathNavigation(this, level())
init {
idleState.start(tickCount)
this.isNoGravity = true
}
override fun registerGoals() {
goalSelector.addGoal(8, RandomLookAroundGoal(this))
goalSelector.addGoal(8, LookAtPlayerGoal(this, Player::class.java, 12f))
goalSelector.addGoal(3, NearestAttackableTargetGoal(this, Player::class.java , true, true))
goalSelector.addGoal(2, DroneBeamAttackGoal(this))
targetSelector.addGoal(1, HurtByTargetGoal(this))
}
override fun getHurtSound(damageSource: net.minecraft.world.damagesource.DamageSource): SoundEvent {
return SoundEvents.HEAVY_CORE_BREAK
}
override fun getDeathSound(): SoundEvent {
return SoundEvents.VAULT_BREAK
}
//essentially same attack as guardians
//probably needs to render a beam too
class DroneBeamAttackGoal(private val mob: Drone) : Goal() {
private var attackCooldown = 0
override fun canUse(): Boolean {
val target = mob.target
return target != null && mob.distanceToSqr(target) < 100
}
override fun start() {
mob.attackTarget = mob.target
mob.attackTime = 0
}
override fun stop() {
mob.attackTarget = null
mob.attackTime = 0
}
override fun tick() {
val target = mob.attackTarget ?: return
mob.lookAt(target, 30.0f, 30.0f)
if (mob.attackTime < mob.attackDuration) {
mob.attackTime++
if (mob.attackTime == mob.attackDuration / 2) {
mob.playSound(SoundEvents.GUARDIAN_ATTACK, 1.0f, 1.0f)
}
} else {
val direction = Vec3(target.x - mob.x, target.eyeY - mob.eyeY, target.z - mob.z).normalize()
target.hurt(mob.damageSources().magic(), 6.0f)
mob.attackTime = 0
attackCooldown = 60
}
if (attackCooldown > 0) {
attackCooldown--
}
}
}
companion object {
fun createAttributes() : AttributeSupplier.Builder {
return createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 10.0)
.add(Attributes.MOVEMENT_SPEED, 0.4)
.add(Attributes.ATTACK_DAMAGE, 3.0)
.add(Attributes.GRAVITY, 0.0)
.add(Attributes.KNOCKBACK_RESISTANCE, 0.4)
.add(Attributes.FALL_DAMAGE_MULTIPLIER, 0.0)
}
}
}

View File

@ -0,0 +1,448 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.core.particles.ParticleTypes
import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.EntityDataSerializers
import net.minecraft.network.syncher.SynchedEntityData
import net.minecraft.server.level.ServerBossEvent
import net.minecraft.server.level.ServerLevel
import net.minecraft.server.level.ServerPlayer
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.sounds.SoundSource
import net.minecraft.tags.ItemTags
import net.minecraft.util.Mth
import net.minecraft.world.BossEvent
import net.minecraft.world.damagesource.DamageSource
import net.minecraft.world.entity.AnimationState
import net.minecraft.world.entity.EntityType
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.MoverType
import net.minecraft.world.entity.ai.attributes.AttributeSupplier
import net.minecraft.world.entity.ai.attributes.Attributes
import net.minecraft.world.entity.ai.goal.Goal
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal
import net.minecraft.world.entity.ai.navigation.GroundPathNavigation
import net.minecraft.world.entity.ai.navigation.PathNavigation
import net.minecraft.world.entity.monster.AbstractIllager
import net.minecraft.world.entity.monster.AbstractSkeleton
import net.minecraft.world.entity.monster.Monster
import net.minecraft.world.entity.monster.Zombie
import net.minecraft.world.entity.npc.Villager
import net.minecraft.world.entity.player.Player
import net.minecraft.world.entity.projectile.SmallFireball
import net.minecraft.world.item.Items
import net.minecraft.world.item.ShieldItem
import net.minecraft.world.level.Level
import net.minecraft.world.phys.Vec3
import ru.dbotthepony.mc.otm.registry.game.MSoundEvents
import ru.dbotthepony.mc.otm.util.TickList
import java.util.*
import kotlin.math.cos
import kotlin.math.sin
class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
val idleState = AnimationState()
val chargeState = AnimationState()
init {
idleState.start(tickCount)
this.setPersistenceRequired()
}
companion object {
fun createAttributes() : AttributeSupplier.Builder {
return createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 300.0)
.add(Attributes.ARMOR, 20.0)
.add(Attributes.ARMOR_TOUGHNESS, 6.0)
.add(Attributes.MOVEMENT_SPEED, 0.3)
.add(Attributes.STEP_HEIGHT, 1.0)
.add(Attributes.KNOCKBACK_RESISTANCE, 1.0)
.add(Attributes.FOLLOW_RANGE, 32.0)
}
private val IS_CHARGING: EntityDataAccessor<Boolean> =
SynchedEntityData.defineId(Enforcer::class.java, EntityDataSerializers.BOOLEAN)
}
override fun defineSynchedData(builder: SynchedEntityData.Builder) {
super.defineSynchedData(builder)
builder.define(IS_CHARGING, false)
}
var isCharging: Boolean
get() = entityData.get(IS_CHARGING)
set(value) {
entityData.set(IS_CHARGING, value)
}
override fun registerGoals() {
targetSelector.addGoal(1, HurtByTargetGoal(this))
targetSelector.addGoal(2, NearestAttackableTargetGoal(this, LivingEntity::class.java, 10, true, true) { entity ->
entity is Player ||
entity is Villager ||
entity is AbstractIllager ||
entity is Zombie ||
entity is AbstractSkeleton
})
goalSelector.addGoal(2, RammingGoal(this))
goalSelector.addGoal(2, StayNearGoal(this))
goalSelector.addGoal(2, EnforcerArsenalGoal(this))
goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f))
}
override fun createNavigation(level: Level): PathNavigation = GroundPathNavigation(this, level)
override fun isPushable(): Boolean {
return false
}
override fun getHurtSound(damageSource: DamageSource): SoundEvent {
return SoundEvents.HEAVY_CORE_BREAK
}
override fun getDeathSound(): SoundEvent {
return SoundEvents.VAULT_BREAK
}
///boss healthbar
private val bossEvent: ServerBossEvent =
ServerBossEvent(name, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.PROGRESS)
override fun startSeenByPlayer(player: ServerPlayer) {
super.startSeenByPlayer(player)
bossEvent.addPlayer(player)
}
override fun stopSeenByPlayer(player: ServerPlayer) {
super.stopSeenByPlayer(player)
bossEvent.removePlayer(player)
}
override fun aiStep() {
super.aiStep()
bossEvent.name = name
bossEvent.progress = this.health / this.maxHealth
}
override fun die(cause: DamageSource) {
super.die(cause)
bossEvent.removeAllPlayers()
}
///
//this stuff removes 180-degree head rotation limits that minecraft mobs have, since this is a turret on a tank, we don't need such limits
//WE ARE BEYOND THAT, THOSE ARE MY GREAT WAR-MACHINES
override fun getMaxHeadYRot(): Int {
return 180
}
private fun shootFireball(math: Float) {
if (level().isClientSide) return
val offset_dist = 1.2
val viewVector = this.getViewVector(1.0F).normalize()
val leftVec = Vec3(viewVector.z, 0.0, -viewVector.x).normalize().scale(offset_dist)
val gun_x = x + leftVec.x
val gun_z = z + leftVec.z
val gun_y = y + 2.2
//stfu idea i like my underscores
val fireballX = gun_x
val fireballY = gun_y
val fireballZ = gun_z
val fireball = SmallFireball(level(), fireballX, fireballY, fireballZ, viewVector)
fireball.shootFromRotation(this, this.xRot, this.yHeadRot, 0.0F, 1.5F, 0.2F)
fireball.setPos(fireballX, fireballY, fireballZ)
fireball.owner = this
level().addFreshEntity(fireball)
}
private fun shootMissile(math: Float) {
if (level().isClientSide) return
val offset_dist = 1.2
val viewVector = this.getViewVector(1.0F).normalize()
val leftVec = Vec3(-viewVector.z, 0.0, viewVector.x).normalize().scale(offset_dist)
val gun_x = x + leftVec.x
val gun_z = z + leftVec.z
val gun_y = y + 2.2
//stfu idea i like my underscores
val missileX = gun_x
val missileY = gun_y
val missileZ = gun_z
val rocket1 = RocketProjectile(level())
val rocket2 = RocketProjectile(level())
val rocket3 = RocketProjectile(level())
rocket1.setPos(missileX, missileY, missileZ)
rocket2.setPos(missileX, missileY, missileZ)
rocket3.setPos(missileX, missileY, missileZ)
rocket1.shootFromRotation(this, this.xRot, this.yHeadRot, 0.0F, 1.2F, 0.4F)
rocket2.shootFromRotation(this, this.xRot-15, this.yHeadRot, 0.0F, 1.2F, 0.4F)
rocket3.shootFromRotation(this, this.xRot-30, this.yHeadRot, 0.0F, 1.2F, 0.4F)
rocket1.owner = this
rocket2.owner = this
rocket3.owner = this
level().addFreshEntity(rocket1)
level().addFreshEntity(rocket2)
level().addFreshEntity(rocket3)
}
//charge attack
class RammingGoal(private val mob: Enforcer) : Goal() {
private var target: LivingEntity? = null
init {
setFlags(EnumSet.of(Flag.MOVE))
}
private var chargeTime = 0
private var chargeDir: Vec3? = null
private var cooldown = 0
private var isCharging = false
override fun canUse(): Boolean {
if (cooldown > 0) {
cooldown--
return false
}
target = mob.target
return target != null
}
override fun canContinueToUse(): Boolean {
return isCharging && chargeTime < maxChargeTime
}
override fun start() {
mob.isCharging = true
mob.playSound(MSoundEvents.ENFORCER_ALERT, 1.0f, 1.0f)
chargeTime = 0
mob.navigation.stop()
cooldown = minCooldown + mob.random.nextInt(maxCooldown - minCooldown)
isCharging = true
mob.chargeState.start(mob.tickCount)
}
override fun tick() {
if (!isCharging) return
chargeTime++
val target = mob.target ?: return
if (chargeTime < windupTime) {
chargeDir = Vec3(target.x - mob.x, 0.0, target.z - mob.z).normalize()
mob.lookControl.setLookAt(target, 30.0f, 30.0f)
return
}
val leftPartic_x = mob.x - mob.lookAngle.x * 2 - 0.8f * mob.lookAngle.z
val rightPartic_x = mob.x - mob.lookAngle.x * 2 + 0.8f * mob.lookAngle.z
val smoke_y = mob.y + 1.6f
val leftPartic_z = mob.z - mob.lookAngle.z * 2 + 0.8f * mob.lookAngle.x
val rightPartic_z = mob.z - mob.lookAngle.z * 2 - 0.8f * mob.lookAngle.x
val level = mob.level() as ServerLevel
level.sendParticles(
ParticleTypes.LARGE_SMOKE,
leftPartic_x, smoke_y, leftPartic_z,
2,
0.0, 0.07, 0.0,
0.01
)
level.sendParticles(
ParticleTypes.LARGE_SMOKE,
rightPartic_x, smoke_y, rightPartic_z,
2,
0.0, 0.07, 0.0,
0.01
)
if (chargeDir == null || chargeDir!!.length() < 0.1) {
stop()
return
}
if (chargeTime == windupTime) {
mob.playSound(MSoundEvents.ENFORCER_CHARGE, 1.0f, 1.0f)
}
val dir = chargeDir ?: return
mob.yRot = Math.toDegrees(-Mth.atan2(dir.x, dir.z)).toFloat()
mob.yHeadRot = mob.yRot
mob.move(MoverType.SELF, dir.scale(1.8))
if (mob.horizontalCollision) {
level.playSound(
null,
mob.x, mob.y, mob.z,
SoundEvents.GENERIC_EXPLODE,
SoundSource.HOSTILE,
1.0f,
1.0f
)
stop()
return
}
if (mob.boundingBox.intersects(target.boundingBox)) {
val knockbackStrength = 1.5
val knockback = dir.scale(knockbackStrength)
val damageAmount = 14.0f
target.hurt(mob.damageSources().mobAttack(mob), damageAmount)
if (target is Player) {
val player = target as Player
if (player.isBlocking) {
target.disableShield()
if (!player.level().isClientSide) {
mob.playSound(SoundEvents.ZOMBIE_BREAK_WOODEN_DOOR, 1.0f, 1.0f)
}
}
}
target.push(knockback.x, 0.5, knockback.z)
stop()
}
}
override fun stop() {
mob.isCharging = false
mob.deltaMovement = Vec3.ZERO
chargeTime = 0
chargeDir = null
isCharging = false
mob.chargeState.stop()
}
companion object {
private const val minCooldown = 50
private const val maxCooldown = 60
private const val windupTime = 20
private const val maxChargeTime = 40
}
}
class StayNearGoal(private val mob: Enforcer) : Goal() {
private var target: LivingEntity? = null
private var moveCD = 0
override fun canUse(): Boolean {
return mob.target != null && !mob.isCharging
}
override fun start() {
target = mob.target
moveCD = 0
}
override fun tick() {
var target = target
if (target != null)
mob.lookControl.setLookAt(target, 30.0f, 30.0f)
target = mob.target ?: return
if (--moveCD > 0)
return
moveCD = mob.random.nextInt(10, 20)
val targetX = target.x
val targetZ = target.z
val angle = mob.random.nextDouble() * Math.PI * 2
val distance = 8.0 + mob.random.nextDouble() * 3.0
val offsetX = cos(angle) * distance
val offsetZ = sin(angle) * distance
mob.navigation.moveTo(targetX + offsetX, target.y + 2.0, targetZ + offsetZ, 1.5)
}
}
class EnforcerArsenalGoal(private val mob: Enforcer) : Goal() {
private var cooldown = 0
private var rocketcooldown = 0
private val tickList = TickList()
init {
setFlags(EnumSet.of(Flag.LOOK))
}
override fun canUse(): Boolean {
return mob.target != null && !mob.isCharging
}
override fun tick() {
val target = mob.target ?: return
mob.lookControl.setLookAt(target, 30.0f, 30.0f)
if (--cooldown <= 0) {
cooldown = Mth.nextInt(mob.random, MIN_COOLDOWN, MAX_COOLDOWN) + CYCLE_LENGTH
for (ticks in SHOOT_AT)
tickList.timer(ticks) {
mob.shootFireball(0.5f)
//could have a better firing sound
mob.playSound(SoundEvents.BLAZE_SHOOT, 1.0f, Mth.nextFloat(mob.random, 0.9f, 1.1f))
}
}
if (--rocketcooldown <= 0) {
rocketcooldown = ROCKET_COOLDOWN + Mth.nextInt(mob.random, MIN_COOLDOWN, MAX_COOLDOWN)
mob.shootMissile(0.5f)
mob.playSound(SoundEvents.WITHER_SHOOT, 1.0f, Mth.nextFloat(mob.random, 0.9f, 1.1f))
}
tickList.tick()
}
override fun stop() {
super.stop()
cooldown = 0
tickList.clear()
}
companion object {
private val SHOOT_AT = intArrayOf(5, 7, 9)
private const val MIN_COOLDOWN = 5
private const val MAX_COOLDOWN = 15
private const val ROCKET_COOLDOWN = 20
private const val CYCLE_LENGTH = 20
}
}
}

View File

@ -1,10 +1,12 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.core.particles.ParticleTypes
import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.EntityDataSerializers
import net.minecraft.network.syncher.SynchedEntityData
import net.minecraft.resources.ResourceKey
import net.minecraft.core.registries.Registries
import net.minecraft.server.level.ServerLevel
import ru.dbotthepony.mc.otm.util.ResourceLocation
import net.minecraft.world.level.storage.loot.LootTable
import net.minecraft.sounds.SoundEvent
@ -57,6 +59,7 @@ class Loader(type: EntityType<Loader>, level: Level) : Monster(type, level) {
super.defineSynchedData(builder)
builder.define(DATA_ATTACKING, false)
}
var isAttacking: Boolean
get() = this.entityData.get(DATA_ATTACKING)
set(value) {
@ -122,6 +125,22 @@ class Loader(type: EntityType<Loader>, level: Level) : Monster(type, level) {
)
}
override fun customServerAiStep() {
super.customServerAiStep()
val level = level() as ServerLevel
if (health <= 30.0 && random.nextFloat() < 0.2f) {
level.sendParticles(
ParticleTypes.CAMPFIRE_COSY_SMOKE,
x, y+2, z,
1,
0.0, 0.0, 0.0,
0.01
)
}
}
override fun aiStep() {
super.aiStep()
@ -132,6 +151,7 @@ class Loader(type: EntityType<Loader>, level: Level) : Monster(type, level) {
}
}
}
override fun getAmbientSound(): SoundEvent {
return MSoundEvents.LOADER_AMBIENT
}

View File

@ -0,0 +1,59 @@
package ru.dbotthepony.mc.otm.entity
import net.minecraft.core.particles.ParticleTypes
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.projectile.AbstractArrow
import net.minecraft.world.item.ItemStack
import net.minecraft.world.level.Level
import net.minecraft.world.phys.BlockHitResult
import net.minecraft.world.phys.EntityHitResult
import ru.dbotthepony.mc.otm.registry.game.MEntityTypes
class RocketProjectile(level: Level) : AbstractArrow(MEntityTypes.ROCKET, level) {
var owner: LivingEntity? = null
init {
setBaseDamage(5.0)
setCritArrow(false)
pickup = Pickup.DISALLOWED
}
override fun tick() {
if (!inGround) deltaMovement = deltaMovement.add(0.0, -0.05, 0.0)
super.tick()
if (level().isClientSide) {
level().addParticle(ParticleTypes.CAMPFIRE_COSY_SMOKE, xOld, yOld, zOld, 0.0, 0.0, 0.0)
}
}
override fun onHitEntity(result: EntityHitResult) {
if (!level().isClientSide) {
level().explode(owner, x, y, z, 2.0f, Level.ExplosionInteraction.NONE)
discard()
}
super.onHitEntity(result)
}
override fun onHitBlock(result: BlockHitResult) {
if (!level().isClientSide) {
level().explode(owner, x, y, z, 2.0f, Level.ExplosionInteraction.NONE)
discard()
}
super.onHitBlock(result)
}
//asdasdadad
override fun playSound(sound: SoundEvent, volume: Float, pitch: Float) {
if (sound != SoundEvents.ARROW_HIT) {
super.playSound(sound, volume, pitch)
}
}
override fun getDefaultPickupItem(): ItemStack {
return ItemStack.EMPTY
}
}

View File

@ -1,5 +1,6 @@
package ru.dbotthepony.mc.otm.item.weapon
import net.minecraft.ChatFormatting
import net.minecraft.core.BlockPos
import net.minecraft.tags.BlockTags
import net.minecraft.world.entity.EquipmentSlotGroup
@ -48,14 +49,14 @@ class FallingSunItem : MatteryItem(Properties().stacksTo(1).rarity(Rarity.EPIC))
var builder = ItemAttributeModifiers.builder()
builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 13.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
builder.add(Attributes.SWEEPING_DAMAGE_RATIO, AttributeModifier(ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_sword_sweeping_edge"), 1.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
chargedAttributes = builder.build()
builder = ItemAttributeModifiers.builder()
builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 5.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
dischargedAttributes = builder.build()
}
@ -129,6 +130,7 @@ class FallingSunItem : MatteryItem(Properties().stacksTo(1).rarity(Rarity.EPIC))
addSimpleDescription("2")
addSimpleDescription("3")
addSimpleDescription("4")
addSimpleDescription("5",ChatFormatting.ITALIC)
}
override fun mineBlock(

View File

@ -33,7 +33,9 @@ object MNames {
const val MATTER_OUTPUT_HATCH = "matter_output_hatch"
const val PAINTER = "painter"
const val MATTER_ENTANGLER = "matter_entangler"
const val TRITANIUM_HULL = "tritanium_hull"
const val WOODEN_CRATE_DECORATIVE = "wooden_crate_decorative"
const val WOODEN_CRATE = "wooden_crate"
// blocks
const val ANDROID_STATION = "android_station"
@ -68,6 +70,7 @@ object MNames {
const val FLYWHEEL_SHAFT = "flywheel_shaft"
const val FLYWHEEL_HOUSING = "flywheel_housing"
const val TRITANIUM_HULL = "tritanium_hull"
const val GENERATOR_BLOCK = "generator_block"
const val MODULAR_FRAME = "modular_frame"
const val HEAVY_MODULAR_FRAME = "heavy_modular_frame"
@ -110,6 +113,7 @@ object MNames {
const val METAL_MESH = "metal_mesh"
const val METAL_JUNK = "metal_junk"
const val CARBON_FIBRE_BLOCK = "carbon_fibre_block"
const val TIRE_BLOCK = "tire_block"
const val FLOOR_TILES = "floor_tiles"
const val FLOOR_TILES_STAIRS = "floor_tiles_stairs"
@ -121,6 +125,21 @@ object MNames {
const val TRITANIUM_BARS = "tritanium_bars"
const val METAL_RAILING = "metal_railing"
const val INDUSTRIAL_LADDER = "industrial_ladder"
//ROFL
const val ROFLITE_FRAME = "roflite_frame"
const val ROFLITE_PLATING = "roflite_plating"
const val ROFLITE_PLATING_STAIRS = "roflite_plating_stairs"
const val ROFLITE_PLATING_SLAB = "roflite_plating_slab"
const val ROFLITE_ASSEMBLY = "roflite_assembly"
const val CHISELED_ROFLITE = "chiseled_roflite"
const val CUT_ROFLITE = "cut_roflite"
const val CUT_ROFLITE_STAIRS = "cut_roflite_stairs"
const val CUT_ROFLITE_SLAB = "cut_roflite_slab"
const val ROFLITE_PILLAR = "roflite_pillar"
// items
const val GRAVITATIONAL_DISRUPTOR = "gravitational_disruptor"
const val MATTER_DUST = "matter_dust"
@ -207,6 +226,10 @@ object MNames {
const val BREAD_MONSTER_SPAWN_EGG = "bead_monster_spawn_egg"
const val LOADER_SPAWN_EGG = "loader_spawn_egg"
const val CLEANER_DRONE_KIT = "cleaner_drone_kit"
const val ANDROID_MELEE_SPAWN_EGG = "android_melee_spawn_egg"
// items: crafting components
const val TRITANIUM_DUST = "tritanium_dust"
const val TRITANIUM_NUGGET = "tritanium_nugget"
@ -221,6 +244,8 @@ object MNames {
const val MATTER_IO_PORT = "matter_io_port"
const val ROGUE_AI_CORE = "rogue_ai_core"
const val CARBON_MESH = "carbon_mesh"
const val ARMOR_ASSEMBLY = "armor_assembly"
const val REINFORCED_TRITANIUM_PLATE = "reinforced_tritanium_plate"
@ -326,13 +351,19 @@ object MNames {
// entities
const val PLASMA = "plasma_projectile"
const val ROCKET = "rocket_projectile"
const val RIDEABLE_DUMMY = "rideable_dummy"
const val BREAD_MONSTER = "bread_monster"
const val LOADER = "loader"
const val CLEANER = "cleaner"
const val DRONE = "drone"
const val ANDROID_MELEE = "android_melee"
const val ANDROID_RANGED = "android_melee"
const val ANDROID_OVERSEER = "android_melee"
const val ANDROID_RANGED = "android_ranged"
const val ANDROID_OVERSEER = "android_overseer"
const val ENFORCER = "enforcer"
const val PHANTOM_ATTRACTOR = "phantom_attractor"
const val JUMP_BOOST = "jump_boost"

View File

@ -44,6 +44,8 @@ import ru.dbotthepony.mc.otm.isClient
import ru.dbotthepony.mc.otm.item.armor.TritaniumArmorItem
import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem
import ru.dbotthepony.mc.otm.item.weapon.FallingSunItem
import ru.dbotthepony.mc.otm.registry.game.MBlocks.CUT_ROFLITE
import ru.dbotthepony.mc.otm.registry.game.MBlocks.ROFLITE_PLATING
import ru.dbotthepony.mc.otm.registry.game.MDataComponentTypes
import ru.dbotthepony.mc.otm.registry.game.MItems
import ru.dbotthepony.mc.otm.registry.game.MStats

View File

@ -122,6 +122,7 @@ object MBlockEntities {
val BREAKABLE: BlockEntityType<BreakableContainerBlockEntity> by registry.register("breakable") {
val blocks = ArrayList<Block>()
blocks.add(MBlocks.SMALL_CAPSULE)
blocks.add(MBlocks.WOODEN_CRATE)
BlockEntityType.Builder.of(::BreakableContainerBlockEntity, *blocks.toTypedArray()).build(null)
}

View File

@ -10,6 +10,7 @@ import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.DropExperienceBlock
import net.minecraft.world.level.block.IronBarsBlock
import net.minecraft.world.level.block.LadderBlock
import net.minecraft.world.level.block.LiquidBlock
import net.minecraft.world.level.block.RedstoneLampBlock
import net.minecraft.world.level.block.RotatedPillarBlock
@ -97,6 +98,7 @@ import ru.dbotthepony.mc.otm.util.get
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
import ru.dbotthepony.mc.otm.registry.MNames
import ru.dbotthepony.mc.otm.registry.MRegistry
import ru.dbotthepony.mc.otm.registry.objects.DecorativeBlock
import java.util.Collections
import java.util.LinkedHashMap
import java.util.function.Supplier
@ -259,6 +261,54 @@ object MBlocks {
val ROFLITE_ALLOY_BLOCK: Block by registry.register(MNames.ROFLITE_ALLOY_BLOCK) {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val ROFLITE_FRAME: Block by registry.register(MNames.ROFLITE_FRAME) {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(1200f).destroyTime(50f).requiresCorrectToolForDrops())
}
val ROFLITE_PLATING: Block by registry.register(MNames.ROFLITE_PLATING) {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val ROFLITE_PLATING_STAIRS: StairBlock by registry.register(MNames.ROFLITE_PLATING_STAIRS) {
StairBlock(
ROFLITE_PLATING.defaultBlockState(),
BlockBehaviour.Properties.ofLegacyCopy(ROFLITE_PLATING)
)
}
val ROFLITE_PLATING_SLAB: SlabBlock by registry.register(MNames.ROFLITE_PLATING_SLAB) {
SlabBlock(BlockBehaviour.Properties.ofLegacyCopy(ROFLITE_PLATING))
}
val ROFLITE_PILLAR: Block by registry.register(MNames.ROFLITE_PILLAR) { RotatedPillarBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val CUT_ROFLITE: Block by registry.register(MNames.CUT_ROFLITE) {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val CUT_ROFLITE_STAIRS: StairBlock by registry.register(MNames.CUT_ROFLITE_STAIRS) {
StairBlock(
CUT_ROFLITE.defaultBlockState(),
BlockBehaviour.Properties.ofLegacyCopy(CUT_ROFLITE)
)
}
val CUT_ROFLITE_SLAB: SlabBlock by registry.register(MNames.CUT_ROFLITE_SLAB) {
SlabBlock(BlockBehaviour.Properties.ofLegacyCopy(CUT_ROFLITE))
}
val CHISELED_ROFLITE: Block by registry.register(MNames.CHISELED_ROFLITE) {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.NETHERITE_BLOCK).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val ROFLITE_ASSEMBLY: Block by registry.register(MNames.ROFLITE_ASSEMBLY) {
WaterloggedTransparentBlock(BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_BROWN)
.noOcclusion()
.sound(SoundType.COPPER_GRATE)
.explosionResistance(100f)
.destroyTime(2f).requiresCorrectToolForDrops())
}
val METAL_JUNK: MatteryBlock by registry.register(MNames.METAL_JUNK) {
MatteryBlock(BlockBehaviour.Properties.of().sound(SoundType.NETHERITE_BLOCK).mapColor(MapColor.COLOR_GRAY).explosionResistance(45f).destroyTime(3f).requiresCorrectToolForDrops())
@ -294,6 +344,17 @@ object MBlocks {
.requiresCorrectToolForDrops())
}
val INDUSTRIAL_LADDER: LadderBlock by registry.register(MNames.INDUSTRIAL_LADDER){
LadderBlock(BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_GRAY)
.sound(SoundType.COPPER_GRATE)
.explosionResistance(30f)
.noOcclusion()
.destroyTime(2f)
.requiresCorrectToolForDrops()
)
}
val DEEPSLATE_TRITANIUM_ORE: Block by registry.register(MNames.DEEPSLATE_TRITANIUM_ORE) { DropExperienceBlock(
UniformInt.of(0, 3),
BlockBehaviour.Properties.of()
@ -431,6 +492,15 @@ object MBlocks {
.destroyTime(1.5f)
) }
val TIRE_BLOCK: Block by registry.register(MNames.TIRE_BLOCK) { RotatedPillarBlock(
BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_GRAY)
.sound(SoundType.BASALT)
.requiresCorrectToolForDrops()
.explosionResistance(40f)
.destroyTime(1.5f)
) }
val MULTIBLOCK_TEST by registry.register("multiblock_test") { MultiblockTestBlock() }
val SMALL_CAPSULE by registry.register(MNames.SMALL_CAPSULE) {
@ -442,6 +512,26 @@ object MBlocks {
)
}
val WOODEN_CRATE by registry.register(MNames.WOODEN_CRATE) {
BreakableContainerBlock(
BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_BROWN)
.sound(SoundType.WOOD)
.destroyTime(0.5f)
.explosionResistance(1f)
)
}
val WOODEN_CRATE_DECORATIVE: Block by registry.register(MNames.WOODEN_CRATE_DECORATIVE) {
Block(
BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_BROWN)
.sound(SoundType.WOOD)
.destroyTime(1f)
.explosionResistance(1f)
)
}
init {
MRegistry.registerBlocks(registry)
}

View File

@ -253,6 +253,7 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) {
accept(MItems.WITHERED_STEEL_SWORD)
energized(MItems.ENERGY_SWORD)
energized(MItems.FALLING_SUN)
accept(MItems.REDSTONE_INTERACTOR)
accept(MItems.EXPLOSIVE_HAMMER)
@ -328,16 +329,20 @@ private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
accept(MItems.METAL_BEAM_CENTER)
accept(MItems.ENGINE)
accept(MItems.CARBON_FIBRE_BLOCK)
accept(MItems.METAL_JUNK)
accept(MItems.METAL_MESH)
accept(MItems.TIRE_BLOCK)
accept(MItems.TRITANIUM_BARS)
accept(MItems.METAL_RAILING)
accept(MItems.INDUSTRIAL_LADDER)
accept(MItems.TRITANIUM_STRIPED_BLOCK.values)
accept(MItems.TRITANIUM_STRIPED_STAIRS.values)
accept(MItems.TRITANIUM_STRIPED_SLAB.values)
accept(MItems.TRITANIUM_STRIPED_WALL.values)
accept(MItems.CARBON_FIBRE_BLOCK)
accept(MItems.METAL_JUNK)
accept(MItems.METAL_MESH)
accept(MItems.TRITANIUM_BARS)
accept(MItems.METAL_RAILING)
colored(MItems.TRITANIUM_DOOR)
colored(MItems.TRITANIUM_TRAPDOOR)
@ -375,6 +380,21 @@ private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
accept(MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems)
accept(MRegistry.TRITANIUM_STRIPED_SLAB.flatItems)
accept(MRegistry.TRITANIUM_STRIPED_WALL.flatItems)
//preferably put all roflite blocks into a "roflite" block category, idk how to do it here atm
accept(MItems.ROFLITE_FRAME)
accept(MItems.ROFLITE_PLATING)
accept(MItems.ROFLITE_PLATING_STAIRS)
accept(MItems.ROFLITE_PLATING_SLAB)
accept(MItems.CUT_ROFLITE)
accept(MItems.CUT_ROFLITE_STAIRS)
accept(MItems.CUT_ROFLITE_SLAB)
accept(MItems.CHISELED_ROFLITE)
accept(MItems.ROFLITE_PILLAR)
accept(MItems.ROFLITE_ASSEMBLY)
}
}

View File

@ -13,10 +13,8 @@ import net.minecraft.world.item.DyeColor
import net.neoforged.bus.api.IEventBus
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent
import net.neoforged.neoforge.event.entity.EntityAttributeCreationEvent
import ru.dbotthepony.mc.otm.client.render.entity.BreadMonsterRenderer
import ru.dbotthepony.mc.otm.client.render.entity.LoaderRenderer
import ru.dbotthepony.mc.otm.client.render.entity.PlasmaProjectileRenderer
import ru.dbotthepony.mc.otm.client.render.entity.RogueAndroidRenderer
import ru.dbotthepony.mc.otm.client.render.entity.*
import ru.dbotthepony.mc.otm.client.renderer.entity.RocketRenderer
import ru.dbotthepony.mc.otm.entity.*
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
import ru.dbotthepony.mc.otm.registry.MNames
@ -28,6 +26,11 @@ object MEntityTypes {
EntityType.Builder.of({ _, level -> PlasmaProjectile(level) }, MobCategory.MISC).sized(0.4f, 0.4f).build(MNames.PLASMA)
}
val ROCKET: EntityType<RocketProjectile> by registry.register(MNames.ROCKET) {
EntityType.Builder.of({ _, level -> RocketProjectile(level) }, MobCategory.MISC).sized(0.4f, 0.4f).build(MNames.ROCKET)
}
val CARGO_CRATE_MINECARTS: Map<DyeColor?, EntityType<MinecartCargoCrate>> = registry.coloredWithBase(MNames.MINECART_CARGO_CRATE) { color ->
EntityType.Builder.of({ it, level -> MinecartCargoCrate(it, color, level)}, MobCategory.MISC).sized(0.98F, 0.7F).clientTrackingRange(8).build("dfu doesn't works ✅")
}
@ -49,6 +52,24 @@ object MEntityTypes {
.build(MNames.BREAD_MONSTER)
}
val CLEANER: EntityType<Cleaner> by registry.register(MNames.CLEANER) {
EntityType.Builder.of(::Cleaner, MobCategory.AMBIENT)
.sized(0.9f, 0.225f)
.eyeHeight(0.1875f)
.passengerAttachments(0.225f)
.clientTrackingRange(8)
.build(MNames.CLEANER)
}
val DRONE: EntityType<Drone> by registry.register(MNames.DRONE) {
EntityType.Builder.of(::Drone, MobCategory.MONSTER)
.sized(0.8f, 0.8f)
.eyeHeight(0.3f)
.passengerAttachments(0.8f)
.clientTrackingRange(8)
.build(MNames.DRONE)
}
val LOADER: EntityType<Loader> by registry.register(MNames.LOADER) {
EntityType.Builder.of(::Loader, MobCategory.MONSTER)
.sized(1.2f, 2.5f)
@ -60,13 +81,22 @@ object MEntityTypes {
val ANDROID_MELEE: EntityType<AndroidMelee> by registry.register(MNames.ANDROID_MELEE) {
EntityType.Builder.of(::AndroidMelee, MobCategory.MONSTER)
.sized(1.2f, 2.5f)
.eyeHeight(2.0f)
.passengerAttachments(2.5f)
.sized(0.66f, 1.98f)
.eyeHeight(1.78f)
.passengerAttachments(1.98f)
.clientTrackingRange(12)
.build(MNames.ANDROID_MELEE)
}
val ENFORCER: EntityType<Enforcer> by registry.register(MNames.ENFORCER) {
EntityType.Builder.of(::Enforcer, MobCategory.MONSTER)
.sized(2.4f, 3f)
.eyeHeight(2.0f)
.passengerAttachments(3f)
.clientTrackingRange(12)
.fireImmune()
.build(MNames.ENFORCER)
}
internal fun register(bus: IEventBus) {
registry.register(bus)
@ -77,13 +107,20 @@ object MEntityTypes {
private fun registerAttributes(event: EntityAttributeCreationEvent) {
event.put(BREAD_MONSTER, BreadMonster.createAttributes().build())
event.put(LOADER, Loader.createAttributes().build())
event.put(ANDROID_MELEE, AndroidMelee.createAttributes().build())
event.put(ENFORCER, Enforcer.createAttributes().build())
event.put(CLEANER, Cleaner.createAttributes().build())
event.put(DRONE, Drone.createAttributes().build())
}
@Suppress("unchecked_cast")
private fun registerClient(event: FMLClientSetupEvent) {
event.enqueueWork {
EntityRenderers.register(PLASMA) { PlasmaProjectileRenderer(it) as EntityRenderer<Entity> }
EntityRenderers.register(ROCKET) { RocketRenderer(it) as EntityRenderer<Entity> }
for (type in CARGO_CRATE_MINECARTS.values) {
EntityRenderers.register(type) { MinecartRenderer<MinecartCargoCrate>(it, ModelLayers.CHEST_MINECART) as EntityRenderer<Entity> }
@ -93,6 +130,11 @@ object MEntityTypes {
EntityRenderers.register(BREAD_MONSTER, ::BreadMonsterRenderer)
EntityRenderers.register(LOADER, ::LoaderRenderer)
EntityRenderers.register(CLEANER, ::CleanerRenderer)
EntityRenderers.register(DRONE, ::DroneRenderer)
EntityRenderers.register(ENFORCER, ::EnforcerRenderer)
EntityRenderers.register(ANDROID_MELEE) { context ->
RogueAndroidRenderer(context, ANDROID_MELEE, "melee",context.modelManager)
}

View File

@ -516,6 +516,7 @@ object MItems {
val METAL_BEAM_CENTER: Item by registry.register(MNames.METAL_BEAM_CENTER) { BlockItem(MBlocks.METAL_BEAM_CENTER, DEFAULT_PROPERTIES) }
val ENGINE: Item by registry.register(MNames.ENGINE) { BlockItem(MBlocks.ENGINE, DEFAULT_PROPERTIES) }
val HOLO_SIGN: Item by registry.register(MNames.HOLO_SIGN) { BlockItem(MBlocks.HOLO_SIGN, DEFAULT_PROPERTIES) }
val INDUSTRIAL_LADDER: Item by registry.register(MNames.INDUSTRIAL_LADDER) { BlockItem(MBlocks.INDUSTRIAL_LADDER, DEFAULT_PROPERTIES) }
val TRITANIUM_DOOR = register(MNames.TRITANIUM_DOOR, MBlocks.TRITANIUM_DOOR)
val TRITANIUM_TRAPDOOR = register(MNames.TRITANIUM_TRAPDOOR, MBlocks.TRITANIUM_TRAPDOOR)
@ -551,6 +552,9 @@ object MItems {
val REINFORCED_IRON_PLATE: Item by registry.register(MNames.REINFORCED_IRON_PLATE) { MatteryItem(
DEFAULT_PROPERTIES
).addSimpleDescription() }
val ROGUE_AI_CORE: Item by registry.register(MNames.ROGUE_AI_CORE) { MatteryItem(
DEFAULT_PROPERTIES
).addSimpleDescription() }
val QUANTUM_TRANSCEIVER: Item by registry.register(MNames.QUANTUM_TRANSCEIVER) { Item(DEFAULT_PROPERTIES) }
val ELECTROMAGNET: Item by registry.register(MNames.ELECTROMAGNET) { Item(DEFAULT_PROPERTIES) }
@ -589,6 +593,8 @@ object MItems {
MItems::MIRROR,
MItems::DISPLAY_SCREEN,
MItems::ROGUE_AI_CORE,
MItems::CARBON_MESH,
MItems::ARMOR_ASSEMBLY,
MItems::REINFORCED_TRITANIUM_PLATE,
@ -625,6 +631,7 @@ object MItems {
MItems::MIRROR,
MItems::DISPLAY_SCREEN,
MItems::ROGUE_AI_CORE,
MItems::CARBON_MESH,
MItems::ARMOR_ASSEMBLY,
MItems::REINFORCED_TRITANIUM_PLATE,
@ -669,12 +676,29 @@ object MItems {
val CARBON_FIBRE_BLOCK: Item by registry.register(MNames.CARBON_FIBRE_BLOCK) { BlockItem(MBlocks.CARBON_FIBRE_BLOCK, DEFAULT_PROPERTIES) }
val METAL_JUNK: Item by registry.register(MNames.METAL_JUNK) { BlockItem(MBlocks.METAL_JUNK, DEFAULT_PROPERTIES) }
val METAL_MESH: Item by registry.register(MNames.METAL_MESH) { BlockItem(MBlocks.METAL_MESH, DEFAULT_PROPERTIES) }
val TIRE_BLOCK: Item by registry.register(MNames.TIRE_BLOCK) { BlockItem(MBlocks.TIRE_BLOCK, DEFAULT_PROPERTIES) }
val ROFLITE_FRAME: Item by registry.register(MNames.ROFLITE_FRAME) { BlockItem(MBlocks.ROFLITE_FRAME, DEFAULT_PROPERTIES) }
val ROFLITE_PLATING: Item by registry.register(MNames.ROFLITE_PLATING) { BlockItem(MBlocks.ROFLITE_PLATING, DEFAULT_PROPERTIES) }
val ROFLITE_PLATING_STAIRS: Item by registry.register(MNames.ROFLITE_PLATING_STAIRS) { BlockItem(MBlocks.ROFLITE_PLATING_STAIRS, DEFAULT_PROPERTIES) }
val ROFLITE_PLATING_SLAB: Item by registry.register(MNames.ROFLITE_PLATING_SLAB) { BlockItem(MBlocks.ROFLITE_PLATING_SLAB, DEFAULT_PROPERTIES) }
val CUT_ROFLITE: Item by registry.register(MNames.CUT_ROFLITE) { BlockItem(MBlocks.CUT_ROFLITE, DEFAULT_PROPERTIES) }
val CUT_ROFLITE_STAIRS: Item by registry.register(MNames.CUT_ROFLITE_STAIRS) { BlockItem(MBlocks.CUT_ROFLITE_STAIRS, DEFAULT_PROPERTIES) }
val CUT_ROFLITE_SLAB: Item by registry.register(MNames.CUT_ROFLITE_SLAB) { BlockItem(MBlocks.CUT_ROFLITE_SLAB, DEFAULT_PROPERTIES) }
val CHISELED_ROFLITE: Item by registry.register(MNames.CHISELED_ROFLITE) { BlockItem(MBlocks.CHISELED_ROFLITE, DEFAULT_PROPERTIES) }
val ROFLITE_ASSEMBLY: Item by registry.register(MNames.ROFLITE_ASSEMBLY) { BlockItem(MBlocks.ROFLITE_ASSEMBLY, DEFAULT_PROPERTIES) }
val ROFLITE_PILLAR: Item by registry.register(MNames.ROFLITE_PILLAR) { BlockItem(MBlocks.ROFLITE_PILLAR, DEFAULT_PROPERTIES) }
val CHEST_UPGRADER: Item by registry.register(MNames.CHEST_UPGRADER) { ChestUpgraderItem() }
val BREAD_MONSTER_SPAWN_EGG: Item by registry.register(MNames.BREAD_MONSTER_SPAWN_EGG){ SpawnEggItem(MEntityTypes.BREAD_MONSTER, 0xFFFFFF, 0xFFFFFF, Item.Properties())}
val LOADER_SPAWN_EGG: Item by registry.register(MNames.LOADER_SPAWN_EGG){ SpawnEggItem(MEntityTypes.LOADER, 0xFFFFFF, 0xFFFFFF, Item.Properties())}
val CLEANER_DRONE_KIT: Item by registry.register(MNames.CLEANER_DRONE_KIT){ SpawnEggItem(MEntityTypes.CLEANER, 0xFFFFFF, 0xFFFFFF, Item.Properties())}
val ANDROID_MELEE_SPAWN_EGG: Item by registry.register(MNames.ANDROID_MELEE_SPAWN_EGG){ SpawnEggItem(MEntityTypes.ANDROID_MELEE, 0xFFFFFF, 0xFFFFFF, Item.Properties())}
val ROFLITE_ALLOY_INGOT: Item by registry.register(MNames.ROFLITE_ALLOY_INGOT) { Item(DEFAULT_PROPERTIES) }
val ROFLITE_ALLOY_BLOCK: BlockItem by registry.register(MNames.ROFLITE_ALLOY_BLOCK) { BlockItem(MBlocks.ROFLITE_ALLOY_BLOCK, DEFAULT_PROPERTIES) }
@ -682,6 +706,9 @@ object MItems {
val SMALL_CAPSULE by registry.register(MNames.SMALL_CAPSULE) { BlockItem(MBlocks.SMALL_CAPSULE, DEFAULT_PROPERTIES) }
val WOODEN_CRATE by registry.register(MNames.WOODEN_CRATE) { BlockItem(MBlocks.WOODEN_CRATE, DEFAULT_PROPERTIES) }
val WOODEN_CRATE_DECORATIVE by registry.register(MNames.WOODEN_CRATE_DECORATIVE) { BlockItem(MBlocks.WOODEN_CRATE_DECORATIVE, DEFAULT_PROPERTIES) }
init {
MRegistry.registerItems(registry)
}

View File

@ -27,6 +27,10 @@ object MSoundEvents {
val LOADER_AMBIENT by make("loader_ambient")
val ENFORCER_ALERT by make("enforcer_alert")
val ENFORCER_CHARGE by make("enforcer_charge")
val ENFORCER_BEEP by make("enforcer_beep")
internal fun register(bus: IEventBus) {
registry.register(bus)
}

View File

@ -1,75 +0,0 @@
// Made with Blockbench 4.12.3
// Exported for Minecraft version 1.17 or later with Mojang mappings
// Paste this class into your mod and generate all required imports
public class loader<T extends Entity> extends EntityModel<T> {
// This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", "loader"), "main");
private final ModelPart root;
private final ModelPart Head;
private final ModelPart Body;
private final ModelPart LeftLeg;
private final ModelPart RightLeg;
private final ModelPart LeftArm;
private final ModelPart ElbowL;
private final ModelPart RightArm;
private final ModelPart ElbowR;
public loader(ModelPart root) {
this.root = root.getChild("root");
this.Head = this.root.getChild("Head");
this.Body = this.root.getChild("Body");
this.LeftLeg = this.root.getChild("LeftLeg");
this.RightLeg = this.root.getChild("RightLeg");
this.LeftArm = this.root.getChild("LeftArm");
this.ElbowL = this.LeftArm.getChild("ElbowL");
this.RightArm = this.root.getChild("RightArm");
this.ElbowR = this.RightArm.getChild("ElbowR");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 24.0F, 0.0F));
PartDefinition Head = root.addOrReplaceChild("Head", CubeListBuilder.create().texOffs(48, 23).addBox(-3.0F, -1.0F, -2.0F, 6.0F, 3.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(-4.0F, -32.0F, -5.0F));
PartDefinition Body = root.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(0, 0).addBox(-10.0F, -16.0F, -5.0F, 20.0F, 10.0F, 13.0F, new CubeDeformation(0.0F))
.texOffs(0, 50).addBox(-3.0F, -3.0F, -4.0F, 6.0F, 5.0F, 8.0F, new CubeDeformation(0.0F))
.texOffs(112, 52).addBox(10.0F, -13.0F, 0.0F, 2.0F, 6.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(96, 52).addBox(-12.0F, -13.0F, -1.0F, 2.0F, 6.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(53, 0).addBox(-5.0F, -1.0F, 4.0F, 10.0F, 4.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -26.0F, -1.0F));
PartDefinition antenna_r1 = Body.addOrReplaceChild("antenna_r1", CubeListBuilder.create().texOffs(76, 6).addBox(0.0F, -7.0F, -1.0F, 0.0F, 14.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(8.0F, -22.0F, 8.0F, -0.2618F, 0.0F, 0.0F));
PartDefinition waist_r1 = Body.addOrReplaceChild("waist_r1", CubeListBuilder.create().texOffs(28, 50).addBox(-2.0F, -5.0F, -4.0F, 4.0F, 7.0F, 7.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, -3.0F, 2.0F, -0.2618F, 0.0F, 0.0F));
PartDefinition LeftLeg = root.addOrReplaceChild("LeftLeg", CubeListBuilder.create().texOffs(106, 24).addBox(0.0F, 10.0F, -2.0F, 4.0F, 16.0F, 7.0F, new CubeDeformation(0.0F))
.texOffs(66, 46).addBox(-1.0F, -2.0F, -3.0F, 6.0F, 12.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(4.0F, -26.0F, -1.0F));
PartDefinition RightLeg = root.addOrReplaceChild("RightLeg", CubeListBuilder.create().texOffs(84, 24).addBox(-4.0F, 10.0F, -2.0F, 4.0F, 16.0F, 7.0F, new CubeDeformation(0.0F))
.texOffs(48, 34).addBox(-5.0F, -2.0F, -3.0F, 6.0F, 12.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(-4.0F, -26.0F, -1.0F));
PartDefinition LeftArm = root.addOrReplaceChild("LeftArm", CubeListBuilder.create().texOffs(104, 0).addBox(-1.0F, -7.0F, -4.0F, 4.0F, 16.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offset(13.0F, -36.0F, 2.0F));
PartDefinition ElbowL = LeftArm.addOrReplaceChild("ElbowL", CubeListBuilder.create().texOffs(24, 23).addBox(-2.0F, -0.2F, -2.0F, 4.0F, 19.0F, 8.0F, new CubeDeformation(-0.1F)), PartPose.offset(1.0F, 9.0F, -1.0F));
PartDefinition RightArm = root.addOrReplaceChild("RightArm", CubeListBuilder.create().texOffs(80, 0).addBox(-3.0F, -7.0F, -4.0F, 4.0F, 16.0F, 8.0F, new CubeDeformation(0.0F)), PartPose.offset(-13.0F, -36.0F, 1.0F));
PartDefinition ElbowR = RightArm.addOrReplaceChild("ElbowR", CubeListBuilder.create().texOffs(0, 23).addBox(-2.0F, -0.2F, -2.0F, 4.0F, 19.0F, 8.0F, new CubeDeformation(-0.1F)), PartPose.offset(-1.0F, 9.0F, -1.0F));
return LayerDefinition.create(meshdefinition, 128, 64);
}
@Override
public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
}
@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
root.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}
}

View File

@ -23,9 +23,9 @@
"from": [8, 3, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [4, 7.25, 6, 10.5], "texture": "#texture"},
"north": {"uv": [4, 4, 6, 7.25], "texture": "#texture"},
"east": {"uv": [8, 7.25, 12, 10.5], "texture": "#texture"},
"south": {"uv": [6, 7.25, 8, 10.5], "texture": "#texture"},
"south": {"uv": [6, 4, 8, 7.25], "texture": "#texture"},
"west": {"uv": [8, 10.5, 12, 13.75], "texture": "#texture"},
"up": {"uv": [4, 13.75, 8, 15.25], "rotation": 90, "texture": "#texture"}
}
@ -42,7 +42,7 @@
"up": {"uv": [0, 0, 0, 0], "texture": "#texture"},
"down": {"uv": [0, 0, 0, 0], "texture": "#texture"}
},
"neoforge_data": { "block_light": 15, "sky_light": 15 }
"neoforge_data": { "block_light": 15, "sky_light": 15 }
},
{
"from": [1, 3, 9],
@ -80,7 +80,7 @@
"up": {"uv": [0, 0, 0, 0], "texture": "#texture"},
"down": {"uv": [0, 0, 0, 0], "texture": "#texture"}
},
"neoforge_data": { "block_light": 15, "sky_light": 15 }
"neoforge_data": { "block_light": 15, "sky_light": 15 }
},
{
"from": [1, 12, 1],

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 497 B

Some files were not shown because too many files have changed in this diff Show More