├── src ├── generated │ └── resources │ │ ├── assets │ │ └── create_radar │ │ │ ├── models │ │ │ ├── item │ │ │ │ ├── id_block.json │ │ │ │ ├── data_link.json │ │ │ │ ├── plane_radar.json │ │ │ │ ├── fire_controller.json │ │ │ │ ├── monitor.json │ │ │ │ ├── network_filterer.json │ │ │ │ ├── radar_bearing.json │ │ │ │ ├── radar_dish_block.json │ │ │ │ ├── track_controller.json │ │ │ │ ├── radar_plate_block.json │ │ │ │ ├── creative_radar_plate.json │ │ │ │ ├── radar_receiver_block.json │ │ │ │ ├── guided_fuze.json │ │ │ │ ├── ident_filter_item.json │ │ │ │ ├── radar_filter_item.json │ │ │ │ ├── target_filter_item.json │ │ │ │ ├── radar_safe_zone_designator.json │ │ │ │ └── radar_guidance_block.json │ │ │ └── block │ │ │ │ ├── off.json │ │ │ │ └── on.json │ │ │ └── blockstates │ │ │ ├── id_block.json │ │ │ ├── radar_bearing.json │ │ │ ├── fire_controller.json │ │ │ ├── plane_radar.json │ │ │ ├── track_controller.json │ │ │ ├── auto_yaw_controller.json │ │ │ ├── auto_pitch_controller.json │ │ │ ├── data_link.json │ │ │ ├── network_filterer.json │ │ │ ├── radar_dish_block.json │ │ │ ├── radar_plate_block.json │ │ │ ├── creative_radar_plate.json │ │ │ └── radar_receiver_block.json │ │ └── data │ │ ├── create_radar │ │ └── loot_tables │ │ │ └── blocks │ │ │ ├── monitor.json │ │ │ ├── data_link.json │ │ │ ├── id_block.json │ │ │ ├── plane_radar.json │ │ │ ├── radar_bearing.json │ │ │ ├── fire_controller.json │ │ │ ├── radar_dish_block.json │ │ │ ├── radar_plate_block.json │ │ │ ├── track_controller.json │ │ │ ├── auto_yaw_controller.json │ │ │ ├── creative_radar_plate.json │ │ │ ├── radar_receiver_block.json │ │ │ └── auto_pitch_controller.json │ │ └── minecraft │ │ └── tags │ │ └── blocks │ │ └── mineable │ │ ├── axe.json │ │ └── pickaxe.json └── main │ ├── resources │ ├── data │ │ ├── forge │ │ │ └── tags │ │ │ │ └── blocks │ │ │ │ └── relocation_not_supported.json │ │ └── create_radar │ │ │ └── recipes │ │ │ ├── mechanical_crafting │ │ │ ├── radar_dish.json │ │ │ └── radar_plate.json │ │ │ └── crafting │ │ │ ├── radar_bearing.json │ │ │ ├── radar_reciever.json │ │ │ ├── auto_pitch_controller.json │ │ │ ├── auto_yaw_controller.json │ │ │ ├── data_link.json │ │ │ └── monitor.json │ ├── pack.mcmeta │ ├── assets │ │ └── create_radar │ │ │ ├── ponder │ │ │ ├── radar_linking.nbt │ │ │ ├── controller_linking.nbt │ │ │ └── radar_contraption.nbt │ │ │ ├── textures │ │ │ ├── block │ │ │ │ ├── siren.png │ │ │ │ ├── handles.png │ │ │ │ ├── monitor.png │ │ │ │ ├── yaw_axis.png │ │ │ │ ├── 3x3monitor.png │ │ │ │ ├── grate_dish.png │ │ │ │ ├── headlight.png │ │ │ │ ├── plane_radar.png │ │ │ │ ├── radar_link.png │ │ │ │ ├── spotlight.png │ │ │ │ ├── bearing_side.png │ │ │ │ ├── headlight_on.png │ │ │ │ ├── id_block_side.png │ │ │ │ ├── radar_bearing.png │ │ │ │ ├── yaw_axis_top.png │ │ │ │ ├── bearing_bottom.png │ │ │ │ ├── fire_controller.png │ │ │ │ ├── network_filterer.png │ │ │ │ ├── radar_receiver.png │ │ │ │ ├── spotlight_light.png │ │ │ │ ├── cannon_controller.png │ │ │ │ ├── fire_controller_on.png │ │ │ │ ├── radar_plate_block.png │ │ │ │ ├── id_block_top_bottom.png │ │ │ │ ├── creative_radar_plate_block.png │ │ │ │ ├── identification_transponder.png │ │ │ │ ├── radar_command_guidance_top.png │ │ │ │ ├── radar_warning_receiver_off.png │ │ │ │ ├── radar_warning_receiver_on.png │ │ │ │ └── radar_command_guidance_side.png │ │ │ ├── gui │ │ │ │ ├── id_block.png │ │ │ │ ├── radar_iff_list.png │ │ │ │ ├── binoculars_scope.png │ │ │ │ ├── detection_filter.png │ │ │ │ ├── targeting_filter.png │ │ │ │ ├── artillery_radio_gui.png │ │ │ │ ├── identification_filter.png │ │ │ │ ├── identification_filter_0.png │ │ │ │ └── identification_filter_1.png │ │ │ ├── item │ │ │ │ ├── guided_fuze.png │ │ │ │ ├── detection_filter_item.png │ │ │ │ ├── identification_filter.png │ │ │ │ ├── targeting_filter_item.png │ │ │ │ └── radar_safe_zone_designator.png │ │ │ └── monitor_sprite │ │ │ │ ├── player.png │ │ │ │ ├── grid_square.png │ │ │ │ ├── projectile.png │ │ │ │ ├── radar_sweep.png │ │ │ │ ├── entity_hitbox.png │ │ │ │ ├── target_hovered.png │ │ │ │ ├── radar_bg_circle.png │ │ │ │ ├── radar_bg_filler.png │ │ │ │ ├── target_selected.png │ │ │ │ └── contraption_hitbox.png │ │ │ └── models │ │ │ └── block │ │ │ ├── fire_controller.json │ │ │ ├── fire_controller_on.json │ │ │ └── data_link │ │ │ ├── glow.json │ │ │ └── tube.json │ ├── create_radar.mixins.json │ └── META-INF │ │ └── mods.toml │ └── java │ └── com │ └── happysg │ └── radar │ ├── registry │ ├── ModAdvancements.java │ ├── ModShapes.java │ ├── ModPartials.java │ ├── ModDisplayBehaviors.java │ ├── ModContraptionTypes.java │ └── ModItems.java │ ├── block │ ├── mount │ │ ├── SmartMountBlock.java │ │ └── SmartMountBlockEntity.java │ ├── network │ │ ├── WeaponNetworkUnit.java │ │ ├── IBehaviourCondition.java │ │ ├── NetworkTicker.java │ │ └── WeaponNetworkRegistry.java │ ├── datalink │ │ └── DataLinkBehavior.java │ ├── radar │ │ ├── behavior │ │ │ └── IRadar.java │ │ ├── receiver │ │ │ └── RadarReceiverBlock.java │ │ └── track │ │ │ └── TrackCategory.java │ ├── monitor │ │ ├── MonitorSprite.java │ │ └── MonitorTargetDisplayBehavior.java │ ├── behaviours │ │ ├── RadarNetworkLinkBehaviour │ │ │ └── RadarNetworkLinkCondition.java │ │ ├── WeaponNetworkLinkBehaviour │ │ │ └── WeaponNetworkLinkCondition.java │ │ └── NetworkWeaponNetworkLinkBehaviour │ │ │ └── NetworkWeaponNetworkLinkCondition.java │ └── controller │ │ └── track │ │ └── TrackLinkBehavior.java │ ├── math3 │ ├── geometry │ │ ├── partitioning │ │ │ ├── utilities │ │ │ │ ├── doc-files │ │ │ │ │ └── OrderedTuple.png │ │ │ │ └── package-info.java │ │ │ └── Side.java │ │ ├── euclidean │ │ │ ├── oned │ │ │ │ └── package-info.java │ │ │ ├── threed │ │ │ │ └── package-info.java │ │ │ └── twod │ │ │ │ ├── package-info.java │ │ │ │ └── hull │ │ │ │ └── package-info.java │ │ ├── hull │ │ │ └── package-info.java │ │ ├── enclosing │ │ │ └── package-info.java │ │ ├── package-info.java │ │ └── spherical │ │ │ ├── oned │ │ │ └── package-info.java │ │ │ └── twod │ │ │ └── package-info.java │ ├── NOTICE.txt │ ├── linear │ │ └── package-info.java │ ├── ml │ │ ├── distance │ │ │ └── package-info.java │ │ ├── clustering │ │ │ ├── package-info.java │ │ │ ├── evaluation │ │ │ │ └── package-info.java │ │ │ └── Clusterable.java │ │ ├── neuralnet │ │ │ ├── package-info.java │ │ │ ├── sofm │ │ │ │ ├── package-info.java │ │ │ │ ├── util │ │ │ │ │ └── package-info.java │ │ │ │ └── LearningFactorFunction.java │ │ │ ├── oned │ │ │ │ └── package-info.java │ │ │ ├── twod │ │ │ │ ├── package-info.java │ │ │ │ └── util │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── MapVisualization.java │ │ │ ├── FeatureInitializer.java │ │ │ └── UpdateAction.java │ │ └── package-info.java │ ├── package-info.java │ ├── stat │ │ ├── package-info.java │ │ ├── descriptive │ │ │ ├── rank │ │ │ │ └── package-info.java │ │ │ ├── summary │ │ │ │ └── package-info.java │ │ │ └── moment │ │ │ │ └── package-info.java │ │ ├── inference │ │ │ └── package-info.java │ │ ├── ranking │ │ │ └── package-info.java │ │ ├── correlation │ │ │ └── package-info.java │ │ ├── regression │ │ │ └── package-info.java │ │ ├── interval │ │ │ └── package-info.java │ │ └── clustering │ │ │ └── package-info.java │ ├── filter │ │ └── package-info.java │ ├── special │ │ └── package-info.java │ ├── optim │ │ ├── univariate │ │ │ └── package-info.java │ │ ├── linear │ │ │ └── package-info.java │ │ ├── nonlinear │ │ │ ├── scalar │ │ │ │ ├── package-info.java │ │ │ │ ├── gradient │ │ │ │ │ └── package-info.java │ │ │ │ ├── noderiv │ │ │ │ │ └── package-info.java │ │ │ │ └── GoalType.java │ │ │ └── vector │ │ │ │ ├── package-info.java │ │ │ │ └── jacobian │ │ │ │ └── package-info.java │ │ └── OptimizationData.java │ ├── distribution │ │ ├── fitting │ │ │ └── package-info.java │ │ └── package-info.java │ ├── fraction │ │ └── package-info.java │ ├── primes │ │ └── package-info.java │ ├── exception │ │ ├── util │ │ │ ├── package-info.java │ │ │ └── ExceptionContextProvider.java │ │ └── package-info.java │ ├── genetics │ │ ├── package-info.java │ │ ├── Fitness.java │ │ └── StoppingCondition.java │ ├── util │ │ └── package-info.java │ ├── analysis │ │ ├── integration │ │ │ ├── gauss │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── solvers │ │ │ ├── package-info.java │ │ │ ├── UnivariateSolver.java │ │ │ ├── PolynomialSolver.java │ │ │ ├── UnivariateDifferentiableSolver.java │ │ │ └── DifferentiableUnivariateSolver.java │ │ ├── interpolation │ │ │ └── package-info.java │ │ ├── polynomials │ │ │ └── package-info.java │ │ ├── function │ │ │ ├── package-info.java │ │ │ ├── Add.java │ │ │ ├── Multiply.java │ │ │ ├── Divide.java │ │ │ ├── Subtract.java │ │ │ ├── Ulp.java │ │ │ ├── Abs.java │ │ │ ├── Ceil.java │ │ │ ├── Pow.java │ │ │ ├── Rint.java │ │ │ ├── Floor.java │ │ │ ├── Max.java │ │ │ ├── Min.java │ │ │ ├── Signum.java │ │ │ └── Atan2.java │ │ ├── UnivariateMatrixFunction.java │ │ ├── UnivariateVectorFunction.java │ │ └── BivariateFunction.java │ ├── transform │ │ ├── package-info.java │ │ └── TransformType.java │ ├── complex │ │ └── package-info.java │ ├── optimization │ │ ├── univariate │ │ │ ├── package-info.java │ │ │ └── UnivariateOptimizer.java │ │ ├── general │ │ │ └── package-info.java │ │ ├── linear │ │ │ └── package-info.java │ │ ├── direct │ │ │ └── package-info.java │ │ ├── GoalType.java │ │ ├── OptimizationData.java │ │ └── fitting │ │ │ └── package-info.java │ ├── ode │ │ └── nonstiff │ │ │ └── package-info.java │ ├── random │ │ └── RandomVectorGenerator.java │ └── fitting │ │ ├── package-info.java │ │ └── leastsquares │ │ └── ParameterValidator.java │ ├── config │ └── common │ │ └── RadarCommonConfig.java │ ├── mixin │ ├── AbstractCannonAccessor.java │ └── AutoCannonAccessor.java │ ├── compat │ ├── computercraft │ │ ├── CCCompatRegister.java │ │ ├── YawControllerPeripheral.java │ │ └── PitchControllerPeripheral.java │ └── cbc │ │ └── CBCCompatRegister.java │ ├── item │ ├── targetfilter │ │ └── TargetFilterItem.java │ ├── detectionfilter │ │ └── DetectionFilterItem.java │ └── identfilter │ │ └── IdentFilterItem.java │ ├── networking │ └── packets │ │ └── IDRecordPacket.java │ └── utils │ └── screenelements │ └── TooltipIcon.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── changelog.txt ├── .gitattributes ├── .gitignore ├── settings.gradle └── LICENSE /src/generated/resources/assets/create_radar/models/item/id_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/id_block" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/data_link.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/data_link" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/plane_radar.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/plane_radar" 3 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/fire_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/fire_controller" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/monitor.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/monitor/monitor_single" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/network_filterer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/network_filterer" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_bearing.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/radar_bearing/item" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_dish_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/radar_dish_block" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/track_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/track_controller" 3 | } -------------------------------------------------------------------------------- /src/main/resources/data/forge/tags/blocks/relocation_not_supported.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "create_radar:monitor" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_plate_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/radar_plate_block" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/creative_radar_plate.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/creative_radar_plate" 3 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_receiver_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "create_radar:block/radar_receiver_block" 3 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModAdvancements.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | public class ModAdvancements { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/mount/SmartMountBlock.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.mount; 2 | 3 | public class SmartMountBlock { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/mount/SmartMountBlockEntity.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.mount; 2 | 3 | public class SmartMountBlockEntity { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": { 4 | "text": "create_radar resources" 5 | }, 6 | "pack_format": 15 7 | } 8 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/id_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { 4 | "model": "create_radar:block/id_block" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/radar_bearing.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { 4 | "model": "create_radar:block/radar_bearing/block" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/block/off.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_all", 3 | "textures": { 4 | "all": "create_radar:block/fire_controller" 5 | } 6 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/block/on.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_all", 3 | "textures": { 4 | "all": "create_radar:block/fire_controller_on" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/ponder/radar_linking.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/ponder/radar_linking.nbt -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/siren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/siren.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/id_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/id_block.png -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/guided_fuze.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "create_radar:item/guided_fuze" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/models/block/fire_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_all", 3 | "textures": { 4 | "all": "create_radar:block/fire_controller" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/handles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/handles.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/monitor.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/yaw_axis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/yaw_axis.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/ponder/controller_linking.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/ponder/controller_linking.nbt -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/ponder/radar_contraption.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/ponder/radar_contraption.nbt -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/3x3monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/3x3monitor.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/grate_dish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/grate_dish.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/headlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/headlight.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/plane_radar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/plane_radar.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_link.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/spotlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/spotlight.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/item/guided_fuze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/item/guided_fuze.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/models/block/fire_controller_on.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_all", 3 | "textures": { 4 | "all": "create_radar:block/fire_controller_on" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/bearing_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/bearing_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/headlight_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/headlight_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/id_block_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/id_block_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_bearing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_bearing.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/yaw_axis_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/yaw_axis_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/radar_iff_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/radar_iff_list.png -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | ChangeLog 2 | ========= 3 | 4 | Version .2--------- 5 | -added config 6 | -added Radar Links 7 | ------------------- 8 | 9 | Version .1---------- 10 | -Initial release 11 | -------------------- -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/ident_filter_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "create_radar:item/identification_filter" 5 | } 6 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_filter_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "create_radar:item/detection_filter_item" 5 | } 6 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/target_filter_item.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "create_radar:item/targeting_filter_item" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/bearing_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/bearing_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/fire_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/fire_controller.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/network_filterer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/network_filterer.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_receiver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_receiver.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/spotlight_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/spotlight_light.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/binoculars_scope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/binoculars_scope.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/detection_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/detection_filter.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/targeting_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/targeting_filter.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/player.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/cannon_controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/cannon_controller.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/fire_controller_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/fire_controller_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_plate_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_plate_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/artillery_radio_gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/artillery_radio_gui.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/id_block_top_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/id_block_top_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/identification_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/identification_filter.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/identification_filter_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/identification_filter_0.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/gui/identification_filter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/gui/identification_filter_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/item/detection_filter_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/item/detection_filter_item.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/item/identification_filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/item/identification_filter.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/item/targeting_filter_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/item/targeting_filter_item.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/grid_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/grid_square.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/projectile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/projectile.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/radar_sweep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/radar_sweep.png -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_safe_zone_designator.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "create_radar:item/radar_safe_zone_designator" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/entity_hitbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/entity_hitbox.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/target_hovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/target_hovered.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/creative_radar_plate_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/creative_radar_plate_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/identification_transponder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/identification_transponder.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_command_guidance_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_command_guidance_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_warning_receiver_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_warning_receiver_off.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_warning_receiver_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_warning_receiver_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/item/radar_safe_zone_designator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/item/radar_safe_zone_designator.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/radar_bg_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/radar_bg_circle.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/radar_bg_filler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/radar_bg_filler.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/target_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/target_selected.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/block/radar_command_guidance_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/block/radar_command_guidance_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/textures/monitor_sprite/contraption_hitbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/resources/assets/create_radar/textures/monitor_sprite/contraption_hitbox.png -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/partitioning/utilities/doc-files/OrderedTuple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arsenalists-of-Create/Create-Radar/HEAD/src/main/java/com/happysg/radar/math3/geometry/partitioning/utilities/doc-files/OrderedTuple.png -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/fire_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "powered=false": { 4 | "model": "create_radar:block/off" 5 | }, 6 | "powered=true": { 7 | "model": "create_radar:block/on" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Disable autocrlf on generated files, they always generate with LF 2 | # Add any extra files or paths here to make git stop saying they 3 | # are changed when only line endings change. 4 | src/generated/**/.cache/cache text eol=lf 5 | src/generated/**/*.json text eol=lf 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea 15 | 16 | # gradle 17 | build 18 | .gradle 19 | 20 | # other 21 | eclipse 22 | run 23 | 24 | # Files from Forge MDK 25 | forge*changelog.txt 26 | /run-data/ 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/config/common/RadarCommonConfig.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.config.common; 2 | 3 | import net.createmod.catnip.config.ConfigBase; 4 | 5 | public class RadarCommonConfig extends ConfigBase { 6 | @Override 7 | public String getName() { 8 | return "Radar Common"; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/mechanical_crafting/radar_dish.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "create:cutting", 3 | "ingredients": [ 4 | { 5 | "item": "minecraft:iron_bars" 6 | } 7 | ], 8 | "processingTime": 50, 9 | "results": [ 10 | { 11 | "item": "create_radar:radar_dish_block" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/mechanical_crafting/radar_plate.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "create:cutting", 3 | "ingredients": [ 4 | { 5 | "item": "minecraft:quartz_slab" 6 | } 7 | ], 8 | "processingTime": 50, 9 | "results": [ 10 | { 11 | "item": "create_radar:radar_plate_block" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/network/WeaponNetworkUnit.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.network; 2 | 3 | import net.minecraft.world.level.block.entity.BlockEntity; 4 | 5 | public interface WeaponNetworkUnit { 6 | void setWeaponNetwork(WeaponNetwork network); 7 | WeaponNetwork getWeaponNetwork(); 8 | BlockEntity getBlockEntity(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache Commons Math 2 | Copyright 2001-2016 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This product includes software developed for Orekit by 8 | CS Systèmes d'Information (http://www.c-s.fr/) 9 | Copyright 2010-2012 CS Systèmes d'Information 10 | -------------------------------------------------------------------------------- /src/main/resources/create_radar.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "com.happysg.radar.mixin", 5 | "refmap": "createradar.refmap.json", 6 | "compatibilityLevel": "JAVA_17", 7 | "client": [ 8 | ], 9 | "mixins": [ 10 | "AbstractCannonAccessor", 11 | "AutoCannonAccessor" 12 | ], 13 | "injectors": { 14 | "defaultRequire": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/radar_bearing.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "create:mechanical_bearing" 7 | }, 8 | "B": { 9 | "tag": "forge:plates/iron" 10 | } 11 | }, 12 | "pattern": [ 13 | "B", 14 | "A" 15 | ], 16 | "result": { 17 | "item": "create_radar:radar_bearing" 18 | }, 19 | "show_notification": true 20 | } -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/radar_reciever.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "create:andesite_casing" 7 | }, 8 | "B": { 9 | "item": "minecraft:lightning_rod" 10 | } 11 | }, 12 | "pattern": [ 13 | "AB" 14 | ], 15 | "result": { 16 | "item": "create_radar:radar_receiver_block" 17 | }, 18 | "show_notification": true 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/auto_pitch_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "create:gearbox" 7 | }, 8 | "B": { 9 | "item": "create:precision_mechanism" 10 | } 11 | }, 12 | "pattern": [ 13 | "BA" 14 | ], 15 | "result": { 16 | "item": "create_radar:auto_pitch_controller" 17 | }, 18 | "show_notification": true 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/auto_yaw_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "create:gearbox" 7 | }, 8 | "B": { 9 | "item": "create:precision_mechanism" 10 | } 11 | }, 12 | "pattern": [ 13 | "B", 14 | "A" 15 | ], 16 | "result": { 17 | "item": "create_radar:auto_yaw_controller" 18 | }, 19 | "show_notification": true 20 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/plane_radar.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=east": { 4 | "model": "create_radar:block/plane_radar", 5 | "y": 90 6 | }, 7 | "facing=north": { 8 | "model": "create_radar:block/plane_radar" 9 | }, 10 | "facing=south": { 11 | "model": "create_radar:block/plane_radar", 12 | "y": 180 13 | }, 14 | "facing=west": { 15 | "model": "create_radar:block/plane_radar", 16 | "y": 270 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/track_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=east": { 4 | "model": "create_radar:block/track_controller", 5 | "y": 90 6 | }, 7 | "facing=north": { 8 | "model": "create_radar:block/track_controller" 9 | }, 10 | "facing=south": { 11 | "model": "create_radar:block/track_controller", 12 | "y": 180 13 | }, 14 | "facing=west": { 15 | "model": "create_radar:block/track_controller", 16 | "y": 270 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/monitor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:monitor" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/monitor" 21 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModShapes.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | 4 | import com.simibubi.create.AllShapes; 5 | import net.createmod.catnip.math.VoxelShaper; 6 | import net.minecraft.world.level.block.Block; 7 | 8 | public class ModShapes { 9 | public static final VoxelShaper RADAR_DISH = new AllShapes.Builder(Block.box(0, 7, 0, 16, 9, 16)).forDirectional(); 10 | 11 | public static final VoxelShaper RADAR_PLATE = new AllShapes.Builder(Block.box(0, 4, 0, 16, 12, 16)).forDirectional(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/data_link.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "minecraft:redstone_torch" 7 | }, 8 | "B": { 9 | "item": "create:brass_casing" 10 | }, 11 | "C": { 12 | "item": "minecraft:copper_ingot" 13 | } 14 | }, 15 | "pattern": [ 16 | "A", 17 | "B", 18 | "C" 19 | ], 20 | "result": { 21 | "item": "create_radar:data_link" 22 | }, 23 | "show_notification": true 24 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/data_link.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:data_link" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/data_link" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/id_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:id_block" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/id_block" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/auto_yaw_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=east": { 4 | "model": "create_radar:block/auto_yaw_controller", 5 | "y": 90 6 | }, 7 | "facing=north": { 8 | "model": "create_radar:block/auto_yaw_controller" 9 | }, 10 | "facing=south": { 11 | "model": "create_radar:block/auto_yaw_controller", 12 | "y": 180 13 | }, 14 | "facing=west": { 15 | "model": "create_radar:block/auto_yaw_controller", 16 | "y": 270 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/plane_radar.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:plane_radar" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/plane_radar" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/radar_bearing.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:radar_bearing" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/radar_bearing" 21 | } -------------------------------------------------------------------------------- /src/main/resources/data/create_radar/recipes/crafting/monitor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "create:brass_casing" 7 | }, 8 | "B": { 9 | "item": "create:electron_tube" 10 | }, 11 | "C": { 12 | "item": "create:precision_mechanism" 13 | } 14 | }, 15 | "pattern": [ 16 | "B", 17 | "A", 18 | "C" 19 | ], 20 | "result": { 21 | "count": 3, 22 | "item": "create_radar:monitor" 23 | }, 24 | "show_notification": true 25 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/auto_pitch_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=east": { 4 | "model": "create_radar:block/auto_pitch_controller", 5 | "y": 90 6 | }, 7 | "facing=north": { 8 | "model": "create_radar:block/auto_pitch_controller" 9 | }, 10 | "facing=south": { 11 | "model": "create_radar:block/auto_pitch_controller", 12 | "y": 180 13 | }, 14 | "facing=west": { 15 | "model": "create_radar:block/auto_pitch_controller", 16 | "y": 270 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/models/item/radar_guidance_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:fire_controller" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/fire_controller" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/fire_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:fire_controller" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/fire_controller" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "create_radar:monitor", 4 | "create_radar:data_link", 5 | "create_radar:radar_bearing", 6 | "create_radar:plane_radar", 7 | "create_radar:id_block", 8 | "create_radar:radar_receiver_block", 9 | "create_radar:radar_dish_block", 10 | "create_radar:radar_plate_block", 11 | "create_radar:auto_yaw_controller", 12 | "create_radar:track_controller", 13 | "create_radar:auto_pitch_controller", 14 | "create_radar:fire_controller" 15 | ] 16 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/datalink/DataLinkBehavior.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.datalink; 2 | 3 | import net.minecraft.resources.ResourceLocation; 4 | import net.minecraft.world.level.block.Block; 5 | import net.minecraft.world.level.block.entity.BlockEntity; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | public abstract class DataLinkBehavior { 10 | 11 | public ResourceLocation id; 12 | 13 | protected abstract void transferData(@NotNull DataLinkContext context); 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/radar_dish_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:radar_dish_block" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/radar_dish_block" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/radar_plate_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:radar_plate_block" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/radar_plate_block" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/track_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:track_controller" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/track_controller" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "create_radar:monitor", 4 | "create_radar:data_link", 5 | "create_radar:radar_bearing", 6 | "create_radar:plane_radar", 7 | "create_radar:id_block", 8 | "create_radar:radar_receiver_block", 9 | "create_radar:radar_dish_block", 10 | "create_radar:radar_plate_block", 11 | "create_radar:auto_yaw_controller", 12 | "create_radar:track_controller", 13 | "create_radar:auto_pitch_controller", 14 | "create_radar:fire_controller" 15 | ] 16 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/auto_yaw_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:auto_yaw_controller" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/auto_yaw_controller" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/creative_radar_plate.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:creative_radar_plate" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/creative_radar_plate" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/radar_receiver_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:radar_receiver_block" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/radar_receiver_block" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/create_radar/loot_tables/blocks/auto_pitch_controller.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "create_radar:auto_pitch_controller" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "create_radar:blocks/auto_pitch_controller" 21 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/mixin/AbstractCannonAccessor.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.mixin; 2 | 3 | import org.spongepowered.asm.mixin.Mixin; 4 | import org.spongepowered.asm.mixin.gen.Accessor; 5 | import rbasamoyai.createbigcannons.cannon_control.contraption.AbstractMountedCannonContraption; 6 | 7 | @Mixin(AbstractMountedCannonContraption.class) 8 | public interface AbstractCannonAccessor { 9 | 10 | @Accessor(value = "frontExtensionLength", remap = false) 11 | int getFrontExtensionLength(); 12 | @Accessor(value = "backExtensionLength", remap = false) 13 | int getBackExtensionLength(); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModPartials.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import dev.engine_room.flywheel.lib.model.baked.PartialModel; 5 | 6 | public class ModPartials { 7 | 8 | public static final PartialModel RADAR_GLOW = block("data_link/glow"); 9 | public static final PartialModel RADAR_LINK_TUBE = block("data_link/tube"); 10 | 11 | private static PartialModel block(String path) { 12 | return PartialModel.of(CreateRadar.asResource("block/" + path)); 13 | } 14 | 15 | 16 | public static void init() { /* load class */ } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/network/IBehaviourCondition.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.network; 2 | 3 | import net.minecraft.world.level.block.Block; 4 | 5 | public abstract class IBehaviourCondition { 6 | 7 | public abstract boolean firstBlockCondition(Block a); 8 | public abstract boolean secondBlockCondition(Block b); 9 | public abstract boolean bothBlocksCondition(Block a, Block b); 10 | 11 | public boolean isValid(Block a, Block b) { 12 | return ((firstBlockCondition(a) && secondBlockCondition(b)) || firstBlockCondition(b) && secondBlockCondition(a)) && bothBlocksCondition(a, b); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/radar/behavior/IRadar.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.radar.behavior; 2 | 3 | import com.happysg.radar.block.radar.track.RadarTrack; 4 | import net.minecraft.core.BlockPos; 5 | 6 | import java.util.Collection; 7 | 8 | public interface IRadar { 9 | Collection getTracks(); 10 | 11 | float getRange(); 12 | 13 | boolean isRunning(); 14 | 15 | BlockPos getWorldPos(); 16 | 17 | float getGlobalAngle(); 18 | 19 | //todo better name and/or plan to handle different types of radars 20 | default boolean renderRelativeToMonitor() { 21 | return true; 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | maven { 5 | name = 'MinecraftForge' 6 | url = 'https://maven.minecraftforge.net/' 7 | } 8 | maven { url = 'https://maven.parchmentmc.org' } // Add this line 9 | } 10 | resolutionStrategy { 11 | eachPlugin { 12 | if (requested.id.id == "org.spongepowered.mixin") { 13 | useModule("org.spongepowered:mixingradle:${requested.version}") 14 | } 15 | } 16 | } 17 | } 18 | 19 | plugins { 20 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' 21 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/monitor/MonitorSprite.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.monitor; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import net.minecraft.resources.ResourceLocation; 5 | 6 | import java.util.Locale; 7 | 8 | public enum MonitorSprite { 9 | CONTRAPTION_HITBOX, 10 | ENTITY_HITBOX, 11 | PROJECTILE, 12 | PLAYER, 13 | GRID_SQUARE, 14 | RADAR_BG_CIRCLE, 15 | RADAR_BG_FILLER, 16 | RADAR_SWEEP, 17 | TARGET_SELECTED, 18 | TARGET_HOVERED; 19 | 20 | 21 | public ResourceLocation getTexture() { 22 | return CreateRadar.asResource("textures/monitor_sprite/" + name().toLowerCase(Locale.ROOT) + ".png"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/network/NetworkTicker.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.network; 2 | 3 | import net.minecraft.server.MinecraftServer; 4 | import net.minecraft.server.level.ServerLevel; 5 | import net.minecraftforge.event.TickEvent; 6 | import net.minecraftforge.fml.common.Mod; 7 | import net.minecraftforge.eventbus.api.SubscribeEvent; 8 | import net.minecraftforge.server.ServerLifecycleHooks; 9 | 10 | @Mod.EventBusSubscriber 11 | public class NetworkTicker { 12 | @SubscribeEvent 13 | public static void onServerTick(TickEvent.ServerTickEvent event) { 14 | if (event.phase != TickEvent.Phase.END) return; 15 | NetworkRegistry.tickAll(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/compat/computercraft/CCCompatRegister.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.compat.computercraft; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import dan200.computercraft.api.ComputerCraftAPI; 5 | 6 | public class CCCompatRegister { 7 | public static void registerPeripherals(){ 8 | CreateRadar.getLogger().info("Registering Peripherals!"); 9 | ComputerCraftAPI.registerGenericSource(new RadarBearingPeripheral()); 10 | ComputerCraftAPI.registerGenericSource(new MonitorPeripheral()); 11 | ComputerCraftAPI.registerGenericSource(new YawControllerPeripheral()); 12 | ComputerCraftAPI.registerGenericSource(new PitchControllerPeripheral()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/data_link.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/data_link/block", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/data_link/block", 9 | "x": 90, 10 | "y": 90 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/data_link/block", 14 | "x": 90 15 | }, 16 | "facing=south": { 17 | "model": "create_radar:block/data_link/block", 18 | "x": 90, 19 | "y": 180 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/data_link/block" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/data_link/block", 26 | "x": 90, 27 | "y": 270 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/network_filterer.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/network_filterer", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/network_filterer", 9 | "x": 90, 10 | "y": 90 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/network_filterer", 14 | "x": 90 15 | }, 16 | "facing=south": { 17 | "model": "create_radar:block/network_filterer", 18 | "x": 90, 19 | "y": 180 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/network_filterer" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/network_filterer", 26 | "x": 90, 27 | "y": 270 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/radar_dish_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/radar_dish_block", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/radar_dish_block", 9 | "x": 90, 10 | "y": 270 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/radar_dish_block", 14 | "x": 90, 15 | "y": 180 16 | }, 17 | "facing=south": { 18 | "model": "create_radar:block/radar_dish_block", 19 | "x": 90 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/radar_dish_block" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/radar_dish_block", 26 | "x": 90, 27 | "y": 90 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/radar_plate_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/radar_plate_block", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/radar_plate_block", 9 | "x": 90, 10 | "y": 270 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/radar_plate_block", 14 | "x": 90, 15 | "y": 180 16 | }, 17 | "facing=south": { 18 | "model": "create_radar:block/radar_plate_block", 19 | "x": 90 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/radar_plate_block" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/radar_plate_block", 26 | "x": 90, 27 | "y": 90 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/creative_radar_plate.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/creative_radar_plate", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/creative_radar_plate", 9 | "x": 90, 10 | "y": 270 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/creative_radar_plate", 14 | "x": 90, 15 | "y": 180 16 | }, 17 | "facing=south": { 18 | "model": "create_radar:block/creative_radar_plate", 19 | "x": 90 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/creative_radar_plate" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/creative_radar_plate", 26 | "x": 90, 27 | "y": 90 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/create_radar/blockstates/radar_receiver_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=down": { 4 | "model": "create_radar:block/radar_receiver_block", 5 | "x": 180 6 | }, 7 | "facing=east": { 8 | "model": "create_radar:block/radar_receiver_block", 9 | "x": 90, 10 | "y": 90 11 | }, 12 | "facing=north": { 13 | "model": "create_radar:block/radar_receiver_block", 14 | "x": 90 15 | }, 16 | "facing=south": { 17 | "model": "create_radar:block/radar_receiver_block", 18 | "x": 90, 19 | "y": 180 20 | }, 21 | "facing=up": { 22 | "model": "create_radar:block/radar_receiver_block" 23 | }, 24 | "facing=west": { 25 | "model": "create_radar:block/radar_receiver_block", 26 | "x": 90, 27 | "y": 270 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/compat/cbc/CBCCompatRegister.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.compat.cbc; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.item.GuidedFuzeItem; 5 | import com.tterrag.registrate.util.entry.ItemEntry; 6 | import net.minecraft.world.item.Item; 7 | import net.minecraft.world.item.Rarity; 8 | 9 | public class CBCCompatRegister { 10 | public static ItemEntry GUIDED_FUZE; 11 | 12 | public static void registerCBC() { 13 | CreateRadar.getLogger().info("Registering CBC Compat Items!"); 14 | //conditionally register items, probably a bad idea 15 | GUIDED_FUZE = CreateRadar.REGISTRATE 16 | .item("guided_fuze", GuidedFuzeItem::new) 17 | .properties(properties -> properties.rarity(Rarity.EPIC)) 18 | .register(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/models/block/data_link/glow.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "texture_size": [64, 64], 4 | "textures": { 5 | "0": "create_radar:block/radar_link", 6 | "particle": "create_radar:block/radar_link" 7 | }, 8 | "elements": [ 9 | { 10 | "from": [1.5, 5, 1.5], 11 | "to": [8.5, 12, 8.5], 12 | "rotation": {"angle": 0, "axis": "y", "origin": [5, 8.5, 5]}, 13 | "faces": { 14 | "north": {"uv": [5.75, 1.25, 4.5, 2.5], "texture": "#0"}, 15 | "east": {"uv": [4.5, 1.25, 5.75, 2.5], "texture": "#0"}, 16 | "south": {"uv": [4.5, 1.25, 5.75, 2.5], "texture": "#0"}, 17 | "west": {"uv": [5.75, 1.25, 4.5, 2.5], "texture": "#0"}, 18 | "up": {"uv": [4.5, 0, 5.75, 1.25], "rotation": 270, "texture": "#0"}, 19 | "down": {"uv": [4.5, 2.5, 5.75, 3.75], "rotation": 90, "texture": "#0"} 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/create_radar/models/block/data_link/tube.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "texture_size": [64, 64], 4 | "textures": { 5 | "0": "create_radar:block/radar_link", 6 | "particle": "create_radar:block/radar_link" 7 | }, 8 | "elements": [ 9 | { 10 | "from": [2.5, 6, 2.5], 11 | "to": [7.5, 11, 7.5], 12 | "rotation": {"angle": 0, "axis": "y", "origin": [5, 8.5, 5]}, 13 | "faces": { 14 | "north": {"uv": [5.75, 1.25, 4.5, 2.5], "texture": "#0"}, 15 | "east": {"uv": [4.5, 1.25, 5.75, 2.5], "texture": "#0"}, 16 | "south": {"uv": [4.5, 1.25, 5.75, 2.5], "texture": "#0"}, 17 | "west": {"uv": [5.75, 1.25, 4.5, 2.5], "texture": "#0"}, 18 | "up": {"uv": [4.5, 0, 5.75, 1.25], "rotation": 270, "texture": "#0"}, 19 | "down": {"uv": [4.5, 2.5, 5.75, 3.75], "rotation": 90, "texture": "#0"} 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/mixin/AutoCannonAccessor.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.mixin; 2 | 3 | import com.dsvv.cbcat.cannon.heavy_autocannon.contraption.MountedHeavyAutocannonContraption; 4 | import com.dsvv.cbcat.cannon.twin_autocannon.contraption.MountedTwinAutocannonContraption; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | import rbasamoyai.createbigcannons.cannon_control.contraption.MountedAutocannonContraption; 8 | import rbasamoyai.createbigcannons.cannons.autocannon.material.AutocannonMaterial; 9 | 10 | @Mixin({ 11 | MountedAutocannonContraption.class, 12 | MountedTwinAutocannonContraption.class, 13 | MountedHeavyAutocannonContraption.class 14 | }) 15 | public interface AutoCannonAccessor { 16 | @Accessor(value = "cannonMaterial", remap = false) 17 | AutocannonMaterial getMaterial(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModDisplayBehaviors.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.block.monitor.MonitorTargetDisplayBehavior; 5 | import com.simibubi.create.api.behaviour.display.DisplaySource; 6 | import net.minecraft.world.level.block.entity.BlockEntityType; 7 | 8 | public class ModDisplayBehaviors { 9 | 10 | public static void register(String id, DisplaySource source, BlockEntityType be) { 11 | CreateRadar.REGISTRATE 12 | .displaySource(id, () -> source) 13 | .associate(be) 14 | .register(); 15 | } 16 | 17 | public static void register() { 18 | CreateRadar.getLogger().info("Registering Display Sources!"); 19 | register("monitor", new MonitorTargetDisplayBehavior(), ModBlockEntityTypes.MONITOR.get()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/network/WeaponNetworkRegistry.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.network; 2 | 3 | import net.minecraft.core.BlockPos; 4 | 5 | import java.util.*; 6 | 7 | public class WeaponNetworkRegistry { 8 | private static final Hashtable networks = new Hashtable<>(); 9 | 10 | public static void register(WeaponNetwork weaponNetwork) { 11 | networks.put(weaponNetwork.getUuid(), weaponNetwork); 12 | } 13 | 14 | public static WeaponNetwork get(UUID uuid) { 15 | return networks.get(uuid); 16 | } 17 | 18 | public static void remove(UUID uuid) { 19 | networks.remove(uuid); 20 | } 21 | 22 | public static WeaponNetwork networkContains(BlockPos pos){ 23 | return getAll().stream().filter(weaponNetwork -> weaponNetwork.contains(pos)).findFirst().orElse(null); 24 | } 25 | 26 | public static Collection getAll() { 27 | return networks.values(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/linear/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Linear algebra support. 19 | */ 20 | package com.happysg.radar.math3.linear; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModContraptionTypes.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.block.radar.bearing.RadarContraption; 5 | import com.simibubi.create.api.contraption.ContraptionType; 6 | import com.simibubi.create.api.registry.CreateBuiltInRegistries; 7 | import net.minecraft.core.Registry; 8 | import net.minecraft.resources.ResourceLocation; 9 | 10 | @SuppressWarnings({"rawtypes", "unchecked"}) // needed for raw ContraptionType 11 | public class ModContraptionTypes { 12 | 13 | public static ContraptionType RADAR_BEARING; 14 | 15 | public static void register() { 16 | RADAR_BEARING = new ContraptionType(RadarContraption::new); 17 | 18 | ResourceLocation id = CreateRadar.asResource("radar_bearing"); 19 | Registry.register(CreateBuiltInRegistries.CONTRAPTION_TYPE, id, RADAR_BEARING); 20 | 21 | CreateRadar.getLogger().info("Registered contraption type '{}'", id); 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/distance/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Common distance measures. 19 | */ 20 | package com.happysg.radar.math3.ml.distance; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/clustering/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Clustering algorithms. 19 | */ 20 | package com.happysg.radar.math3.ml.clustering; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Neural networks. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Base package for machine learning algorithms. 19 | */ 20 | package com.happysg.radar.math3.ml; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Common classes used throughout the commons-math library. 19 | */ 20 | package com.happysg.radar.math3; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Data storage, manipulation and summary routines. 19 | */ 20 | package com.happysg.radar.math3.stat; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/behaviours/RadarNetworkLinkBehaviour/RadarNetworkLinkCondition.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.behaviours.RadarNetworkLinkBehaviour; 2 | 3 | import com.happysg.radar.block.network.IBehaviourCondition; 4 | import com.happysg.radar.block.network.NetworkRegistry; 5 | import com.happysg.radar.block.radar.bearing.RadarBearingBlock; 6 | import net.minecraft.world.level.block.Block; 7 | 8 | public class RadarNetworkLinkCondition extends IBehaviourCondition { 9 | 10 | @Override 11 | public boolean firstBlockCondition(Block a) { 12 | return a instanceof RadarBearingBlock || NetworkRegistry.isNetworkBlock(a); 13 | } 14 | 15 | @Override 16 | public boolean secondBlockCondition(Block b) { 17 | return b instanceof RadarBearingBlock || NetworkRegistry.isNetworkBlock(b); 18 | } 19 | 20 | @Override 21 | public boolean bothBlocksCondition(Block a, Block b) { 22 | return a instanceof RadarBearingBlock || b instanceof RadarBearingBlock; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/behaviours/WeaponNetworkLinkBehaviour/WeaponNetworkLinkCondition.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.behaviours.WeaponNetworkLinkBehaviour; 2 | 3 | import com.happysg.radar.block.network.IBehaviourCondition; 4 | import com.happysg.radar.block.network.WeaponNetwork; 5 | import net.minecraft.world.level.block.Block; 6 | import rbasamoyai.createbigcannons.cannon_control.cannon_mount.CannonMountBlock; 7 | 8 | public class WeaponNetworkLinkCondition extends IBehaviourCondition { 9 | @Override 10 | public boolean firstBlockCondition(Block a) { 11 | return WeaponNetwork.isController(a) || a instanceof CannonMountBlock; 12 | } 13 | 14 | @Override 15 | public boolean secondBlockCondition(Block b) { 16 | return WeaponNetwork.isController(b) || b instanceof CannonMountBlock; 17 | } 18 | 19 | @Override 20 | public boolean bothBlocksCondition(Block a, Block b) { 21 | return !(a instanceof CannonMountBlock && b instanceof CannonMountBlock); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/filter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Implementations of common discrete-time linear filters. 19 | */ 20 | package com.happysg.radar.math3.filter; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/clustering/evaluation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Cluster evaluation methods. 19 | */ 20 | package com.happysg.radar.math3.ml.clustering.evaluation; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/sofm/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Self Organizing Feature Map. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet.sofm; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/special/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Implementations of special functions such as Beta and Gamma. 19 | */ 20 | package com.happysg.radar.math3.special; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/descriptive/rank/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Summary statistics based on ranks. 19 | */ 20 | package com.happysg.radar.math3.stat.descriptive.rank; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/descriptive/summary/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Other summary statistics. 19 | */ 20 | package com.happysg.radar.math3.stat.descriptive.summary; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/oned/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * One-dimensional neural networks. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet.oned; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/sofm/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Miscellaneous utilities. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet.sofm.util; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/twod/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Two-dimensional neural networks. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet.twod; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/univariate/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * One-dimensional optimization algorithms. 20 | */ 21 | package com.happysg.radar.math3.optim.univariate; 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/descriptive/moment/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Summary statistics based on moments. 19 | */ 20 | package com.happysg.radar.math3.stat.descriptive.moment; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/distribution/fitting/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Fitting of parameters against distributions. 19 | */ 20 | package com.happysg.radar.math3.distribution.fitting; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/fraction/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Fraction number type and fraction number formatting. 20 | * 21 | */ 22 | package com.happysg.radar.math3.fraction; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/linear/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Optimization algorithms for linear constrained problems. 20 | */ 21 | package com.happysg.radar.math3.optim.linear; 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/primes/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Methods related to prime numbers like primality test, factor decomposition. 19 | */ 20 | package com.happysg.radar.math3.primes; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/inference/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Classes providing hypothesis testing. 20 | * 21 | */ 22 | package com.happysg.radar.math3.stat.inference; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/ranking/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Classes providing rank transformations. 20 | * 21 | */ 22 | package com.happysg.radar.math3.stat.ranking; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/distribution/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Implementations of common discrete and continuous distributions. 19 | */ 20 | package com.happysg.radar.math3.distribution; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/exception/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Classes supporting exception localization. 20 | * 21 | */ 22 | package com.happysg.radar.math3.exception.util; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/genetics/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * This package provides Genetic Algorithms components and implementations. 19 | */ 20 | package com.happysg.radar.math3.genetics; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/correlation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Correlations/Covariance computations. 20 | * 21 | */ 22 | package com.happysg.radar.math3.stat.correlation; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/scalar/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Algorithms for optimizing a scalar function. 20 | */ 21 | package com.happysg.radar.math3.optim.nonlinear.scalar; 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Convenience routines and common data structures used throughout the commons-math library. 19 | */ 20 | package com.happysg.radar.math3.util; 21 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/regression/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Statistical routines involving multivariate data. 20 | * 21 | */ 22 | package com.happysg.radar.math3.stat.regression; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/integration/gauss/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Gauss family of quadrature schemes. 20 | * 21 | */ 22 | package com.happysg.radar.math3.analysis.integration.gauss; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/solvers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Root finding algorithms, for univariate real functions. 20 | * 21 | */ 22 | package com.happysg.radar.math3.analysis.solvers; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/twod/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utilities to visualize two-dimensional neural networks. 20 | */ 21 | 22 | package com.happysg.radar.math3.ml.neuralnet.twod.util; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/transform/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Implementations of transform methods, including Fast Fourier transforms. 20 | * 21 | */ 22 | package com.happysg.radar.math3.transform; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/interpolation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Univariate real functions interpolation algorithms. 20 | * 21 | */ 22 | package com.happysg.radar.math3.analysis.interpolation; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/complex/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Complex number type and implementations of complex transcendental 20 | * functions. 21 | * 22 | */ 23 | package com.happysg.radar.math3.complex; 24 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/univariate/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Univariate real functions minimum finding algorithms. 20 | * 21 | */ 22 | package com.happysg.radar.math3.optimization.univariate; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/interval/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Classes providing binomial proportion confidence interval construction. 20 | * 21 | */ 22 | package com.happysg.radar.math3.stat.interval; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/controller/track/TrackLinkBehavior.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.controller.track; 2 | 3 | import com.happysg.radar.block.datalink.DataLinkBehavior; 4 | import com.happysg.radar.block.datalink.DataLinkBlockEntity; 5 | import com.happysg.radar.block.datalink.DataLinkContext; 6 | import com.happysg.radar.block.datalink.screens.TargetingConfig; 7 | import com.happysg.radar.block.monitor.MonitorBlockEntity; 8 | import net.minecraft.world.phys.Vec3; 9 | import org.jetbrains.annotations.NotNull; 10 | 11 | public class TrackLinkBehavior extends DataLinkBehavior { 12 | @Override 13 | 14 | public void transferData(DataLinkContext context) { 15 | 16 | if (!(context.getSourceBlockEntity() instanceof TrackControllerBlockEntity controller)) 17 | return; 18 | 19 | MonitorBlockEntity monitor = context.getMonitorBlockEntity(); 20 | if (monitor == null) 21 | return; 22 | 23 | Vec3 targetPos = monitor.getTargetPos(TargetingConfig.DEFAULT); 24 | controller.setTarget(targetPos); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/general/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * This package provides optimization algorithms that require derivatives. 20 | * 21 | */ 22 | package com.happysg.radar.math3.optimization.general; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/behaviours/NetworkWeaponNetworkLinkBehaviour/NetworkWeaponNetworkLinkCondition.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.behaviours.NetworkWeaponNetworkLinkBehaviour; 2 | 3 | import com.happysg.radar.block.network.IBehaviourCondition; 4 | import com.happysg.radar.block.network.NetworkRegistry; 5 | import com.happysg.radar.block.network.WeaponNetwork; 6 | import net.minecraft.world.level.block.Block; 7 | import rbasamoyai.createbigcannons.cannon_control.cannon_mount.CannonMountBlock; 8 | 9 | public class NetworkWeaponNetworkLinkCondition extends IBehaviourCondition { 10 | @Override 11 | public boolean firstBlockCondition(Block a) { 12 | return a instanceof CannonMountBlock || WeaponNetwork.isController(a); 13 | } 14 | 15 | @Override 16 | public boolean secondBlockCondition(Block b) { 17 | return NetworkRegistry.isNetworkBlock(b); 18 | } 19 | 20 | @Override 21 | public boolean bothBlocksCondition(Block a, Block b) { 22 | return NetworkRegistry.isNetworkBlock(a) || NetworkRegistry.isNetworkBlock(b); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/linear/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * This package provides optimization algorithms for linear constrained problems. 20 | * 21 | */ 22 | package com.happysg.radar.math3.optimization.linear; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/integration/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Numerical integration (quadrature) algorithms for univariate real functions. 20 | * 21 | */ 22 | package com.happysg.radar.math3.analysis.integration; 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/euclidean/oned/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides basic 1D geometry components. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.euclidean.oned; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/euclidean/threed/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides basic 3D geometry components. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.euclidean.threed; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/euclidean/twod/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides basic 2D geometry components. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.euclidean.twod; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/scalar/gradient/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * This package provides optimization algorithms that require derivatives. 20 | */ 21 | package com.happysg.radar.math3.optim.nonlinear.scalar.gradient; 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/hull/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides interfaces and classes related to the convex hull problem. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.hull; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/scalar/noderiv/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * This package provides optimization algorithms that do not require derivatives. 20 | */ 21 | package com.happysg.radar.math3.optim.nonlinear.scalar.noderiv; 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/exception/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Specialized exceptions for algorithms errors. The exceptions can be localized 20 | * using simple java properties. 21 | * 22 | */ 23 | package com.happysg.radar.math3.exception; 24 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/direct/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides optimization algorithms that don't require derivatives. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.optimization.direct; 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/polynomials/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * Univariate real polynomials implementations, seen as differentiable 20 | * univariate real functions. 21 | * 22 | */ 23 | package com.happysg.radar.math3.analysis.polynomials; 24 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ode/nonstiff/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides classes to solve non-stiff Ordinary Differential Equations problems. 21 | *

22 | * 23 | * 24 | */ 25 | package com.happysg.radar.math3.ode.nonstiff; 26 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/enclosing/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides interfaces and classes related to the smallest enclosing ball problem. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.enclosing; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/partitioning/utilities/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides multidimensional ordering features for partitioning. 21 | *

22 | * 23 | */ 24 | package com.happysg.radar.math3.geometry.partitioning.utilities; 25 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/monitor/MonitorTargetDisplayBehavior.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.monitor; 2 | 3 | import com.simibubi.create.content.redstone.displayLink.DisplayLinkContext; 4 | import com.simibubi.create.api.behaviour.display.DisplaySource; 5 | import com.simibubi.create.content.redstone.displayLink.target.DisplayTargetStats; 6 | import net.minecraft.network.chat.MutableComponent; 7 | 8 | import java.util.List; 9 | 10 | public class MonitorTargetDisplayBehavior extends DisplaySource { 11 | 12 | 13 | @Override 14 | public List provideText(DisplayLinkContext context, DisplayTargetStats stats) { 15 | if (context.getSourceBlockEntity() instanceof MonitorBlockEntity monitor) { 16 | // Vec3i target = new Vec3i((int) monitor.getTargetPos(TargetingConfig.DEFAULT).x(), (int) monitor.getTargetPos(TargetingConfig.DEFAULT).y(), (int) monitor.getTargetPos(TargetingConfig.DEFAULT).z()); 17 | // return List.of(Component.translatable(CreateRadar.MODID + ".monitor.display.target" + " : (" + target.toShortString() + ")")); 18 | } 19 | return List.of(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/euclidean/twod/hull/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides algorithms to generate the convex hull 21 | * for a set of points in an two-dimensional euclidean space. 22 | *

23 | * 24 | */ 25 | package com.happysg.radar.math3.geometry.euclidean.twod.hull; 26 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package is the top level package for geometry. It provides only a few interfaces 21 | * related to vectorial/affine spaces that are implemented in sub-packages. 22 | *

23 | * 24 | */ 25 | package com.happysg.radar.math3.geometry; 26 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/compat/computercraft/YawControllerPeripheral.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.compat.computercraft; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.block.controller.yaw.AutoYawControllerBlockEntity; 5 | import dan200.computercraft.api.lua.LuaFunction; 6 | import dan200.computercraft.api.peripheral.GenericPeripheral; 7 | import net.minecraft.world.phys.Vec3; 8 | 9 | public class YawControllerPeripheral implements GenericPeripheral { 10 | @Override 11 | public String id() { 12 | return CreateRadar.asResource("yaw_controller").toString(); 13 | } 14 | 15 | // @LuaFunction(mainThread = true) 16 | // public void setTargetPosition(AutoYawControllerBlockEntity entity, double x, double y, double z) { 17 | // entity.setTarget(new Vec3(x, y, z)); //TODO 18 | // } 19 | 20 | @LuaFunction(mainThread = true) 21 | public void setTargetAngle(AutoYawControllerBlockEntity entity, float angle) { 22 | entity.setTargetAngle(angle); 23 | } 24 | 25 | @LuaFunction(mainThread = true) 26 | public double getTargetAngle(AutoYawControllerBlockEntity entity){ 27 | return entity.getTargetAngle(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/radar/receiver/RadarReceiverBlock.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.radar.receiver; 2 | 3 | import com.simibubi.create.AllShapes; 4 | import com.simibubi.create.foundation.block.WrenchableDirectionalBlock; 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.world.level.BlockGetter; 7 | import net.minecraft.world.level.block.state.BlockState; 8 | import net.minecraft.world.phys.shapes.CollisionContext; 9 | import net.minecraft.world.phys.shapes.VoxelShape; 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | public class RadarReceiverBlock extends WrenchableDirectionalBlock { 13 | public RadarReceiverBlock(Properties properties) { 14 | super(properties); 15 | } 16 | 17 | @SuppressWarnings("deprecation") 18 | @Override 19 | public @NotNull VoxelShape getShape(BlockState state, @NotNull BlockGetter p_220071_2_, @NotNull BlockPos p_220071_3_, 20 | @NotNull CollisionContext p_220071_4_) { 21 | return AllShapes.CASING_13PX.get(state.getValue(FACING)); 22 | } 23 | 24 | @Override 25 | public boolean isStickyBlock(BlockState state) { 26 | return true; 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/compat/computercraft/PitchControllerPeripheral.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.compat.computercraft; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.block.controller.pitch.AutoPitchControllerBlockEntity; 5 | import dan200.computercraft.api.lua.LuaFunction; 6 | import dan200.computercraft.api.peripheral.GenericPeripheral; 7 | import net.minecraft.world.phys.Vec3; 8 | 9 | public class PitchControllerPeripheral implements GenericPeripheral { 10 | @Override 11 | public String id() { 12 | return CreateRadar.asResource("pitch_controller").toString(); 13 | } 14 | 15 | // @LuaFunction(mainThread = true) 16 | // public void setTargetPosition(AutoPitchControllerBlockEntity entity, double x, double y, double z) { 17 | // entity.setTarget(new Vec3(x, y, z)); //TODO 18 | // } 19 | 20 | @LuaFunction(mainThread = true) 21 | public void setTargetAngle(AutoPitchControllerBlockEntity entity, float angle) { 22 | entity.setTargetAngle(angle); 23 | } 24 | 25 | @LuaFunction(mainThread = true) 26 | public double getTargetAngle(AutoPitchControllerBlockEntity entity){ 27 | return entity.getTargetAngle(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/genetics/Fitness.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.genetics; 18 | 19 | /** 20 | * Fitness of a chromosome. 21 | * 22 | * @since 2.0 23 | */ 24 | public interface Fitness { 25 | 26 | /** 27 | * Compute the fitness. This is usually very time-consuming, so the value should be cached. 28 | * @return fitness 29 | */ 30 | double fitness(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * The {@code function} package contains function objects that wrap the 21 | * methods contained in {@link java.lang.Math}, as well as common 22 | * mathematical functions such as the gaussian and sinc functions. 23 | *

24 | * 25 | */ 26 | package com.happysg.radar.math3.analysis.function; 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/clustering/Clusterable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.ml.clustering; 19 | 20 | /** 21 | * Interface for n-dimensional points that can be clustered together. 22 | * @since 3.2 23 | */ 24 | public interface Clusterable { 25 | 26 | /** 27 | * Gets the n-dimensional point. 28 | * 29 | * @return the point array 30 | */ 31 | double[] getPoint(); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/FeatureInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.ml.neuralnet; 19 | 20 | /** 21 | * Defines how to assign the first value of a neuron's feature. 22 | * 23 | * @since 3.3 24 | */ 25 | public interface FeatureInitializer { 26 | /** 27 | * Selects the initial value. 28 | * 29 | * @return the initial value. 30 | */ 31 | double value(); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/stat/clustering/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | *

All classes and sub-packages of this package are deprecated.

19 | *

Please use their replacements, to be found under 20 | *
    21 | *
  • {@link com.happysg.radar.math3.ml.clustering}
  • 22 | *
23 | *

24 | * 25 | *

26 | * Clustering algorithms. 27 | *

28 | */ 29 | package com.happysg.radar.math3.stat.clustering; 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Add.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | 22 | /** 23 | * Add the two operands. 24 | * 25 | * @since 3.0 26 | */ 27 | public class Add implements BivariateFunction { 28 | /** {@inheritDoc} */ 29 | public double value(double x, double y) { 30 | return x + y; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/transform/TransformType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.transform; 18 | 19 | /** 20 | * This enumeration defines the type of transform which is to be computed. 21 | * 22 | * @since 3.0 23 | */ 24 | public enum TransformType { 25 | /** The type to be specified for forward transforms. */ 26 | FORWARD, 27 | 28 | /** The type to be specified for inverse transforms. */ 29 | INVERSE; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/vector/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Algorithms for optimizing a vector function. 20 | * 21 | * @deprecated All classes and interfaces in this package are deprecated. 22 | * The optimizers that were provided here were moved to the 23 | * {@link com.happysg.radar.math3.fitting.leastsquares} package 24 | * (cf. MATH-1008). 25 | */ 26 | package com.happysg.radar.math3.optim.nonlinear.vector; 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/random/RandomVectorGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.random; 19 | 20 | 21 | /** This interface represents a random generator for whole vectors. 22 | * 23 | * @since 1.2 24 | * 25 | */ 26 | 27 | public interface RandomVectorGenerator { 28 | 29 | /** Generate a random vector. 30 | * @return a random vector as an array of double. 31 | */ 32 | double[] nextVector(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Multiply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | 22 | /** 23 | * Multiply the two operands. 24 | * 25 | * @since 3.0 26 | */ 27 | public class Multiply implements BivariateFunction { 28 | /** {@inheritDoc} */ 29 | public double value(double x, double y) { 30 | return x * y; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Divide.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | 22 | /** 23 | * Divide the first operand by the second. 24 | * 25 | * @since 3.0 26 | */ 27 | public class Divide implements BivariateFunction { 28 | /** {@inheritDoc} */ 29 | public double value(double x, double y) { 30 | return x / y; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/solvers/UnivariateSolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis.solvers; 18 | 19 | import com.happysg.radar.math3.analysis.UnivariateFunction; 20 | 21 | 22 | /** 23 | * Interface for (univariate real) root-finding algorithms. 24 | * Implementations will search for only one zero in the given interval. 25 | * 26 | */ 27 | public interface UnivariateSolver 28 | extends BaseUnivariateSolver {} 29 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Subtract.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | 22 | /** 23 | * Subtract the second operand from the first. 24 | * 25 | * @since 3.0 26 | */ 27 | public class Subtract implements BivariateFunction { 28 | /** {@inheritDoc} */ 29 | public double value(double x, double y) { 30 | return x - y; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/OptimizationData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.optim; 18 | 19 | /** 20 | * Marker interface. 21 | * Implementations will provide functionality (optional or required) needed 22 | * by the optimizers, and those will need to check the actual type of the 23 | * arguments and perform the appropriate cast in order to access the data 24 | * they need. 25 | * 26 | * @since 3.1 27 | */ 28 | public interface OptimizationData {} 29 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/item/targetfilter/TargetFilterItem.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.item.targetfilter; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.world.InteractionHand; 5 | import net.minecraft.world.InteractionResultHolder; 6 | import net.minecraft.world.entity.player.Player; 7 | import net.minecraft.world.item.Item; 8 | import net.minecraft.world.item.ItemStack; 9 | import net.minecraft.world.level.Level; 10 | 11 | import net.minecraftforge.api.distmarker.Dist; 12 | import net.minecraftforge.api.distmarker.OnlyIn; 13 | 14 | public class TargetFilterItem extends Item { 15 | 16 | public TargetFilterItem(Properties properties) { 17 | super(properties); 18 | } 19 | 20 | @OnlyIn(Dist.CLIENT) 21 | private InteractionResultHolder clientFunc(Level level, Player player, InteractionHand hand) { 22 | Minecraft.getInstance().setScreen(new AutoTargetScreen()); 23 | return InteractionResultHolder.success(player.getItemInHand(hand)); 24 | } 25 | 26 | @Override 27 | public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { 28 | if (!level.isClientSide) 29 | return InteractionResultHolder.pass(player.getItemInHand(hand)); 30 | return clientFunc(level, player, hand); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/networking/packets/IDRecordPacket.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.networking.packets; 2 | 3 | import com.happysg.radar.block.controller.id.IDManager; 4 | import com.simibubi.create.foundation.networking.SimplePacketBase; 5 | import net.minecraft.network.FriendlyByteBuf; 6 | import net.minecraftforge.network.NetworkEvent; 7 | 8 | public class IDRecordPacket extends SimplePacketBase { 9 | String shipSlug; 10 | String secretID; 11 | String name; 12 | 13 | public IDRecordPacket(String shipSlug, String secretID, String name) { 14 | this.shipSlug = shipSlug; 15 | this.secretID = secretID; 16 | this.name = name; 17 | } 18 | 19 | public IDRecordPacket(FriendlyByteBuf buffer) { 20 | this.shipSlug = buffer.readUtf(); 21 | this.secretID = buffer.readUtf(); 22 | this.name = buffer.readUtf(); 23 | } 24 | 25 | @Override 26 | public void write(FriendlyByteBuf buffer) { 27 | buffer.writeUtf(shipSlug); 28 | buffer.writeUtf(secretID); 29 | buffer.writeUtf(name); 30 | } 31 | 32 | @Override 33 | public boolean handle(NetworkEvent.Context context) { 34 | context.enqueueWork(() -> { 35 | IDManager.addIDRecord(shipSlug, secretID, name); 36 | }); 37 | return true; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/solvers/PolynomialSolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis.solvers; 18 | 19 | import com.happysg.radar.math3.analysis.polynomials.PolynomialFunction; 20 | 21 | /** 22 | * Interface for (polynomial) root-finding algorithms. 23 | * Implementations will search for only one zero in the given interval. 24 | * 25 | * @since 3.0 26 | */ 27 | public interface PolynomialSolver 28 | extends BaseUnivariateSolver {} 29 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Ulp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * {@code ulp} function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Ulp implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.ulp(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/vector/jacobian/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * This package provides optimization algorithms that require derivatives. 20 | * 21 | * @deprecated All classes and interfaces in this package are deprecated. 22 | * The optimizers that were provided here were moved to the 23 | * {@link com.happysg.radar.math3.fitting.leastsquares} package 24 | * (cf. MATH-1008). 25 | */ 26 | package com.happysg.radar.math3.optim.nonlinear.vector.jacobian; 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/univariate/UnivariateOptimizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.optimization.univariate; 18 | 19 | import com.happysg.radar.math3.analysis.UnivariateFunction; 20 | 21 | /** 22 | * Interface for univariate optimization algorithms. 23 | * 24 | * @deprecated As of 3.1 (to be removed in 4.0). 25 | * @since 3.0 26 | */ 27 | @Deprecated 28 | public interface UnivariateOptimizer 29 | extends BaseUnivariateOptimizer {} 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/registry/ModItems.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.registry; 2 | 3 | import com.happysg.radar.CreateRadar; 4 | import com.happysg.radar.item.detectionfilter.DetectionFilterItem; 5 | import com.happysg.radar.item.identfilter.IdentFilterItem; 6 | import com.happysg.radar.item.SafeZoneDesignatorItem; 7 | import com.happysg.radar.item.targetfilter.TargetFilterItem; 8 | import com.tterrag.registrate.util.entry.ItemEntry; 9 | 10 | import static com.happysg.radar.CreateRadar.REGISTRATE; 11 | 12 | public class ModItems { 13 | 14 | public static final ItemEntry SAFE_ZONE_DESIGNATOR = REGISTRATE.item("radar_safe_zone_designator", SafeZoneDesignatorItem::new) 15 | .register(); 16 | public static final ItemEntry RADAR_FILTER_ITEM = REGISTRATE.item("radar_filter_item", DetectionFilterItem::new ) 17 | .register(); 18 | public static final ItemEntry IDENT_FILTER_ITEM = REGISTRATE.item("ident_filter_item",IdentFilterItem::new) 19 | .register(); 20 | public static final ItemEntry TARGET_FILTER_ITEM = REGISTRATE.item("target_filter_item", TargetFilterItem::new) 21 | .register(); 22 | public static void register() { 23 | CreateRadar.getLogger().info("Registering Items!"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/item/detectionfilter/DetectionFilterItem.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.item.detectionfilter; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.world.InteractionHand; 5 | import net.minecraft.world.InteractionResultHolder; 6 | import net.minecraft.world.entity.player.Player; 7 | import net.minecraft.world.item.Item; 8 | import net.minecraft.world.item.ItemStack; 9 | import net.minecraft.world.level.Level; 10 | 11 | import net.minecraftforge.api.distmarker.Dist; 12 | import net.minecraftforge.api.distmarker.OnlyIn; 13 | 14 | public class DetectionFilterItem extends Item { 15 | 16 | public DetectionFilterItem(Properties properties) { 17 | super(properties); 18 | } 19 | 20 | @OnlyIn(Dist.CLIENT) 21 | private InteractionResultHolder clientFunc(Level level, Player player, InteractionHand hand) { 22 | Minecraft.getInstance().setScreen(new RadarFilterScreen()); 23 | return InteractionResultHolder.success(player.getItemInHand(hand)); 24 | } 25 | 26 | @Override 27 | public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { 28 | if (!level.isClientSide) 29 | return InteractionResultHolder.pass(player.getItemInHand(hand)); 30 | return clientFunc(level, player, hand); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/item/identfilter/IdentFilterItem.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.item.identfilter; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.world.InteractionHand; 5 | import net.minecraft.world.InteractionResultHolder; 6 | import net.minecraft.world.entity.player.Player; 7 | import net.minecraft.world.item.Item; 8 | import net.minecraft.world.item.ItemStack; 9 | import net.minecraft.world.level.Level; 10 | 11 | import net.minecraftforge.api.distmarker.Dist; 12 | import net.minecraftforge.api.distmarker.OnlyIn; 13 | 14 | public class IdentFilterItem extends Item { 15 | public IdentFilterItem(Properties properties) { 16 | super(properties); 17 | } 18 | 19 | @OnlyIn(Dist.CLIENT) 20 | private InteractionResultHolder clientFunc(Level level, Player player, InteractionHand hand) { 21 | Minecraft.getInstance().setScreen(new IdentificationFilterScreen()); 22 | return InteractionResultHolder.success(player.getItemInHand(hand)); 23 | } 24 | 25 | @Override 26 | public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { 27 | if (!level.isClientSide) 28 | return InteractionResultHolder.pass(player.getItemInHand(hand)); 29 | return clientFunc(level, player, hand); 30 | } 31 | } 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Abs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * Absolute value function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Abs implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.abs(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Ceil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * {@code ceil} function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Ceil implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.ceil(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Pow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * Power function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Pow implements BivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x, double y) { 31 | return FastMath.pow(x, y); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Rint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * {@code rint} function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Rint implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.rint(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/GoalType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.optimization; 19 | 20 | import java.io.Serializable; 21 | 22 | /** 23 | * Goal type for an optimization problem. 24 | * 25 | * @deprecated As of 3.1 (to be removed in 4.0). 26 | * @since 2.0 27 | */ 28 | @Deprecated 29 | public enum GoalType implements Serializable { 30 | 31 | /** Maximization goal. */ 32 | MAXIMIZE, 33 | 34 | /** Minimization goal. */ 35 | MINIMIZE 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Floor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * {@code floor} function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Floor implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.floor(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Max.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * Maximum function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Max implements BivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x, double y) { 31 | return FastMath.max(x, y); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Min.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * Minimum function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Min implements BivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x, double y) { 31 | return FastMath.min(x, y); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optim/nonlinear/scalar/GoalType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.optim.nonlinear.scalar; 18 | 19 | import com.happysg.radar.math3.optim.OptimizationData; 20 | 21 | /** 22 | * Goal type for an optimization problem (minimization or maximization of 23 | * a scalar function. 24 | * 25 | * @since 2.0 26 | */ 27 | public enum GoalType implements OptimizationData { 28 | /** Maximization. */ 29 | MAXIMIZE, 30 | /** Minimization. */ 31 | MINIMIZE 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Signum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.UnivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * {@code signum} function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Signum implements UnivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x) { 31 | return FastMath.signum(x); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/UnivariateMatrixFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis; 18 | 19 | /** 20 | * An interface representing a univariate matrix function. 21 | * 22 | * @since 2.0 23 | */ 24 | public interface UnivariateMatrixFunction { 25 | 26 | /** 27 | * Compute the value for the function. 28 | * @param x the point for which the function value should be computed 29 | * @return the value 30 | */ 31 | double[][] value(double x); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/UnivariateVectorFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis; 18 | 19 | /** 20 | * An interface representing a univariate vectorial function. 21 | * 22 | * @since 2.0 23 | */ 24 | public interface UnivariateVectorFunction { 25 | 26 | /** 27 | * Compute the value for the function. 28 | * @param x the point for which the function value should be computed 29 | * @return the value 30 | */ 31 | double[] value(double x); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/function/Atan2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis.function; 19 | 20 | import com.happysg.radar.math3.analysis.BivariateFunction; 21 | import com.happysg.radar.math3.util.FastMath; 22 | 23 | /** 24 | * Arc-tangent function. 25 | * 26 | * @since 3.0 27 | */ 28 | public class Atan2 implements BivariateFunction { 29 | /** {@inheritDoc} */ 30 | public double value(double x, double y) { 31 | return FastMath.atan2(x, y); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/fitting/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * Classes to perform curve fitting. 19 | * 20 | * Curve fitting is a special case of a least-squares problem 21 | * where the parameters are the coefficients of a function \( f \) 22 | * whose graph \( y = f(x) \) should pass through sample points, and 23 | * were the objective function is the squared sum of the residuals 24 | * \( f(x_i) - y_i \) for observed points \( (x_i, y_i) \). 25 | */ 26 | package com.happysg.radar.math3.fitting; 27 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/UpdateAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.ml.neuralnet; 19 | 20 | /** 21 | * Describes how to update the network in response to a training 22 | * sample. 23 | * 24 | * @since 3.3 25 | */ 26 | public interface UpdateAction { 27 | /** 28 | * Updates the network in response to the sample {@code features}. 29 | * 30 | * @param net Network. 31 | * @param features Training data. 32 | */ 33 | void update(Network net, double[] features); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/spherical/oned/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides basic geometry components on the 1-sphere. 21 | *

22 | *

23 | * We use here the topologists definition of the 1-sphere (see 24 | * Sphere on 25 | * MathWorld), i.e. the 1-sphere is the one-dimensional closed curve 26 | * defined in 2D as x2+y2=1. 27 | *

28 | * 29 | */ 30 | package com.happysg.radar.math3.geometry.spherical.oned; 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/solvers/UnivariateDifferentiableSolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis.solvers; 18 | 19 | import com.happysg.radar.math3.analysis.differentiation.UnivariateDifferentiableFunction; 20 | 21 | 22 | /** 23 | * Interface for (univariate real) rootfinding algorithms. 24 | * Implementations will search for only one zero in the given interval. 25 | * 26 | * @since 3.1 27 | */ 28 | public interface UnivariateDifferentiableSolver 29 | extends BaseUnivariateSolver {} 30 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/OptimizationData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.optimization; 18 | 19 | /** 20 | * Marker interface. 21 | * Implementations will provide functionality (optional or required) needed 22 | * by the optimizers, and those will need to check the actual type of the 23 | * arguments and perform the appropriate cast in order to access the data 24 | * they need. 25 | * 26 | * @deprecated As of 3.1 (to be removed in 4.0). 27 | * @since 3.1 28 | */ 29 | @Deprecated 30 | public interface OptimizationData {} 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/spherical/twod/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | *

20 | * This package provides basic geometry components on the 2-sphere. 21 | *

22 | *

23 | * We use here the topologists definition of the 2-sphere (see 24 | * Sphere on 25 | * MathWorld), i.e. the 2-sphere is the two-dimensional surface 26 | * defined in 3D as x2+y2+z2=1. 27 | *

28 | * 29 | */ 30 | package com.happysg.radar.math3.geometry.spherical.twod; 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/fitting/leastsquares/ParameterValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.fitting.leastsquares; 18 | 19 | import com.happysg.radar.math3.linear.RealVector; 20 | 21 | /** 22 | * Interface for validating a set of model parameters. 23 | * 24 | * @since 3.4 25 | */ 26 | public interface ParameterValidator { 27 | /** 28 | * Validates the set of parameters. 29 | * 30 | * @param params Input parameters. 31 | * @return the validated values. 32 | */ 33 | RealVector validate(RealVector params); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader = "javafml" #mandatory 2 | loaderVersion = "[47,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. 3 | license = "MIT" 4 | 5 | [[mods]] #mandatory 6 | modId = "create_radar" #mandatory 7 | version = "0.3" #mandatory 8 | displayName = "Create: Radars" #mandatory 9 | authors = "HappySG, CeoOfGoogle, Kipti, OndatraCZE, Ray(furuochen)" #optional 10 | 11 | # The description text for the radar (multi line!) (#mandatory) 12 | description = '''Welcome to Create Radars, a mod offering a variety of tools and blocks for Surveillance, Detection, and Controlling Weapons.''' 13 | 14 | # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. 15 | [[dependencies.create_radar]] #optional 16 | modId = "forge" #mandatory 17 | mandatory = true #mandatory 18 | versionRange = "[47,)" #mandatory 19 | ordering = "NONE" 20 | side = "BOTH" 21 | [[dependencies.create_radar]] 22 | modId = "minecraft" 23 | mandatory = true 24 | versionRange = "[1.20.1,1.21)" 25 | ordering = "NONE" 26 | side = "BOTH" 27 | [[dependencies.create_radar]] 28 | modId = "create" 29 | mandatory = true 30 | versionRange = "[6.0.0,6.1.0)" 31 | ordering = "BEFORE" 32 | side = "BOTH" 33 | [[dependencies.create_radar]] 34 | modId = "createbigcannons" 35 | mandatory = false 36 | versionRange = "[5.9.0,)" 37 | ordering = "BEFORE" 38 | side = "BOTH" 39 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/BivariateFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.analysis; 19 | /** 20 | * An interface representing a bivariate real function. 21 | * 22 | * @since 2.1 23 | */ 24 | public interface BivariateFunction { 25 | /** 26 | * Compute the value for the function. 27 | * 28 | * @param x Abscissa for which the function value should be computed. 29 | * @param y Ordinate for which the function value should be computed. 30 | * @return the value. 31 | */ 32 | double value(double x, double y); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/utils/screenelements/TooltipIcon.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.utils.screenelements; 2 | 3 | import com.happysg.radar.registry.ModGuiTextures; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.GuiGraphics; 6 | import net.minecraft.client.gui.components.AbstractWidget; 7 | import net.minecraft.client.gui.narration.NarrationElementOutput; 8 | import net.minecraft.network.chat.Component; 9 | 10 | public class TooltipIcon extends AbstractWidget { 11 | private final ModGuiTextures icon; 12 | private final Component tooltip; 13 | 14 | public TooltipIcon(int x, int y, ModGuiTextures icon, Component tooltip) { 15 | super(x, y, icon.width, icon.height, tooltip); 16 | this.icon = icon; 17 | this.tooltip = tooltip; 18 | } 19 | 20 | @Override 21 | public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { 22 | graphics.blit( 23 | icon.location, 24 | getX(), getY(), 25 | icon.startX, icon.startY, 26 | icon.width, icon.height, 27 | icon.textureWidth, icon.textureHeight 28 | ); 29 | } 30 | 31 | 32 | @Override 33 | public void onClick(double mouseX, double mouseY) { 34 | } 35 | 36 | @Override 37 | protected void updateWidgetNarration(NarrationElementOutput pNarrationElementOutput) { 38 | 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/exception/util/ExceptionContextProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.exception.util; 18 | 19 | /** 20 | * Interface for accessing the context data structure stored in Commons Math 21 | * exceptions. 22 | * 23 | */ 24 | public interface ExceptionContextProvider { 25 | /** 26 | * Gets a reference to the "rich context" data structure that allows to 27 | * customize error messages and store key, value pairs in exceptions. 28 | * 29 | * @return a reference to the exception context. 30 | */ 31 | ExceptionContext getContext(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/analysis/solvers/DifferentiableUnivariateSolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.analysis.solvers; 18 | 19 | import com.happysg.radar.math3.analysis.DifferentiableUnivariateFunction; 20 | 21 | 22 | /** 23 | * Interface for (univariate real) rootfinding algorithms. 24 | * Implementations will search for only one zero in the given interval. 25 | * 26 | * @deprecated as of 3.1, replaced by {@link UnivariateDifferentiableSolver} 27 | */ 28 | @Deprecated 29 | public interface DifferentiableUnivariateSolver 30 | extends BaseUnivariateSolver {} 31 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/sofm/LearningFactorFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.ml.neuralnet.sofm; 19 | 20 | /** 21 | * Provides the learning rate as a function of the number of calls 22 | * already performed during the learning task. 23 | * 24 | * @since 3.3 25 | */ 26 | public interface LearningFactorFunction { 27 | /** 28 | * Computes the learning rate at the current call. 29 | * 30 | * @param numCall Current step of the training task. 31 | * @return the value of the function at {@code numCall}. 32 | */ 33 | double value(long numCall); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/ml/neuralnet/twod/util/MapVisualization.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.happysg.radar.math3.ml.neuralnet.twod.util; 19 | 20 | import com.happysg.radar.math3.ml.neuralnet.twod.NeuronSquareMesh2D; 21 | 22 | /** 23 | * Interface for algorithms that compute some property of a 2D-map. 24 | * @since 3.6 25 | */ 26 | public interface MapVisualization { 27 | /** 28 | * Creates an image of the {@code map}. 29 | * 30 | * @param map Map. 31 | * @return a 2D-array (in row major order) representing the property. 32 | */ 33 | double[][] computeImage(NeuronSquareMesh2D map); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/genetics/StoppingCondition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.genetics; 18 | 19 | /** 20 | * Algorithm used to determine when to stop evolution. 21 | * 22 | * @since 2.0 23 | */ 24 | public interface StoppingCondition { 25 | /** 26 | * Determine whether or not the given population satisfies the stopping condition. 27 | * 28 | * @param population the population to test. 29 | * @return true if this stopping condition is met by the given population, 30 | * false otherwise. 31 | */ 32 | boolean isSatisfied(Population population); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/block/radar/track/TrackCategory.java: -------------------------------------------------------------------------------- 1 | package com.happysg.radar.block.radar.track; 2 | 3 | import com.simibubi.create.content.contraptions.AbstractContraptionEntity; 4 | import net.minecraft.world.entity.Entity; 5 | import net.minecraft.world.entity.Mob; 6 | import net.minecraft.world.entity.animal.Animal; 7 | import net.minecraft.world.entity.monster.Enemy; 8 | import net.minecraft.world.entity.player.Player; 9 | import net.minecraft.world.entity.projectile.Projectile; 10 | import net.minecraft.world.entity.item.ItemEntity; 11 | 12 | public enum TrackCategory { 13 | PLAYER, 14 | MOB, 15 | HOSTILE, 16 | ANIMAL, 17 | VS2, 18 | PROJECTILE, 19 | CONTRAPTION, 20 | ITEM, 21 | MISC; 22 | 23 | 24 | public static TrackCategory get(Entity entity) { 25 | if (entity instanceof Player) { 26 | return PLAYER; 27 | } else if (entity instanceof Mob) { 28 | if (entity instanceof Animal) { 29 | return ANIMAL; 30 | } 31 | if (entity instanceof Enemy) { 32 | return HOSTILE; 33 | } 34 | return MOB; 35 | } else if (entity instanceof ItemEntity){ 36 | return ITEM; 37 | } else if (entity instanceof AbstractContraptionEntity) { 38 | return CONTRAPTION; 39 | } else if (entity instanceof Projectile) { 40 | return PROJECTILE; 41 | } 42 | return MISC; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/geometry/partitioning/Side.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.happysg.radar.math3.geometry.partitioning; 18 | 19 | /** Enumerate representing the location of an element with respect to an 20 | * {@link Hyperplane hyperplane} of a space. 21 | * @since 3.0 22 | */ 23 | public enum Side { 24 | 25 | /** Code for the plus side of the hyperplane. */ 26 | PLUS, 27 | 28 | /** Code for the minus side of the hyperplane. */ 29 | MINUS, 30 | 31 | /** Code for elements crossing the hyperplane from plus to minus side. */ 32 | BOTH, 33 | 34 | /** Code for the hyperplane itself. */ 35 | HYPER; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/happysg/radar/math3/optimization/fitting/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | /** 18 | * 19 | * This package provides classes to perform curve fitting. 20 | * 21 | *

Curve fitting is a special case of a least squares problem 22 | * were the parameters are the coefficients of a function f 23 | * whose graph y=f(x) should pass through sample points, and 24 | * were the objective function is the squared sum of residuals 25 | * f(xi)-yi for observed points 26 | * (xi, yi).

27 | * 28 | * 29 | */ 30 | package com.happysg.radar.math3.optimization.fitting; 31 | --------------------------------------------------------------------------------